Opened 8 hours ago
Last modified 6 hours ago
#11423 new defect
Remuxing webm to opus adds silence to opus stream
Reported by: | y1dj1sqd | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | webm opus remux |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When extracting the opus stream from a .webm file to a .opus file it does change the duration of the opus stream.
The extracted stream starts delayed and it adds some additional silence to the end.
How to reproduce:
% yt-dlp -f 251 "https://www.youtube.com/watch?v=dQw4w9WgXcQ" % ffmpeg -i "Rick Astley - Never Gonna Give You Up (Official Music Video) [dQw4w9WgXcQ].webm" -c copy out.opus
For comparison doing the same with mkvextract does output a stream which is perfectly in sync and the exact same duration as the input:
% mkvextract "Rick Astley - Never Gonna Give You Up (Official Music Video) [dQw4w9WgXcQ].webm" tracks 0:out2.opus
ffmpeg versions tested (both affected)
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
ffmpeg version N-118315-g4f3c9f2f03-20250116 Copyright (c) 2000-2025 the FFmpeg developers
Change History (3)
comment:1 by , 8 hours ago
Cc: | removed |
---|
comment:2 by , 6 hours ago
comment:3 by , 6 hours ago
It is not gapless without a container?
Idk but I guess the raw stream is not gapless.
I'm not sure how to test without a container. Do you have a simple example?
Or can you test with the given example above?
Inserts priming and remainder.
Yes I guess it does add this but usually there should be some metadata which tells the player to skip those. But I'm no expert so not sure how exactly opus does it.
The only thing I know for now is that the files generated by mkvextract do play gapless but the files generated by ffmpeg do not.
Both add the same "Pre-skip" value to the opus file but only ffmpeg has added gaps.
It is not gapless without a container? Inserts priming and remainder. That is how it is called and it is always the case with lossy audio codecs.