I'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: