0

I often play audiobooks from a car's MP3 player. Unfortunately, the system seems to misread the "tags" of the mp3 files, so I've been manually removing them with Picard. It's a multistep process and gets kind of tedious. Is there a way I can write a script to:

  1. (conditional) If archive is found, extract all mp3 files, delete the archive.
  2. Move all resulting mp3 files in that folder to that base folder, in case there are subdirectories.
  3. Remove all tags of all files in the directory.
  4. batch rename the above files to format x0001.mp3, x0002.mp3, etc...
  5. Copy all files to root of a flash drive. ?

Ideally I would like to right click on a directory and have an option appear in the menu to perform these steps.

  • 2
    You may find this helpful - askubuntu.com/questions/349163/… (see id3v2 or eyeD3) – guiverc Jul 17 at 3:12
  • I use eye3D for scripting. – Jos Jul 17 at 6:28
  • scripting is a good idea if you can do it. if you dont, go manual. EasyTag is a good GUI tool for editing tags. eyeD3 is good for scripting. FYI your feature request is quite unclear : what sould happend if you have several archives and want unpack them in the same directory naming files x0001? Overwrite ? – cmak.fr Jul 17 at 7:11
  • Yes, you're right, I think it would be easier to script just some of the procedures, mainly the clearing of the tags. The rest is fairly easy to do manually. I've scripted a bit before, but have no idea how to add an option that executes a command from the right click menu in Lubuntu's file explorer (PCManFM). – primuspaul Jul 18 at 1:24
0

not the complete answer but perhaps this helps

this script I used to rename the files according to some of the fields (Title) in the metadata. It uses exiftool to get that data. you could write blank fields to that metadata.

sudo apt install exiftool

exiftool --man

has this command exiftool -all= dst.jpg Delete all meta information from an image.

so it would be a script (I have not tried this myself)

for l in *; do exiftool -all= $l; done

I would suggest experimenting and making sure you backup the archive.

to batch rename, perhaps krename run within krusader. both need to be installed separately. it can insert counters.

sudo apt install krusader krename

and krusader has the ability to have user actions show in the right click menu bar . see 'user actions' in Krusader's help menu search field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.