[FFmpeg-devel] FIX: HLS Discontinuity / Non-Monotonous DTS
ffmpeg at tmm1.net
Wed May 16 02:50:34 EEST 2018
On Tue, Mar 20, 2018 at 7:46 AM, Joe Koberg <joe at koberg.us> wrote:
> On Fri, Mar 16, 2018 at 11:14 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
> > 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
> 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.
I tried adding AVFMT_TS_DISCONT to ff_hls_demuxer locally, and most of the
warnings in your remux test went away. The output.mp4 appears to play back
AFAIK there is no other difference between the mpegts demuxer and the hls
demuxer, and your description of how hls.c is correct.
> for reference, new command was:
> cat `grep '.ts$' discont_test.m3u8` | ffmpeg -f mpegts -i - -c
> copy output000.mp4
> Joe Koberg
> joe at koberg.us
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel