The ffmpeg utility is very useful for transcoding video and making video files, but it can also retrieve information from a video or audio file very easily. You can get the ID3 info from an mp3 very easily. Below is an example. I am getting album and artist information from an mp3 audio file.
jason@jason-desktop:~/Music/Ludwig Göransson - TENET_2020_MP3 320$ ffprobe -loglevel quiet -show_entries format_tags=album,artist,title, -of default=noprint_wrappers=1:nokey=1 01.\ RAINY\ NIGHT\ IN\ TALLINN.mp3 TENET (Original Motion Picture Soundtrack) RAINY NIGHT IN TALLINN Ludwig Göransson |
This is a very good way to get media information from an audio file on Linux.
This technique also works with ape format files.
jason@jason-desktop:~/Music/Thomas Koner - 2003 ZYKLOP (2CD Mille Plateaux MP118)/CD 2$ ffprobe -loglevel quiet -show_entries format_tags=album,artist,title -of default=noprint_wrappers=1:nokey=1 04-zyklop\ w\ jurgen.ape Zyklop Zyklop Thomas Köner |
It also works on ogg format files.
jason@jason-desktop:~/Music$ ffprobe -loglevel quiet -show_entries format_tags=album,artist,title -of default=noprint_wrappers=1:nokey=1 SDG-ONS02.mp3 SDG-ONS02 Jesper Kyd & Rom Di Prisco Unreal Tournament 3: The Soundtrack |
The sections you can view are title,artist,album_artist,album,genre,date and encoded_by. This is a very useful way to get media information to put in a database, if you had a script to read all this information and then dump it into a file or a database.