Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.43k stars 788 forks source link

When Splitting a special Opus file, it will generate incorrect instantaneous noise #605

Open op200 opened 3 months ago

op200 commented 3 months ago

It must be said that the conditions for this bug to occur are quite strange. When using ffmpeg to output opus, if this opus audio is encapsulated in '.opus' instead of '.mka' or '.mkv', and then MKVToolNix is used to encapsulate this '.opus' file, this bug will occur.

First, use ffmpeg to encode the original audio as opus, and note that the output here is '. opus'
ffmpeg -i inputAudio.m4a -c:a libopus -b:a 80k outputAudio.opus

Then use MKVToolNix to package the '. opus' file as mkv or mka

Finally, use LAV Splitter to decode this mkv, the bug will appear. You will hear instantaneous noise occurring at some times. the_opus_bug_with_lav.zip 2:36 5:12 7:47 10:24 13:00 ......
The volume of each noise is different.

Based on my tests, only LAV Splitter will cause this problem.


Original audio :

Audio  
ID : 2 
Format : AAC LC 
Format/Info : Advanced Audio Codec Low Complexity 
Codec ID : A_AAC-2 
Duration : 23 min 50 s 
Bit rate : 128 kb/s 
Channel(s) : 2 channels 
Channel layout : L R 
Sampling rate : 44.1 kHz 
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 21.8 MiB (2%)
Default : Yes 
Forced : No 

FFmpeg output file (audio.opus) :

General  
Format : Ogg 
File size : 13.2 MiB 
Duration : 23 min 50 s 
Overall bit rate : 77.6 kb/s 
Writing application : Lavc61.3.100 libopus 
BPS-eng : 128000 
DURATION-eng : 00:23:50.070000000 
NUMBER_OF_FRAMES-eng : 61588 
NUMBER_OF_BYTES-eng : 22881130 
_STATISTICS_WRITING_APP-eng : no_variable_data 
_STATISTICS_WRITING_DATE_UTC-eng : 1970-01-01 00:00:00 
_STATISTICS_TAGS-eng : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 

Audio  
ID : 1779984567 (0x6A1868B7) 
Format : Opus 
Duration : 23 min 50 s 
Channel(s) : 2 channels 
Channel layout : L R 
Sampling rate : 48.0 kHz 
Compression mode : Lossy 
Writing library : Lavf61.1.100