Keiyakusha
19th June 2019, 15:22
Hey guys I need your help figuring out what is going on.
Below is a test file "test.opus" (but I see the same results with any file)
https://www.dropbox.com/s/40d2kylu1p8gz6l/test.opus?dl=0
Now let's make a webm out of it (ffmpeg -i test.opus -c copy test.opus.webm)
Now let's extract our opus back using tho methods, mkvextract and ffmpeg (ffmpeg -i test.opus.webm -c copy test.opus.webm-ffmpeg_extracted.opus)
so we get these 3 files:
1) test.opus
2) test.opus.webm-ffmpeg_extracted.opus
3) test.opus.webm-toolnix_extracted.opus
now let's run opusdec on each of them (opusdec in.opus out.wav) and see the results:
1) wav PCM that is 341461 samples long
2) wav PCM that is 342408 samples long
3) wav PCM that is 341461 samples long
The question is, why 2nd file never matches the original? And most importantly, how do I prevent this?
Some other tests gave me ~24 samples mismatch, but this one is way off.
Note that here I created webm's using ffmpeg, however if i would do it with mkvtoolnix
the whole picture would be like so:
ffmpeg extracts file created by ffmpeg -> length mismatch compared to reference
ffmpeg extracts file created by mkvtoolnix -> mismatch compared to BOTH reference and previous result
mkvtoolnix extracts both files -> both files match the reference
Edit: the results are reproducible in foobar by simply playing both reference opus and muxed webm (because foobar uses ffmpeg to demux webm)
Below is a test file "test.opus" (but I see the same results with any file)
https://www.dropbox.com/s/40d2kylu1p8gz6l/test.opus?dl=0
Now let's make a webm out of it (ffmpeg -i test.opus -c copy test.opus.webm)
Now let's extract our opus back using tho methods, mkvextract and ffmpeg (ffmpeg -i test.opus.webm -c copy test.opus.webm-ffmpeg_extracted.opus)
so we get these 3 files:
1) test.opus
2) test.opus.webm-ffmpeg_extracted.opus
3) test.opus.webm-toolnix_extracted.opus
now let's run opusdec on each of them (opusdec in.opus out.wav) and see the results:
1) wav PCM that is 341461 samples long
2) wav PCM that is 342408 samples long
3) wav PCM that is 341461 samples long
The question is, why 2nd file never matches the original? And most importantly, how do I prevent this?
Some other tests gave me ~24 samples mismatch, but this one is way off.
Note that here I created webm's using ffmpeg, however if i would do it with mkvtoolnix
the whole picture would be like so:
ffmpeg extracts file created by ffmpeg -> length mismatch compared to reference
ffmpeg extracts file created by mkvtoolnix -> mismatch compared to BOTH reference and previous result
mkvtoolnix extracts both files -> both files match the reference
Edit: the results are reproducible in foobar by simply playing both reference opus and muxed webm (because foobar uses ffmpeg to demux webm)