Opened 17 months ago

Last modified 17 months ago

#11540 new defect

Audio artifacts in hls/dash segments

Reported by: Mike Owned by:
Priority: normal Component: ffmpeg
Version: 7.1 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Mike)

When generating a segmented audio live stream (hls/dash), ffmpeg introduces inaudible artifacts in segments, at the beginning and at the end of each segment. This results in audio peaking over 0dB.

It's happening with both hls and dash outputs, regardless of the audio input type (file, pipe, device) or audio codec input/output (tested with AAC, libopus, libmp3lame). Also, the output codec container doesn't seem to make a difference: I've tested with mpeg-ts and webm.

Also, this is not operating system specific, it happens on MacOS and a few linux distros as well, on both arm64 and x86-64. Tested with ffmpeg version 5.1.6 up to 7.1.

How to reproduce:

% ffmpeg \
  -y \
  -fflags +nobuffer \
  -analyzeduration 1000000 \
  -probesize 32768 \
  -i "input_file_here" \
  -map 0:a -c:a:0 aac -b:a:0 64k \
  -map 0:a -c:a:1 aac -b:a:1 128k \
  -map 0:a -c:a:2 aac -b:a:2 192k \
  -var_stream_map "a:0,name:64k a:1,name:128k a:2,name:192k" \
  -master_pl_name stream.m3u8 \
  -hls_segment_type mpegts \
  -hls_segment_filename "destination_folder/stream_%v_%03d.ts" \
  -lhls 1 \
  -hls_init_time 2 \
  -hls_time 3 \
  -movflags +faststart \
  -tune zerolatency \
  -remove_at_exit 1 \
  -f hls \
  "destination_folder/stream_%v.m3u8"

...and then check the audio spectogram of a few segments.

Attachments (2)

beginning of the segment.jpg (1.1 MB ) - added by Mike 17 months ago.
end of segment.jpg (1.1 MB ) - added by Mike 17 months ago.

Change History (3)

comment:1 by Mike, 17 months ago

Description: modified (diff)

by Mike, 17 months ago

by Mike, 17 months ago

Attachment: end of segment.jpg added
Note: See TracTickets for help on using tickets.