Menu

Can I use Kid3 script capabilities to sync POPM frame from AIF file to MP3?

2016-12-12
2016-12-12
  • Branch Hendrix

    Branch Hendrix - 2016-12-12

    I keep 2 separate music libraries (in 2 separate locations):
    Lossless/AIFF (for Traktor or Virtual DJ)
    MP3 (for iTunes & mobile device sync)

    (80% of them are matched sets created during my pre-processing of audio files; 20% is MP3 only)

    I have used Traktor in the past which means it has put POPM entries into my AIFF files

    I'd like like to find the matching MP3 file and put that same POPM entry into that file

    Is something like this possible with Kid3 scripting?

    Thanks!

     
  • Urs Fleisch

    Urs Fleisch - 2016-12-12

    With scripting, you can only get the "Rating" part of the POPM frame, not "Email" or "Counter". If this is not a problem, you can go on like this:

    • Using kid3-cli, get the value from a file with kid3-cli -c "get POPM" filename.aiff and set it using kid3-cli -c "set POPM 5" filename.mp3. You will need a shell variable to transfer the value between the files.
    • Using QML, you can use app.getFrame(2, "POPM") and app.setFrame(2, "POPM", 5). You can try this in the "QML console" and write a JavaScript-like file (looking at the example QML files coming with Kid3).

    It is also possible without scripting: Go into the source directory with the AIFF files. Use "Export CSV" from the file list context menu and store the contents of the tags in a CSV file. Now edit the CSV file using your favourite spreadsheet program. The file paths have to be replaced by the paths of the destination files (i.e. the matching MP3 files). You can delete the columns of tags which you do not want to import, for example only leave the "File Path" and "POPM" columns. Save the edited spreadsheet as a CSV file and make sure that it has the same format as the exported CSV file. Now go to the destination folder with the MP3 files and use "Import CSV" from the file list context menu.

     
  • Branch Hendrix

    Branch Hendrix - 2016-12-12

    I am looking for more of a UI driven tool; scripting scenarios end up being fragile and time consuming to deal with all the steps involved... prefer not to go down that path; I'd rather write an app that does it vs. scripting (but since you already have most of the necessary components within Kid3, I'd thought I see if there was any interest)