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: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions? (Read 2578 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Is there a program available that will scan a directory of files with audio extensions (any, such as .mp3, .m4a, etc.) and detect (and hopefully list for deletion) any files which are anything else?

I don't need the program to tell me any information about an file except that, only that binary information whether it is or is not an audio file.

Thanks.

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #1
Which OS?  On Linux, you could simply use 'file'

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #2
When you say "scan a directory", I guess you have a ton of them?

Not sure if these would be first choices, but they are what I know for Windows.

* foobar2000 has become much better at indexing damaged files and warning the user. Once upon a time I used empty files named 01 - radio intro missing.mp3 as placeholders, and some time fb2k started yelling at me ... good!
But I just checked: It discovers more in the media library, than if you drag it into a playlist window. And rescanning does not always help. So you probably want a fresh portable install, and then configure the media library to index the folders, and wait for the "Show errors" button to light up.

* https://mediaarea.net/en/MediaInfo .  Drag and drop the whole lot into there. File -> Export. Choose suitable export format. I suggest you try HTML first, then you see what info it has. Search for "General" to find files that are just general files. Then you can start looking at some other export format (CSV?) and use a text editor to filter away lines which belong to audio files.
But beware that MediaInfo doesn't know all audio file types. So you don't want to delete just because it doesn't identify. Rather you want to check those closer.

* Audiotester.exe from http://www.vuplayer.com/other.php may help, but does not support everything. if you can search up all files of "kind:.mp3", get a count, drag and drop the whole lot into the Audiotester window, and check that it actually runs through all. But it doesn't support MP4 (including .m4a).

* VLC will try to look for audio/video content in any file you dump into it.  Take a closer look at those which show no duration. But if you try to play them, VLC might lock up.


Beware also that if you have botched renamings, they might be "audio to audio". Like, raw AAC renamed ".m4a". Or if someone renames an MP4 to ".mp3" and you drop it into the Audiotester window, it will appear to be corrupt even if it is a perfectly fine file with just the wrong name. Renaming ".mp2" to ".mp3" is an old trick to make dumb portable players start playing them.

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #3
You can load the files in a tag editor like Mp3tag and sort them by some audio property, which will make the non-audio files stand out. From there you can delete them directly.


Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #5
You can load the files in a tag editor like Mp3tag and sort them by some audio property, which will make the non-audio files stand out. From there you can delete them directly.

Excellent idea! Thanks. A non-audio file will not have a necessary characteristic. I just hope it will not choke. My SongKong chokes, and suspends, and I don't know which file caused it.

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #6
When you say "scan a directory", I guess you have a ton of them?

Not sure if these would be first choices, but they are what I know for Windows.

* foobar2000 has become much better at indexing damaged files and warning the user. Once upon a time I used empty files named 01 - radio intro missing.mp3 as placeholders, and some time fb2k started yelling at me ... good!
But I just checked: It discovers more in the media library, than if you drag it into a playlist window. And rescanning does not always help. So you probably want a fresh portable install, and then configure the media library to index the folders, and wait for the "Show errors" button to light up.

* https://mediaarea.net/en/MediaInfo .  Drag and drop the whole lot into there. File -> Export. Choose suitable export format. I suggest you try HTML first, then you see what info it has. Search for "General" to find files that are just general files. Then you can start looking at some other export format (CSV?) and use a text editor to filter away lines which belong to audio files.
But beware that MediaInfo doesn't know all audio file types. So you don't want to delete just because it doesn't identify. Rather you want to check those closer.

* Audiotester.exe from http://www.vuplayer.com/other.php may help, but does not support everything. if you can search up all files of "kind:.mp3", get a count, drag and drop the whole lot into the Audiotester window, and check that it actually runs through all. But it doesn't support MP4 (including .m4a).

* VLC will try to look for audio/video content in any file you dump into it.  Take a closer look at those which show no duration. But if you try to play them, VLC might lock up.


Beware also that if you have botched renamings, they might be "audio to audio". Like, raw AAC renamed ".m4a". Or if someone renames an MP4 to ".mp3" and you drop it into the Audiotester window, it will appear to be corrupt even if it is a perfectly fine file with just the wrong name. Renaming ".mp2" to ".mp3" is an old trick to make dumb portable players start playing them.

Thanks!

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #7
You can load the files in a tag editor like Mp3tag and sort them by some audio property, which will make the non-audio files stand out. From there you can delete them directly.

Thanks. now this is strange. I ran thousands of song files through MP3TAG and then sorted by bitrate.

At the bottom, there were lots of songs that showed a blank space for the column "Bitrate/Codec, as well as blank for frequency and length. So I assume that these were not audio files. But then, when I tried playing a sample of them in Media Player, they played!

I wonder what that is about....

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #8
That means they're in a format Mp3tag doesn't recognize.

Re: Software to Detect Non-audio Files Incorrectly Showing Audio Extensions?

Reply #9
Software from https://mark0.net identifies files by content.