No sound while playing webm or mkv file with opus codec
Any video downloaded from youtube with youtube-dl with codecs vp9 + opus.
Example:
$ youtube-dl -o test -f 242+250 https://www.youtube.com/watch?v=jNQXAC9IVRw
[youtube] jNQXAC9IVRw: Downloading webpage
[download] Destination: test.f242
[download] 100% of 378.64KiB in 00:00
[download] Destination: test.f250
[download] 100% of 153.83KiB in 00:00
[ffmpeg] Merging formats into "test.webm"
Deleting original file test.f242 (pass -k to keep)
Deleting original file test.f250 (pass -k to keep)
$ mkvmerge -o test.mkv test.webm
mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
'test.webm': Using the demultiplexer for the format 'Matroska'.
'test.webm' track 0: Using the output module for the format 'VP8/VP9'.
'test.webm' track 1: Using the output module for the format 'Opus'.
The file 'test.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 0 seconds.
$ mkvextract test.mkv tracks 1:test.ogg
Extracting track 1 with the CodecID 'A_OPUS' to the file 'test.ogg'. Container format: Ogg (Opus in Ogg)
Progress: 100%
$ mkvmerge -o test2.mkv test.ogg
mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit
'test.ogg': Using the demultiplexer for the format 'Ogg/OGM'.
'test.ogg' track 0: Using the output module for the format 'Opus'.
The file 'test2.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 0 seconds.
Playing in vlc:
- test.webm: video without sound;
- test.mkv: video without sound;
- test.ogg: sound without video;
- test2.mkv: no video and no sound. Other players (mplayer, mpv with or without smplayer) playing this video with sound. Other mkv video files with AC3 (for example) audio track playing in vlc with sound.
$ vlc -l | grep -iE 'matroska|opus'
VLC media player 3.0.10 Vetinari (revision 3.0.10-0-g7f145afa84)
mkv Matroska stream demuxer
opus Opus audio decoder
opus Opus audio encoder
OS: FreeBSD 12.1 amd64.