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 -timeout
and -listen_timeout
.
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.
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.