[FFmpeg-trac] #7034(avformat:new): HLS does not demux entire clip if start_time > 0
FFmpeg
trac at avcodec.org
Wed Feb 21 16:24:52 EET 2018
#7034: HLS does not demux entire clip if start_time > 0
----------------------------------+--------------------------------------
Reporter: ronag | Type: defect
Status: new | Priority: important
Component: avformat | Version: git-master
Keywords: hls http | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
Summary of the bug:
The hls demuxer doesn't seem to play the entire file. From what i can see
it seems to play "duration - start_time" time of the file. I've reproduced
this on multiple different files.
If I simply play the .ts file everything works fine. However, if I play
the m3u8 file I seem to be missing "start_time" time in the end, i.e. the
file is ~5.4s but it stops at ~4s.
It seems to me that the demuxer seems to do "frame->pts += start_time" and
then stop outputting packets once "frame->ts + start_time >= duration".
However, "frame->pts" already includes start_time so somehow start_time
gets added into "frame->pts" twice.
How to reproduce:
{{{
cd ffmpeg
npm i -g http-server
http-server .
ffplay -i http://localhost:8080/file/M6nmzk2FDeesWy.m3u8
}}}
{{{
C:\Users\Boffins\Desktop\CasparCG 2.2.0>ffplay.exe -i
http://localhost:8080/file/M6nmzk2FDeesWy.m3u8
ffplay version N-90061-gfb580731c1 Copyright (c) 2003-2018 the FFmpeg
developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-
libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-
cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2
--enable-avisynth
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 11.101 / 58. 11.101
libavformat 58. 9.100 / 58. 9.100
libavdevice 58. 1.100 / 58. 1.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[hls,applehttp @ 000002343b33dd80] Opening
'http://localhost:8080/file/M6nmzk2FDeesWy.ts' for reading
[hls,applehttp @ 000002343b33dd80] Opening
'http://localhost:8080/file/M6nmzk2FDeesWy.ts' for reading
Input #0, hls,applehttp, from
'http://localhost:8080/file/M6nmzk2FDeesWy.m3u8':
Duration: 00:00:05.40, start: 1.458667, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp
Metadata:
variant_bitrate : 0
5.39 A-V: -5.723 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7034>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list