Opened 7 months ago
Closed 5 weeks ago
#11031 closed defect (fixed)
CMAF MP4 not skipping priming samples for audio tracks
Reported by: | derrod | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mov |
Cc: | derrod | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When muxing an audio stream to a CMAF file, edit lists get disabled unless explicitly enabled (which prints a warning message). While they are not necessary for video due to negative CTS offsets being enabled, audio still requires them to skip "priming" samples produced particularly by AAC and Opus encoders.
When muxing an audio stream that has priming samples (e.g. 2112 when using the AudioToolbox AAC encoder) into a CMAF ISO file the edit list will be missing and the first 2112 samples of silence will not be skipped, resulting in A/V desync.
I do not have access to the CMAF spec so I cannot check what the current intended solution is. The 2016 draft does say that an edit list "SHOULD" be used to deal with audio data before presentation time 0 and names priming as an example.
How to reproduce:
# base file % ffmpeg -f lavfi -i sine -c:a aac_at -t 10 audio_test.mp4 # mux with CMAF enabled % ffmpeg -i audio_test -c copy -movflags cmaf+delay_moov audio_test_cmaf.mp4 # remux to regular MP4, which will play 2112 additional samples of silence at the start (44 ms at 48 kHz) % ffmpeg -i audio_test_cmaf.mp4 -c copy audio_test_remuxed.mp4
Change History (2)
comment:1 by , 6 weeks ago
comment:2 by , 5 weeks ago
Keywords: | mov added; fmp4 cmaf removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Should be fixed in ecc7d5db9c8a1aaccc876dc4b549558eadfe140a.
So the issue is only there? -c copy must copy edit lists, I agree