-
Notifications
You must be signed in to change notification settings - Fork 34
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
same (mp3) file, different name ... different output: mp3 versus koz #32
Comments
Ah, thanks to @Safihre
So ... puremagic thinks (0.7 probability) it's .koz (because of the longer matching bytestring?), and 0.3 probability it's .mp3 In the real world, I would say mp3 is much more likely than koz. So each extension would have a Real World Probablity. Wild guess: .mp3: 99% So based on that, mp3 would be more likely for this case. So, I would need to interpret / combine the pure puremagic indication with Real World Probabilities. |
Real World Probability: common extensions on https://www.computerhope.com/issues/ch001789.htm
List generated like this:
|
Sorry for late reply, not getting notifications for this repo even though watched it seems. Just to explain the behavior a bit you were seeing at first, is that you are right Definitly something to consider for real world scenarios. May have to check and see how |
Thanks for replying. I've implemented it in SABnzbd like this:
|
This affects ID3v2.3.0 version files which share the same header (sometimes) as
To improve confidence, we can do a couple of things:
I'm reading/playing around to see what would give the best consistant results. |
Adding a longer versioned match for This is from my own Python script purely for confidence testing.
Let's see what else we can match against in case |
Updated in 1.23, thanks @NebularNerd ! |
same (mp3) file, different name ... different output
Make a copy:
sander@brixit:~/git/puremagic$ cp test/resources/audio/test.mp3 test/resources/audio/testblabla.bla
Verify it's there with same size:
... and same contents:
... but puremagic says the first one is mp3 and the second is ... koz?
Is this wanted behaviour, or a bug?
PS: Linux'
file
reports it correctly as mp3:The text was updated successfully, but these errors were encountered: