Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playback support for 'Mixcloud' WebM (Opus) audio files (Read 2737 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Playback support for 'Mixcloud' WebM (Opus) audio files

I can download WebM (Opus) files from YouTube (etc.) and they will play fine on Foobar200 (or any other application I have tried recently). Ditto for trans-coding.  8)

However, this is not the case with the equivalent over at Mixcloud. The WebM file will not play in Foobar2000 or VLC/Groove. Foobar2000 does not crash (unlike VLC) but it will not play of trans-code any WebM downloaded from Mixcloud via any method.  :'(

There is no error message given by Foobar2000. I have even extracted the Opus audio stream from the WebM container and this won't play on any audio player either. So it must be an issue with the Opus audio itself.

The only possible clue to what the issue revolves around (in addition to the above observation) is that all the Mixcloud WebM files will play without any issues in any browser I have tried so far (Chrome, Edge, Opera or Firefox).

Note: I manually open the WebM file on my PCs HDD in a web browser. It plays normally with the built in player in a tab. I don't stream anything from the internet at this point. I'm not using the Mixcloud website or web-page. It's all done 'offline' via the browsers' HTML5 audio player.

If this playback issue could be resolved, it would be much more convenient than using Firefox etc. to play any audio files downloaded from Mixcloud*.  ;D

*I know that there is always the option of downloading the m4a version. But the audio quality on Mixcloud of these (generally they are 64Kbps AAC/SBR or AAC/LC) whilst 'OK'... are noticeably inferior to the WebM/Opus versions they offer nowadays. They lack many of the the higher frequencies. Even to my humble ears!

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #1
Can you upload one of the problem files somewhere so we can take a look at it?


Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #3
I have an update that might help diagnose the problem.
On another forum where I asked for some help, it seems that ffmpeg will extract the Opus audio from the WebM container and it plays without issue on Foobar2000.
Note that I had not been able to achieve this when extracting with gMKVExtractGUI.exe - the Opus file would not play on Foobar2000 or anything else.
So perhaps the issue relates to the WebM container that Mixcloud creates?

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #4
"File verification warning: No seekhead present"

This one? https://www.mixcloud.com/andidurrant/the-dance-music-archive-2122-1992-2002/

I'm unfamiliar with Mixcloud. Do they even offer downloads for subscribers/"premium members" or whatever?
If you just used some random dodgy tool to grab the stream, ...

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #5
Yes that is the one.

I'm using yt-dlp.exe to download the audio. But I also get the same results with youtube-dl.exe. It's the Mixcloud file that is the problem (in my opinion), not the software that is downloading it. YT audio files etc. work just fine.

I don't think they offer downloads (Soundcloud style) even when being a premium user of Mixcloud. They never have. I just prefer to listen to the streams offline, or on devices without internet connectivity.

For now I'll use ffmpeg to extract the Opus audio from the WebM, that's doing the job and playing just fine on Foobar2000. I can also now use Foobar2000 to transcode to other codecs for use on other devices. So I'm happy  ;D 

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #6
It's the Mixcloud file that is the problem (in my opinion), not the software that is downloading it.
I am not sure if that is correct. Mixcloud will serve you a bunch of fragments of the form
https://audio11.mixcloud.com/secure/dash_multi/,b/d/2/e/accd-cec1-4c98-ad68-0bbac41c45c8-64K,b/d/2/e/accd-cec1-4c98-ad68-0bbac41c45c8-192K,.m4a.urlset/fragment-25-f2-a1-x3.webm
https://audio11.mixcloud.com/secure/dash_multi/,b/d/2/e/accd-cec1-4c98-ad68-0bbac41c45c8-64K,b/d/2/e/accd-cec1-4c98-ad68-0bbac41c45c8-192K,.m4a.urlset/fragment-26-f2-a1-x3.webm
and the downloader will patch them together in the end.
I could grab a .webm file that would play just fine.

Also, at 192 kbit/s ... before you say you can hear any differences, try https://www.foobar2000.org/components/view/foo_abx . But if your downloader would serve you the AAC stream in much lower resolution, there might be a chance.

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #7
Okay, thanks.

I was comparing audio of a music stream/mix that was low pass filtered 64Kbps AAC/LC (13KHz) versus a (160 or 192Kbps?) Opus version of the same stream/mix. That was low pass filtered at 16KHz. So assuming that is a common theme on Mixcloud, I shall always try to grab the WebM/Opus.

What program did you use to grab the WebM?

I have tried several downloading programs but was not able to play the files in Foobar2000/etc. (unless I extracted the Opus using ffmpeg).

With YT sourced files, I have never had that issue and I did not need to extract the Opus beforehand.

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #8
Just got your PM - thanks!

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #9
FWIW the sample you provided played fine as-is without extraction in both MusicBee and AIMP--the latter with the manual addition of baswebm.dll as a "plugin" in my case to replace the built-in ffmpeg one which I don't use.  Both of these use the BASS audio library; the basswebm.dll file is the active component in cases like this.

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #10
These files violate Matroska format specification, have Cluster elements at level 0 (top) while they should be inside a Segment. The Segment can be flagged as infinite-length if the muxer cannot tell its size in advance.

Not even mkvtoolnix is able to read them correctly.

FFmpeg seems to be able to process these; I recommend using FFmpeg to remux your files without reencoding:
ffmpeg -i badfile.webm -c copy goodfile.opus
Or:
ffmpeg -i badfile.webm -c copy goodfile.mka
The resulting files will play correctly in all players that support the format.
Microsoft Windows: We can't script here, this is bat country.

Re: Playback support for 'Mixcloud' WebM (Opus) audio files

Reply #11
These files violate Matroska format specification, have Cluster elements at level 0 (top) while they should be inside a Segment. The Segment can be flagged as infinite-length if the muxer cannot tell its size in advance.

Not even mkvtoolnix is able to read them correctly.

FFmpeg seems to be able to process these; I recommend using FFmpeg to remux your files without reencoding:
ffmpeg -i badfile.webm -c copy goodfile.opus
Or:
ffmpeg -i badfile.webm -c copy goodfile.mka
The resulting files will play correctly in all players that support the format.

Thanks. That is now my 'workaround'. FFmpeg does the job and as you say, no re-encoding is needed here :)