VLC: keep it open to be faster [closed]
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be a开发者_开发百科nswered.
Closed 7 years ago.
Improve this questionI'm recording a stream this way:
rtsp://teams:teams@10.200.0.95/img/media.sav --rtsp-tcp --no-sout-audio --rtsp-
caching=0 --sout "#std{mux=mp4,access=file,dst=cam-3.mp4}
It takes 1 second to start, and I need it to be faster. I'm wondering whether it's possible to keep VLC open and communicate with it to start recording faster.
You can start VLC without starting your recording and control it through one of it's various interfaces. Probably rc is probably the one you want for this task.
If you start vlc with something like this:
vlc -I rc --rc-host localhost:10000
you can send it commands with netcat like this:
echo "your_command_goes_here" | netcat localhost 10000
Also, depending how you're doing this, a lot of programming languages have wrappers for vlc which might make your life easier:
- http://wiki.videolan.org/Libvlc
- http://wiki.videolan.org/Developers_Corner
check out this blog with a nice description of all the commands available.
Your command would be "add rtsp://teams....". VLC must be started with all your other options before though.
精彩评论