[FFmpeg-devel] [PATCH v4] avformat/hls: Add option to retry failed segments for hls

Gyan Doshi ffmpeg at gyani.pro
Thu Oct 20 12:36:49 EEST 2022



On 2022-10-20 03:03 pm, Steven Liu wrote:
> gnattu <gnattuoc at me.com> 于2022年10月19日周三 16:11写道:
>> Current HLS implementation simply skip a failed segment to catch up
>> the stream, but this is not optimal for some use cases like livestream
>> recording.
>> Add an option to retry a failed segment to ensure the output file is
>> a complete stream.
>>
>> Signed-off-by: gnattu <gnattuoc at me.com>
>> ---
>> v4 added documentation for the new seg_max_try option
>>
>>   doc/demuxers.texi |  4 ++++
>>   libavformat/hls.c | 15 ++++++++++++++-
>>   2 files changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/doc/demuxers.texi b/doc/demuxers.texi
>> index 2b6dd86c2a..3e09a0f14e 100644
>> --- a/doc/demuxers.texi
>> +++ b/doc/demuxers.texi
>> @@ -401,6 +401,10 @@ Use HTTP partial requests for downloading HTTP segments.
>>
>>   @item seg_format_options
>>   Set options for the demuxer of media segments using a list of key=value pairs separated by @code{:}.
>> +
>> + at item seg_max_retry
>> +Maximum number of times to reload a segment on error, useful when segment skip on network error is not desired.
>> +Default value is 0.
>>   @end table
> ping Gyan help review document content :D

Looks ok.

Regards,
Gyan


More information about the ffmpeg-devel mailing list