Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1

    Batch clear genre tag and preserve timestamp

    I am looking for a way to clear the genre tag of all my music files (approx. 20.000 files).
    I have done my share of Googling etc., but somehow cannot find the right way to do it.

    Relevant info:
    - Formats: mostly mp3, ogg, flac
    - Platform: Linux (Debian/Xubuntu)
    - I am looking for a batch / scripted solution
    - I would like to preserve the timestamp of the files
    - The genre can remain empty after cleaning

    I use Kid3-qt and Easytag for regular tagging and Kid3 has CLI support, but I cannot get it working for this purpose.

    Any suggestions and/or example scripts?
    Living Room: HifiBerry DAC+ Pro & piCorePlayer
    Attic: HifiBerry DAC+ RCA & piCorePlayer
    Kitchen: SB Radio
    Other rooms: 4x SB Radio

  2. #2
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,295
    Quote Originally Posted by zordaz View Post
    I am looking for a way to clear the genre tag of all my music files (approx. 20.000 files).
    I have done my share of Googling etc., but somehow cannot find the right way to do it.

    Relevant info:
    - Formats: mostly mp3, ogg, flac
    - Platform: Linux (Debian/Xubuntu)
    - I am looking for a batch / scripted solution
    - I would like to preserve the timestamp of the files
    - The genre can remain empty after cleaning

    I use Kid3-qt and Easytag for regular tagging and Kid3 has CLI support, but I cannot get it working for this purpose.

    Any suggestions and/or example scripts?
    Hi,

    i am using eyeD3 for my things and its exactly my piece of Honey.

    Since i have a script that changes genres from x to y (but changes the timestamp just a little to support the rescan feature from lms) i think its no big deal. (scriptwise)
    BUT you have a new "genre" called "No Genre" - do you really want to do that?

    If [ $answer= yes ]
    eyeD3 Download and check this line
    Code:
    find ./ -iname *.mp3 -exec  echo eyeD3 --preserve-file-times --genre "" {} \;
    remember i am not in charge for your troubles ;-)
    If you have a backup - feel free to remove the echo in front of eyeD3 --preserve-file-times --genre ""

  3. #3
    Quote Originally Posted by DJanGo View Post
    BUT you have a new "genre" called "No Genre" - do you really want to do that?
    Thanks for your suggestion, I will test eyeD3. Does it also handle Flac and OGG/Vorbis tags?
    A "No Genre" tag in LMS is no big deal for me: I don't use the genre tag at all because the genre choice often is arbitrary (pop vs rock, metal vs hardrock etc.) in my opinion.
    Last edited by zordaz; 2017-04-18 at 13:53.
    Living Room: HifiBerry DAC+ Pro & piCorePlayer
    Attic: HifiBerry DAC+ RCA & piCorePlayer
    Kitchen: SB Radio
    Other rooms: 4x SB Radio

  4. #4
    Senior Member JJZolx's Avatar
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    11,464
    For Windows, Mp3tag will easily do this, although it's not a batch/script, but is an interactive program. You can easily load your whole library (assuming it's in one folder tree) and run it on tens of thousands of files with only a few clicks. It will take a while to run through 20,000 files, but you won't need to do them individually.

    There's an option to preserve file mod times. Be sure you have it enabled.

    Tools > Options > Tags > Preserve file modification time when saving tags

    I would _highly_ suggest running this on a few copies of files before running it on your entire library. You can use Mp3tag's actions, or use the tag panel (on the left) or use the extended tag dialog (View > Extended Tags) to remove the GENRE field.
    Last edited by JJZolx; 2017-04-18 at 17:26.

  5. #5
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Vństerňs Sweden
    Posts
    16,105
    PuddleTag on Linux similar to mp3tag ?
    --------------------------------------------------------------------
    Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Kitchen: Touch + powered Fostex PM0.4
    Misc use: Radio (with battery)
    iPad1 with iPengHD & SqueezePad
    (spares Touch, SB3, reciever ,controller )
    server HP proliant micro server N36L with ClearOS Linux

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  6. #6
    Quote Originally Posted by JJZolx View Post
    For Windows, Mp3tag will easily do this, although it's not a batch/script, but is an interactive program. You can easily load your whole library (assuming it's in one folder tree) and run it on tens of thousands of files with only a few clicks. It will take a while to run through 20,000 files, but you won't need to do them individually.
    As mentioned I am looking for a batch/scripted solution for Linux, not Windows (although I am familiar with mp3tag) and Puddletag doesn's seem to have CLI functionality (already looked into that one as well).
    Last edited by zordaz; 2017-04-18 at 23:39.
    Living Room: HifiBerry DAC+ Pro & piCorePlayer
    Attic: HifiBerry DAC+ RCA & piCorePlayer
    Kitchen: SB Radio
    Other rooms: 4x SB Radio

  7. #7
    Senior Member Julf's Avatar
    Join Date
    Dec 2010
    Posts
    2,433
    For CLI on Linux, you might want to look at beets. Scriptable and extendable (in python).
    "To try to judge the real from the false will always be hard. In this fast-growing art of 'high fidelity' the quackery will bear a solid gilt edge that will fool many people" - Paul W Klipsch, 1953

  8. #8
    Junior Member
    Join Date
    Apr 2017
    Posts
    1

    Batch clear genre tag and preserve timestamp

    Quote Originally Posted by zordaz View Post
    I use Kid3-qt and Easytag for regular tagging and Kid3 has CLI support, but I cannot get it working for this purpose.
    This should work:

    Code:
    find -name '*.mp3' -exec kid3-cli -c "set genre '' 1" -c "set genre '' 2" {} \;
    "Preserve file timestamp" can be marked in Settings/Files of kid3-qt, it will also be used in kid3-cli.

  9. #9
    Quote Originally Posted by cornuto View Post
    This should work:
    Code:
    find -name '*.mp3' -exec kid3-cli -c "set genre '' 1" -c "set genre '' 2" {} \;
    Thanks, with some small changes it also works for Vorbis tags, great!
    Living Room: HifiBerry DAC+ Pro & piCorePlayer
    Attic: HifiBerry DAC+ RCA & piCorePlayer
    Kitchen: SB Radio
    Other rooms: 4x SB Radio

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
  •