I want to write a script that manipulates ID3 tags of mp3 files. I need a tool that reads the tags and outputs it in a format in a machine-readable format. For example, if I want it to output only the title, then it outputs the title, nothing else. I tried different tools like id3
or eyeD3
, but they can only be used to write tags or to output them in a human-readable format. Of course I could just filter that output through sed
, but it seems unnecessarily complicated to me.
Linux – Command line tool for listing ID3 tags under Linux
command lineid3linux
Best Answer
You could use the
exiftool
command from thelibimage-exiftool-perl
package which lets you read (and write) metadata from multimedia files, including mp3s. It can output to a variety of formats including key-value, json, xml and user-defined formats. You can choose to list only specified tags.