[FFmpeg-trac] #10112(avformat:new): HLS Demuxer - Live Playlists needlessly re-download initialization segment
FFmpeg
trac at avcodec.org
Tue Dec 20 01:00:59 EET 2022
#10112: HLS Demuxer - Live Playlists needlessly re-download initialization segment
-------------------------------------+-------------------------------------
Reporter: John Regan | Type: defect
Status: new | Priority: normal
Component: avformat | Version:
| unspecified
Keywords: HLS hls | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Hi there - I noticed when playing HLS playlists, ffplay (and apps using
libavformat) will re-download the initialization segment for each new
media segment added to the list. This causes some warnings to appear, and
essentially doubles the number of HTTP requests made during a live
playlist.
The warning messages are for duplicated MOOV atoms:
{{{
[http @ 0x7fc4e8008a40] Opening 'http://127.0.0.1:8080/init.mp4' for
reading
[hls @ 0x7fc4e8000c80] Opening 'http://127.0.0.1:8080/stream4.m4s' for
reading
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc4e80076c0] Found duplicated MOOV Atom.
Skipped it
[http @ 0x7fc4e8101f40] Opening 'http://127.0.0.1:8080/stream.m3u8' for
reading
[hls @ 0x7fc4e8000c80] Skip ('#EXT-X-VERSION:7')
[http @ 0x7fc4e8008a40] Opening 'http://127.0.0.1:8080/init.mp4' for
reading
[hls @ 0x7fc4e8000c80] Opening 'http://127.0.0.1:8080/stream5.m4s' for
reading
[http @ 0x7fc4e8025480] Opening 'http://127.0.0.1:8080/stream6.m4s' for
reading
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc4e80076c0] Found duplicated MOOV Atom.
Skipped it
}}}
How to reproduce:
{{{
% ffmpeg -i http://something-live.example -c:a aac -vn -f hls
-hls_segment_type fmp4 /path/to/folder/stream.m3u8
# in another terminal serve /path/to/folder
% python -m http.server --directory /path/to/folder 8080
# play the stream
% ffplay http://127.0.0.1:8080/stream.m3u8
}}}
ffmpeg info from my machine:
{{{
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto
--enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-
ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b
--enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi
--enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-
libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-
libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-
libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-
libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-
shared --enable-version3 --enable-vulkan
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10112>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list