Opened 10 months ago
#10463 new defect
HLS with fragmented mp4 muxing: audio-only stream not signaling encoder delay
Reported by: | John Regan | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When producing an audio-only HLS stream with fragmented mp4, the initialization segment has an Edit List box, but the media_time is set to 0. So stream consumers are unaware of any priming samples that need to be discarded.
How to reproduce:
Generate an audio-only hls stream
% ffmpeg -f lavfi -i anullsrc=r=48000:d=10 -c:a aac -f hls -hls_segment_type fmp4 -hls_time 1 hls/stream.m3u8
Then inspect the generated init.mp4 file. Using boxdumper from l-smash, here's the edit list box:
[edts: Edit Box] position = 244 size = 36 [elst: Edit List Box] position = 252 size = 28 version = 0 flags = 0x000000 entry_count = 1 entry[0] segment_duration = 0 media_time = 0 media_rate = 1.000000
In this case, the media_time should be 1024, since that's how many priming samples the native aac encoder adds.
ffmpeg version:
% ffmpeg -version ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13.1.1 (GCC) 20230429 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-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --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 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100
Note:
See TracTickets
for help on using tickets.