Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VBR files #9

Open
nazar-pc opened this issue Jul 8, 2014 · 4 comments
Open

VBR files #9

nazar-pc opened this issue Jul 8, 2014 · 4 comments

Comments

@nazar-pc
Copy link

nazar-pc commented Jul 8, 2014

I've reported here: audiocogs/aurora.js#83
But it turns out that VBR mp3 files are not supported.
libmad on which mp3.js is based is very old and doesn't support modern files.
I was browsing few hours, but there is nothing here I can do in order to fix this (i've tried to play with emscripten, but no luck with some mp3 decoders.
Is there any chance to have alternative decoder, that will support all modern mp3 files?

@devongovett
Copy link
Member

Have you confirmed that libmad cannot decode the file you linked to in audiocogs/aurora.js#83? I want to be sure the issue is VBR, because I thought I had written code for that a while ago.

@nazar-pc
Copy link
Author

nazar-pc commented Jul 8, 2014

I didn't found easy way to try libmad, all maintained software moved to another decoders.
Actually, that file in audiocogs/aurora.js#83 has CBR, VBR support I've tested on:
https://dl.dropboxusercontent.com/u/62195352/Taylor%20Swift%20-%20Untouchable%20%28Luna%20Halo%29.mp3

Generally I have such output in console while debugging Firefox OS app:

Error: Invalid sampling frequency ac.mp3.js:495
Error: Invalid bitrate ac.mp3.js:484
Error: Invalid layer ac.mp3.js:475
Error: Invalid bitrate ac.mp3.js:484
Error: Invalid layer ac.mp3.js:475
Error: Invalid bitrate ac.mp3.js:484
Error: Invalid sampling frequency ac.mp3.js:495
Error: Invalid bitrate ac.mp3.js:484
UnderflowError: 
Error: Invalid sampling frequency ac.mp3.js:495
Error: Invalid bitrate ac.mp3.js:484
Error: Invalid layer ac.mp3.js:475
UnderflowError: 
Error: Invalid bitrate ac.mp3.js:484
Error: Invalid sampling frequency ac.mp3.js:495
Error: Invalid layer ac.mp3.js:475

More than half of files play nicely, but others fails with various errors.
I've tried to patch mp3.js substituting known CBR and sampling frequency (obtained from other software), but anyway I didn't get anything other than UnderflowError

@devongovett
Copy link
Member

There's a command line player called madplay that you can install on most OSes using a package manager (e.g. homebrew on mac, apt-get on linux).

I know I have VBR files that work with mp3.js, I just tested one, so I'm not sure what's wrong with this file. It seems more than just the bitrate is corrupted in some of the frames too, given the Invalid sampling frequency errors and Invalid layer errors there too. Perhaps other mp3 decoders just skip the frame instead of throwing an error?

@nazar-pc
Copy link
Author

nazar-pc commented Jul 8, 2014

I've tried madplay, it just fails (Ubuntu 14.10 x64), probably supposed to work with older sound sub-systems:

nazar-pc@nazar-pc:~$ madplay '/media/Data/ABGT075.mp3' 
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
audio: No such file or directory

I've tried to comment out errors throwing, it doesn't work either. No success with that files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants