-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AudioFileClip bombs on file read #158
Comments
This case is supposed to work. What's the error message exactly ? |
And then a list of the information returned by ffmpeg. I don't have the exact information available right now, I can get that later if it would be useful. |
Can you send a link to a file that doesn't work ? |
Here it is: http://traffic.libsyn.com/geeknights/20150414.mp3 Warning: it's a 64mb file. Also, I looked at the console printout a little more carefully. It prints an error about "failed to read video dimensions" but doesn't crash there. Later on, in line 305:
|
I have encounter the same issue, AudioFileClip can't read mp3 file, but when i put a video file, it works fine! It's a very weird problem. here is my code: here is the except: |
I can take a crack at resolving this @Zulko, if you wouldn't mind. If you're processing an audio file, there won't necessarily be video data, but there may be. So in that case, it's not the end of the world (and worth crashing over) if there isn't a preview image or what have you. |
Thanks ! I'd be happy to review your PR. |
Related: #157
I am trying to create an AudioFileClip from an mp3 file like so:
On line 275 of ffmpeg_reader.py, it looks like whether a file is video or not is determined by whether there is the string " Video: " anywhere in the result from ffmpeg. At least in my case, this is throwing false positives. This is the string that triggers it for me:
I think the "video" is the album artwork. Anyway, this causes ffmpeg_reader to think it's a video file instead of audio, and try to extract video dimensions. Needless to say, those don't exist, and it throws an exception when it can't find them.
I am only interested in the audio data, not the png, whatever that is. Is there a way to make ffmpeg_reader a little smarter about what kind of file it's looking at?
The text was updated successfully, but these errors were encountered: