Optional question to stop ffmpeg error last message repeat

Asked 2 years ago, Updated 2 years ago, 92 views

I am currently recording and downloading live footage using the command below (the files are divided into 1 hour recording).

.\ffmpeg-i "EXAMPLE_URL" -copy-flags+global_header-f segment
-segment_time3600-segment_format_options movflags=+faststart-reset_timestamps1 "EXAMPLE_%d.mp4"

The problem is that when the destination ends, an error occurs as shown in the attached image.And the repeat count will last forever.If you force it to terminate with Ctrl+C, the recorded and downloaded video files at that time will be corrupted (estimated) and you will not be able to play them.

Enter a description of the image here

However, if you force Ctrl-C to close before the live destination ends, you can see the recorded and downloaded video files without any problems.

If you know how to resolve this issue (e.g., ffmpeg options)
Thank you for your cooperation.

ffmpeg

2022-09-30 18:39

1 Answers

If EXAMPLE_URL is HLS, how about max_reload?
I quickly checked with Nico Live, which is divided into 60 seconds, and after accessing the manifesto for the specified number of times, it was successful.

https://ffmpeg.org/ffmpeg-all.html#hls-1

max_reload
    Maximum number of times a supplicant list is attempted to be reloaded. Default value is 1000.


2022-09-30 18:39

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.