8
6
I would like to record a live stream to a sequence of mp4 on disk. I'm able to do one file like this:
ffmpeg -i rtmp://source.com/live/stream -r 5 -t 60 c:\test.mp4
This results in one 60s mp4 (test.mp4). What I would like is something like this:
ffmpeg -i rtmp://source.com/live/stream -r 5 -t 60 c:\test%d.mp4
That results in one 60s mp4 per minute (test1.mp4, test2.mp4, etc) I'm finding plenty of examples for extracting single frames in a similar way, but not video.
I realize I can just loop a call to the first example, but I was hoping there would be a good way to do it with minimal loss between each file by letting ffmpeg handle the sequencing. What is the cleanest way to record a live stream into a sequence of mp4?
That is it exactly and you are amazing. Thanks! – Daniel – 2015-11-12T16:29:25.497
FYI - I found I needed to add -reset_timestamps 1 or the segments after the first one would not play correctly in most browsers. See this explanation: http://www.dahuatu.com/JVwakkLZyM.html
– Daniel – 2015-11-13T02:39:59.507