INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Can MP3 Files Be Sorted From Identical Flac's?  (Read 3556 times)

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Can MP3 Files Be Sorted From Identical Flac's?
« on: February 18, 2014, 10:24:46 pm »

What I want to do is delete any MP3 files from my library if the FLAC (or other lossless format) file exists for that album/song. Is it possible to sort this way with an expression?

Thanks.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #1 on: February 19, 2014, 03:58:25 am »

MC doesn't provide audio fingerprinting, so there's no way to detect if you have the same track in different encodings.  You can only use existing metadata, like Name, Track #, etc.

I haven't tried this out yet, but you could try pscriptor and the AcousticFingerprint scriptlet to see if it matches IDs for you.  The basic idea is that you'd run the script to analyze your tracks to obtain fingerprint signatures, and then you could use the expression language to find identical signatures.

If you're interested, I'll check it out to see how well it works.
Logged
The opinions I express represent my own folly.

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #2 on: February 19, 2014, 05:13:07 am »

Sounds good MrC......

If you are able to work through it I can create some test folders here to try it.....I really appreciate it.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #3 on: February 19, 2014, 08:46:32 am »

Ok, that was easy.

The Step 1 image shows results after pscriptor ran the AcousticFingerprint scriptlet.  The EN ID values are the ones we care about.

The Step 2 image shows results after applying a quick filter in the MC Search box:

   ~sort=[Bitrate]-d ~nodup=[EN ID]

This sorts by bitrate, and removes duplicates of the [EN ID] field, leaving us with FLAC.  Reverse the filter's bitrate sort to:

   ~sort=[Bitrate] ~nodup=[EN ID]

leaves us with Step 3, which should be OK to delete.

The command I ran was:

    perl pscriptor.pl -E AcousticFingerprint -c pscriptor-config.txt -f 'Name'

Install pscriptor as per instructions, and also follow the instructions at the top of the file Scriptlets/AcousticFingerprint.pm.

Edit with a simple text editor (like Notepad) the file Scriptlets/AcousticFingerprint.pm and change two lines under %fieldmap:

    artist_name     => 'Artist',
    title               => 'Name',

to

    artist_name     => 'EN Artist',
    title               => 'EN Name',

This will prevent your Artist and track Name's from being overwritten.  I'll have a better way to do this in the future.
Logged
The opinions I express represent my own folly.

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #4 on: February 20, 2014, 06:19:53 am »

Thank you sir......I won't be able to spend much time on this for a few days. I tried to do an install of the ActivePearl for Windows and it gave an error message of "There is a problem with this Windows Installer Package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor".

(running Win 7 x64)
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

HiFiTubes

  • Citizen of the Universe
  • *****
  • Posts: 1123
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #5 on: February 26, 2014, 06:27:59 am »

I'd like to get involved in testing this. My pscriptor install is complete.

I'm curious why we can't use MC for some of this, with regard to Album field being identical.

If we have taken care to tag the Album field properly, with no extraneous details (or removed those details), could we safely assume that if a FLAC,APE,ALAC,DFF,DSF,SACD copy exists just delete the MP3?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #6 on: February 26, 2014, 11:38:22 am »

Sure thing.

As far as can you safely delete, that's entirely up to you.  I have no idea about your music collection, and would prefer to leave any decisions such as that to you and the experience you gain from evaluating the results.

Regarding the Album field: think "Greatest Hits".  I have a dozen albums with that title.  AlbumKey(), which is [Album Artist (auto)] - [Album], helps solve that problem almost entirely (an artist may have several identically named albums: Seal's "Seal" album, Frank Sinatra's "Greatest Hits").

It seems reasonable that if you find duplicates across file types in the same AlbumKey(), you can safely remove the mp3 versions when you have better higher definition versions.  The acoustic fingerprint should have very few if any collisions (meaning, same ID for different fingerprints).
Logged
The opinions I express represent my own folly.

HiFiTubes

  • Citizen of the Universe
  • *****
  • Posts: 1123
Re: Can MP3 Files Be Sorted From Identical Flac's?
« Reply #7 on: February 26, 2014, 10:39:55 pm »

I thinking too much about what I want without regard to the design of MC. I've been assuming there was some algorithm behind the "Duplicates" sort feature, maybe a fallback to other fields...now I realize it is simply applying per file, thus Duplicate of specific fields a user chooses as criteria. Thanks for the heads up on what AblumKey actually is. I think I'll just sort through some different View Schemes for now and see how it works.

Since I have a Jaikoz license I could probably run some batches and grab the Acoustic Fingerprint, or I will use the pscriptor. Thanks.
Logged
Pages: [1]   Go Up