title
Products            Buy            Support Forum            Professional            About            Codec Central
 
Results 1 to 12 of 12

Thread: Export/Import tags from one audio file to another

  1. #1
    dBpoweramp Enthusiast
    Join Date
    Sep 2006
    Location
    Cambridge, UK
    Posts
    68

    Export/Import tags from one audio file to another

    It would be really useful if dB PowerAmp offered the ability to Export tags from one file, and then report them into another, with the option to replace/ignore importing any clashes.

  2. #2
    dBpoweramp Enthusiast
    Join Date
    Aug 2017
    Location
    Utah USA
    Posts
    82

    Re: Export/Import tags from one audio file to another

    Some of the programs I use while processing music remove all tags. It would speed things up a lot if there was the option to export the tag information into a data file, and be able to import from such a file as well.
    I really like the way exporting and importing works for pictures. If there were similar functionality for the tag information, that would be valuable indeed.

  3. #3
    dBpoweramp Guru
    Join Date
    Dec 2008
    Location
    London, UK
    Posts
    4,015

    Re: Export/Import tags from one audio file to another

    You can use the Audio Info utility codec to export tags to a tab separated text file. Then, using MP3Tag, you can import the tags from the text file.

  4. #4
    dBpoweramp Enthusiast
    Join Date
    Dec 2009
    Posts
    133

    Re: Export/Import tags from one audio file to another

    If you are using FLAC files, you can use the MetaFLAC command (part of the FLAC download) to save/restore them. Here is a script I use to copy tags from a stereo rip to a surround rip (since if I rip surround using MakeMKV there is almost no metadata, so starting with the metadata for the stereo tracks gets me about 90% of the way there). The key is that the files in both the Stereo and Surround directories should start with the same track number prefix (like: 01 Track Name.flac).

    The script is called MakeSurroundLikeStereo.ps1:

    $sourcePath = $(get-location).Path+"\Stereo"
    $destPath = $(get-location).Path+"\Surround"
    $tempFile = "C:\Temp\MetaData.txt"
    $metaFlac = "C:\Work\Audio Tools\FLAC\Latest\metaflac"

    $fileEntries = [IO.Directory]::GetFiles($sourcePath,"*.flac");
    foreach($sourceFileName in $fileEntries)
    {
    $bareFileName = [IO.Path]::GetFileName($sourceFileName);
    $index = $bareFileName.Substring(0,2).TrimEnd("-");
    $destFileName = [IO.Directory]::GetFiles($destPath,$index+"*.flac")[0];
    $newFileName = $destPath + "" + $bareFileName
    Write-Host "Copy metadata from $sourceFileName to $newFileName (renamed from $destFileName)"
    rename-item $destFileName $newFileName
    cmd /c "metaFlac --no-utf8-convert --export-tags-to=""$tempFile"" ""$sourceFileName"""
    cmd /c "metaflac --remove-all-tags --import-tags-from=""$tempFile"" ""$newFileName"""
    }

    Hope this helps,
    Mike

  5. #5
    dBpoweramp Enthusiast
    Join Date
    Aug 2017
    Location
    Utah USA
    Posts
    82

    Re: Export/Import tags from one audio file to another

    All of my processing programs require wav format. I am able to get the tags to stay by using the Run external DSP. I suppose I really just need to rewrite my second program to run in the command line, then just add another Run external DSP.

    I have wanted the ability to export and import ID tags for a long time now--even before I got into intensive audio processing.
    Last edited by ForSerious; 09-29-2017 at 10:20 AM. Reason: Good job escaping scripting characters.

  6. #6
    dBpoweramp Enthusiast
    Join Date
    Aug 2017
    Location
    Utah USA
    Posts
    82

    Re: Export/Import tags from one audio file to another

    Well that was lots of fun. I went ahead and re-coded my program to work with command line arguments and got it to keep the tags by telling it to run before conversion.
    In the process, I learned that the Run External DSP only takes a path to an exe pretty much. It would be nice if there were a way to have it accept java or python runables.

  7. #7
    Administrator
    Join Date
    Apr 2002
    Posts
    43,854

    Re: Export/Import tags from one audio file to another

    To run python you would run "c:\some path\python.exe" "c:\some folder\your program.py"

  8. #8
    dBpoweramp Enthusiast
    Join Date
    Aug 2017
    Location
    Utah USA
    Posts
    82

    Re: Export/Import tags from one audio file to another

    Ah true. That would work for java too. I remade it in java and it is loads faster!
    I was mistaken though. For a bit, I thought I got it to keep the tag information, but in the end, I realized that I was looking at the files that didn't get processed by the python program.
    I've tried different options with the ID tag processing. In order for it to keep the tag information, it would need to load it first, wait for all the external programs to run, then do the tag processing.

    So far I've been able to find abundant information on how to manipulate wav files in various coding languages, but nothing about keeping any embedded ID3 tags.

  9. #9
    dBpoweramp Guru
    Join Date
    Nov 2013
    Location
    New York
    Posts
    497

    Re: Export/Import tags from one audio file to another

    mp3tag has the ability to export tags in various formats, I've used that to make printed directories for CDs. It also has the ability to import tags from text files. Never tried that. But I know your issue, my audio editor will now read FLAC or other file formats, but loses all the tags.

  10. #10
    dBpoweramp Enthusiast
    Join Date
    Aug 2017
    Location
    Utah USA
    Posts
    82

    Re: Export/Import tags from one audio file to another

    I took a peek at it. It's pretty nice. It would fit in nice to my processing lineup if it also had an import option. I personally like dbPoweramp tag editor more.

  11. #11
    dBpoweramp Guru
    Join Date
    Dec 2008
    Location
    London, UK
    Posts
    4,015

    Re: Export/Import tags from one audio file to another

    Quote Originally Posted by ForSerious View Post
    I took a peek at it. It's pretty nice. It would fit in nice to my processing lineup if it also had an import option. I personally like dbPoweramp tag editor more.
    There is an import option in MP3Tag, Convert menu >> Text file - Tag.

    Also, as an editor, MP3Tag is very powerful and so I rarely edit in the dbPoweramp tag editor.

  12. #12
    dBpoweramp Enthusiast
    Join Date
    Aug 2017
    Location
    Utah USA
    Posts
    82

    Re: Export/Import tags from one audio file to another

    I ended up finding someone that has made a working tag manipulator in java. It was really easy to add it to my program. Now I can do the full processing straight from the dBpoweramp converter.

    Either way, importing and exporting tags would be a nice feature for the tag editor.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •