[FFmpeg-devel] FIX: HLS Discontinuity / Non-Monotonous DTS

Joe Koberg joe at koberg.us
Tue Mar 20 16:46:58 EET 2018


On Fri, Mar 16, 2018 at 11:14 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2018-03-16 16:07 GMT+01:00, Joe Koberg <joe at koberg.us>:
>> On Fri, Mar 16, 2018 at 10:48 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
>> wrote:
>>>
>>> Is the issue only reproducible if you use hls input or is it also
>>> reproducible if you first concatenate the ts files and use the
>>> complete file as input?
>>
>> Very interesting, this case seems to work perfectly with ffmpeg 3.4.2.
>
> Only current FFmpeg is relevant.
>
>> In previous versions, I don't think it did.
>>
>> Any hints on getting that to apply to the HLS demuxer?
>>
>> test concat file:
>
> I meant:
> What happens if you concat all these files (with "cat") before
> feeding the resulting large file to ffmpeg?
>
> Carl Eugen


When I do that, a few messages are printed but otherwise everything
works perfectly and the output appears correctly timed when written to
MP4.

How do we get similar performance from HLS input? I think hls.c just
calls av_probe_input_buffer to open the sub-demuxers (this is my first
time trying to read this code, so please correct me), so I'm not sure
why the MPEG-TS demuxer wouldn't handle timestamps the same way in
both situations.

for reference, new command was:

    cat `grep '.ts$' discont_test.m3u8` | ffmpeg -f mpegts -i - -c
copy output000.mp4



Thanks,

Joe Koberg
joe at koberg.us


More information about the ffmpeg-devel mailing list