Home Detecting audio file integrity with python
Reply: 0

Detecting audio file integrity with python

user815
1#
user815 Published in July 18, 2018, 10:29 pm

If I download an audio file from the web and something bad happens to the download process, how does one efficiently detect that the audio file is incomplete with python?

There are some ideas, such as using the file command in linux:

file audio.mp4

But it recognizes that it's mp4:

audio.mp4: ISO Media, MPEG v4 system, version 2

Even mplayer detects the mp4 audio type, but fails when trying to play. I don't think launching mplayerfrom python and checking if it failed is a scalable solution though.

Here is a sample of broken file: https://www.dropbox.com/s/5rpscb9r1xrrx4t/They

The sample above fails with mutagen and mp4file, causing them to hang indefinitely. It has to do with fileObject.tell().

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.329344 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO