-
Notifications
You must be signed in to change notification settings - Fork 24
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
UnsupportedFormatError #24
Comments
@donv thanks! It looks like the error message is correct, and this is a Wave file format that the gem doesn't support. The audio format code is 49, which is not a support format. (Typical PCM files have an audio format code of 1, and IEEE Float files have an audio format code of 3). I'm not sure what format code 49 means - do you know what wave file format this is in, or how the file was created? If you are interested, check out
Thanks for the suggestion about including more info in the error message about the why a Wave file isn't supported. That seems like a good idea, so I'll think about if there is a possible way to do that in the future. |
I thought the best place to put this would be here, I am using your library for extracting certain metadata out of WAV files as they are uploaded. However I've come across a strange one with a wav file that is of standard format, however your info script returns not supported, so I used FFMPEG to get more details:
Could this be that wav's from Pro Tools are not a supported type? Anything we / I can do about this? Thanks! |
Just as a follow up I have noticed the mismatch in the bitrates on the Duration line not sure how this can be fixed :s FYI this is the FFMPEG output of a file that worked fine.
|
@CromonMS Thanks for the heads up! Unfortunately it's not clear to me from the output above what the problem with the file is. What is the output from the |
So I did a bit of messing around, although makes things a little tricky in the app I'm working on and seems like a strange quirk of Pro Tools, sadly I don't work on that DAW so I cannot really delve into that side of it. Anyways here are some testing results: So for the first example (Pro Tools File) I got:
The Second example (Logic File):
I then ran a simple ffmpeg encode on the first file
Then I get the expected result
The new ffmpeg output supports this too, with matching bitrates as you can see here:
A very strange edge case indeed I think. |
@CromonMS Behind the scenes in the In the repo there's a |
Sure thing (Pro Tools file):
And for comparison (Logic File):
|
@CromonMS Thanks! Based on that I think I see the problem. The Pro Tools file seems to be a in non-standard format. Specifically, the format chunk seems to be larger than expected. When a format chunk has an audio format code of After looking into it and verifying with a test case, I think the gem can be changed to allow reading files like this without raising an error. I opened #33 to track the fix. Thanks for raising this as an issue! |
Hi!
Thank you for working on this excellent library!
I am getting an UnsupportedFormatError when reading the included file. Is this truly an unsupported file format, or am I maybe doing something wrong when reading it?
wav.zip
The exception I get does not include a message with any details of the format. That would be nice.
The text was updated successfully, but these errors were encountered: