I'm trying to record live video stream to a file.
I tried with VLC using
vlc {INPUT} --sout '#std{access=file,mux=ts,dst=file.mp4}'
I tried with ffmpeg using
ffmpeg {INPUT} -vcodec copy -acodec copy file.mp4
Both records just fine, but the source tends to loose connection for 1-2seconds, and then recording just stops >.< leaving me with half finished recording :(
I want the recording to continue, and the recording app try to reconnect.
What can you recommend?
Ok I've found a solution myself.
If I set VLC on loop and instruct it to append the file, it reconnects to the stream and continue recording (no black video while connection is lost tho)
the command is:
cvlc {INPUT} --loop --sout '#std{access=file{append},mux=ts,dst=file.mp4}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With