VLC can't open mp4 file with OPUS/CBR

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Pavel Aronov
New Cone
New Cone
Posts: 3
Joined: 10 Dec 2019 15:13

VLC can't open mp4 file with OPUS/CBR

Postby Pavel Aronov » 12 Dec 2019 11:20

VLC can't open mp4 file with OPUS/CBR. The error is following:
[00007f8cb0c04c60] opus decoder error: Error: corrupted stream?
[00007f8cb0c04c60] main decoder error: buffer deadlock prevented

The same file can be played with Chrome, Firefox and ffplay.

This file was created with following command:
ffmpeg -ss 00:00:00 -i ff-16b-2c-44100hz.opus.ogx -t 00:00:10 -codec libopus -vbr off -frame_duration 10 -strict -2 opus_cbr_10.mp4

Link to source file (but any other audio can be used for that):
https://dl.espressif.com/dl/audio/ff-16b-2c-44100hz.opus

Link to result file:
http://redbaron.atwebpages.com/media/opus_cbr_10.mp4

When mp4 file is created with vbr, then there is no such issue and VLC plays it well.

If VLC is rebuilt with following patch, then VLC plays opus_cbr_10.mp4 well.

Code: Select all

--- modules/demux/mp4/mp4.c 2019-12-12 12:58:53.775303509 +0300 +++ modules/demux/mp4/mp4_new.c 2019-12-12 12:59:04.292969877 +0300 @@ -3743,6 +3743,7 @@ case VLC_CODEC_DTS: case VLC_CODEC_MP4A: case VLC_CODEC_A52: + case VLC_CODEC_OPUS: i_max_v0_samples = 1; break; /* fixme, reverse using a list of uncompressed codecs */
So, is it a bug in VLC or it is, indeed, corrupted stream?

Lotesdelere
Cone Master
Cone Master
Posts: 9874
Joined: 08 Sep 2006 04:39
Location: Europe

Re: VLC can't open mp4 file with OPUS/CBR

Postby Lotesdelere » 12 Dec 2019 19:36

Link to result file:
http://redbaron.atwebpages.com/media/opus_cbr_10.mp4

This file is not valid, it's 10 seconds long while the source file is 3 minutes and 7 seconds long.

Pavel Aronov
New Cone
New Cone
Posts: 3
Joined: 10 Dec 2019 15:13

Re: VLC can't open mp4 file with OPUS/CBR

Postby Pavel Aronov » 12 Dec 2019 19:51

This file is not valid, it's 10 seconds long while the source file is 3 minutes and 7 seconds long.
It was deliberately cut with ffmpeg options -ss 00:00:00 and -t 00:00:10 just to make the result file shorter.
If you omit these options, then the result file will be 3:07. I can provide it, if it matters. But the problem is, that the duration is not relevant to the issue, VLC stil will not be able to open it.

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: VLC can't open mp4 file with OPUS/CBR

Postby InTheWings » 18 Dec 2019 10:08



If VLC is rebuilt with following patch, then VLC plays opus_cbr_10.mp4 well.

Code: Select all

--- modules/demux/mp4/mp4.c 2019-12-12 12:58:53.775303509 +0300 +++ modules/demux/mp4/mp4_new.c 2019-12-12 12:59:04.292969877 +0300 @@ -3743,6 +3743,7 @@ case VLC_CODEC_DTS: case VLC_CODEC_MP4A: case VLC_CODEC_A52: + case VLC_CODEC_OPUS: i_max_v0_samples = 1; break; /* fixme, reverse using a list of uncompressed codecs */
So, is it a bug in VLC or it is, indeed, corrupted stream?
Sounds like it needs that fix, but it only depends on muxer as we already have opus in mp4 working :/
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

Pavel Aronov
New Cone
New Cone
Posts: 3
Joined: 10 Dec 2019 15:13

Re: VLC can't open mp4 file with OPUS/CBR

Postby Pavel Aronov » 24 Dec 2019 13:06

Sounds like it needs that fix, but it only depends on muxer as we already have opus in mp4 working :/
So, if it needs that fix, will it be fixed? The suggested patch is very simple though there may be a better solution.

jarnos
New Cone
New Cone
Posts: 3
Joined: 17 Mar 2020 16:12

Re: VLC can't open mp4 file with OPUS/CBR

Postby jarnos » 03 Oct 2023 12:03

I also noticed this issue by Android and Linux versions. Android is up to date so it seems this is not fixed.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 30 guests