I am currently recording and downloading live footage using the command below.
ffmpeg-i "EXAMPLE_URL" \ -c copy-flags+global_header-f segment\ -segment_time3600-segment_format_options movflags=+faststart\ - reset_timestamps1 "EXAMPLE_%d.mp4"
The files are divided into one hour's worth.
Usually, there is no problem, but when the live is over,
ffmpeg last message repeated %N times appears and remains unresponsive for a long time.
If you finish with Ctrl+C after this, you will not be able to see the video at that time.(Probably damaged)
Could you tell me how to avoid this problem or if there are any options?
The best thing is that if the live destination ends without permission, the recording should end normally at that time.
Thank you for your cooperation.ffmpeg
If you finish using Ctrl+C after this, you will not be able to see the video at that time.
That's what mp4 does, so let's save it with ts.
Since there is no "URL of live video to record", I looked at the options in
ffmpeg (v4.0.2, binary for Windows) and found several options such as
You can specify the number of seconds, but it seems that the units vary depending on the protocol, so please check carefully according to your environment.
I think the commands are the same for Linux and Windows.
Windows batch file has an internal loop and is no longer responding.
If I remember correctly, when I searched by automatic termination -audoexit, it ends when the processing is finished.
Now you can create a batch file and play 50 music on ffplay and finish automatically.
© 2023 OneMinuteCode. All rights reserved.