How to read mp3 tags in shell?Find the properties of an mp3 file via command lineCommand line MP3 and OGG tagger with picture support (cover fetcher)Need a MP3 ID3 tagger, and cover fetcherNeed a MP3 ID3 tagger, and cover fetcherErase and rewrite MP3 ID3 tagsVideo files (AVI) tags editor?Ubuntu One and MP3 tagsTell Banshee to add covers inside MP3 tagsExport Rhythmbox ratings and play counts to ID3 tagsNo ID3 tag found with id3renWhere can I get tag data for MP3s?Problem with mp3 tags using youtube-dl and id3v2
where does black come from in CMYK color mode?
For which would you expect the liquidity on instrument X to be the greatest: its spot, future, option or swap?
What techniques can I use to seduce a PC without arousing suspicion of ulterior motives?
Sci-fi book trilogy about space travel & 'jacking'
Equivalent of phrase 'emu parade' in other English-speaking places
What does exhaust smell on oil and transmission dipstick mean?
Would the professor leave the classroom if only 1 student uses their cellphone during class?
How can I filter an EntityClass by _not_ having a property?
Is the ''yoi'' meaning ''ready'' when doing karate the same as the ''yoi'' which means nice/good?
NFL football incentives
Why does the Joker do this to Bob?
How does kinetic energy work in braking a vehicle?
Is it possible to commute 34 km (21 miles) daily?
SAME DIGIT NUMBER PUZZLE
How do I figure out how many hydrogens my compound actually has using a mass and NMR spectrum?
Why would Climate activists disrupt public transport?
How to deal with non-stop callers in the service desk
For a command to increase something, should instructions refer to the "+" key or the "=" key?
Can I take the high-speed bullet train Beijing–Hong Kong under Chinese 144 h visa-free transit rules?
Why do some web servers still provide information on vendor and version in the HTTP response headers
Why does the SR-71 Blackbird sometimes have dents in the nose?
What's the most profitable use for an elemental transmuter?
How to answer to the "We do not want to create any precedent" argument in salary negotiation?
What's a good strategy for offering low on a house?
How to read mp3 tags in shell?
Find the properties of an mp3 file via command lineCommand line MP3 and OGG tagger with picture support (cover fetcher)Need a MP3 ID3 tagger, and cover fetcherNeed a MP3 ID3 tagger, and cover fetcherErase and rewrite MP3 ID3 tagsVideo files (AVI) tags editor?Ubuntu One and MP3 tagsTell Banshee to add covers inside MP3 tagsExport Rhythmbox ratings and play counts to ID3 tagsNo ID3 tag found with id3renWhere can I get tag data for MP3s?Problem with mp3 tags using youtube-dl and id3v2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
Is there a way to read the mp3 tags of a file from the shell? Something like: mp3tags MyFile.mp3 author should output the author-tag of an mp3-file.
command-line mp3 tag id3
add a comment
|
Is there a way to read the mp3 tags of a file from the shell? Something like: mp3tags MyFile.mp3 author should output the author-tag of an mp3-file.
command-line mp3 tag id3
add a comment
|
Is there a way to read the mp3 tags of a file from the shell? Something like: mp3tags MyFile.mp3 author should output the author-tag of an mp3-file.
command-line mp3 tag id3
Is there a way to read the mp3 tags of a file from the shell? Something like: mp3tags MyFile.mp3 author should output the author-tag of an mp3-file.
command-line mp3 tag id3
command-line mp3 tag id3
edited May 24 at 15:15
Pablo A
4,1902 gold badges21 silver badges48 bronze badges
4,1902 gold badges21 silver badges48 bronze badges
asked Dec 8 '12 at 13:04
red_trumpetred_trumpet
7311 gold badge9 silver badges28 bronze badges
7311 gold badge9 silver badges28 bronze badges
add a comment
|
add a comment
|
7 Answers
7
active
oldest
votes
You can also use ffprobe which is part of ffmpeg.
sudo apt-get install ffmpeg
ffprobe file.mp3
If you don't want other information, like track length and so on, you can combine the output with grep:
ffprobe file.mp3 2>&1 | grep -A90 'Metadata:'
Or in order to get only the author:
ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 file.mp3
You can select other tags by separating them with a comma, such as format_tags=title,album.
I wanted to search for a keyword in all mp3 files in a folder. The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. Here is the loop I used:
# sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool
keyword='fill_me_in'
getTitleFF() ffprobe "$1" 2>&1
getTitleLL() sed -nE 's/^ TITLE=(.*)/1/p';
getTitleEyed() p';
getTitleInfo() mp3info -p %t "$1";
getTitleId3() Title *): (.*)/2/p';
getTitleExif() exiftool -title -b "$1";
getTitleId3i() id3info "$1"
getTitleTool() id3tool "$1"
for prog in FF LL Eyed Info Id3 Exif Id3i Tool; do
echo "=== getTitle$prog ==="
time
for file in *.mp3; do
if "getTitle$prog" "$file" | grep -q "$keyword"; then
echo "$file"
fi
done
done
Notes:
lltagandmp3infodon't find a title, because the files I was using had ID3v2 tags, see the comment by @s-prasanth: How to read mp3 tags in shell?eyeD3is problematic to use programmatically, because it uses color codes (boldness).eyeD3and alsoid3v2(but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things; thereforegetTitleEyedand sometimesgetTitleId3return both the title and the artist, so please don't copy-paste those functions.getTitleId3 will only work for ID3 v2 tags, because
id3v2has different formats for ID3v1- and ID3v2-tags, i.e.Title : Artist:vs. ID3v2:
TIT2 (Title/songname/content description):As the only program of these 5
eyeD3prints a red warning for two of the files:Invalid mode/bitrate combination for layer II
No ID3 v1.x/v2.x tag found!It seems like those two files have ID3v1 tags, because those two files are the only ones where
lltagandmp3infocan get a title. I'm wondering if this is a bug ineyeD3as no other program mentioned here has a problem with these files ...
Results (real time):
Program | Version | Time / s
----------+------------+-----------
exiftool | 10.25 | 49.5 ± 0.5
lltag | 0.14.5 | 41 ± 1.0
ffprobe | 3.1.3-1+b3 | 33 ± 0.5
eyeD3 | 0.6.18 | 24 ± 0.5
id3info | 3.8.3 | 4.2 ± 0.1
id3v2 | 0.1.12 | 2.9 ± 0.1
id3tool | 1.2a | 1.7 ± 0.1
mp3info | 0.8.5a | 1.4 ± 0.1
Time-wise the winner here is id3tool (mp3info is faster, but doesn't work with ID3 v2).id3v2 is also quite fast, but the getTitleId3 function would need adjustment to also work with ID3v1-tags, which may at worst slow it down by factor 2.
1
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
1
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please includeid3infoin your comparison?
– Vytenis Bivainis
Oct 1 '16 at 11:46
ffmpeghas another advantage: it works withaac/m4afiles. Other tools don't seem to (or do you know otherwise?). I will also suggest searching itsFORMATsection, to avoid cases where a stream also has atitleetc.:ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.
– Jonathan Y.
Jul 14 '17 at 15:33
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read withexiftoolorffprobe. The more specialized tool for this job would bemetaflac --listfrom theflacpackage. For oggexiftoolalso works, but there also isvorbiscomment -lfrom thevorbis-toolspackage. Weirdlyvorbiscommentandmetaflaccan not be interchanged, even though FLAC and OGG both have vorbis coment metadata?
– mxmlnkn
Feb 20 '18 at 15:32
add a comment
|
Ok, I found a program by myself. It is called mp3info and installed by
sudo apt-get install mp3info
To get single mp3 tags from a file, one has to call
mp3info -p %a file.mp3
which gives the artist of the file. The %a means that one want to get the artist and there are some other keys for the other tags.
20
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported bymp3info. You might want to look atid3v2- It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runsid3v2and processes the output appropriately.
– S Prasanth
Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using-Rflag withgrepto get the specified output.
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
1
Unfortunately:Only ID3 versions 1.0 and 1.1 are supported.
– simlev
Jan 8 at 21:58
add a comment
|
You can use eyed3. First, from a terminal, install:
sudo apt-get install eyed3
Then, run:
eyeD3 song.mp3
Combine that with grep to get specific tags in one line.
eyeD3 song.mp3 | grep artist
(to strip all mp3 tags, see HERE)
1
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should beeyeD3noteyed3
– bmaupin
May 29 '13 at 4:03
Use the display plugin to output tags in the desired format:eyeD3 --plugin display -p "%t% by %a%" *.
– simlev
Jan 8 at 22:03
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
add a comment
|
I prefer to use id3v2, just type id3v2 -l somefile.mp3.
You can also see the id3v2 man page for more specific use.
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Here is recommendedmid3v2instead because of the lack of Unicode support. Also id3v2 last update was on 2013.
– Pablo A
May 24 at 15:08
add a comment
|
You can try exiftool(Read and write meta information in files).
"ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FLIR, FujiFilm, GE, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Motorola, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony." - ExifTool by Phil Harvey
Here is an example of the command:
exiftool test.mp3
ExifTool Version Number : 10.00
File Name : test.mp3
Directory : .
File Size : 8.2 MB
File Modification Date/Time : 2016:03:02 21:44:58+01:00
File Access Date/Time : 2016:04:06 21:34:01+02:00
File Inode Change Date/Time : 2016:03:02 21:45:36+01:00
File Permissions : rw-rw-r--
File Type : MP3
File Type Extension : mp3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Sample Rate : 44100
Channel Mode : Stereo
MS Stereo : Off
Intensity Stereo : Off
Copyright Flag : False
Original Media : False
Emphasis : None
VBR Frames : 9544
VBR Bytes : 8467680
ID3 Size : 115419
Band : Tech N9ne Collabos
Album : Strangeulation (Deluxe Edition)
Composer : Tech N9ne Collabos
Genre : Rap & Hip-Hop
Copyright : 2014 Strange Music, Inc
Title : American Horror Story (feat. Ces Cru)
Artist : Tech N9ne Collabos
Track : 10
Year : 2014
Comment :
Lyrics :
Private : (Binary data 8192 bytes, use -b option to extract)
Picture MIME Type : image/jpeg
Picture Type : Front Cover
Picture Description :
Picture : (Binary data 104371 bytes, use -b option to extract)
Audio Bitrate : 272 kbps
Date/Time Original : 2014
Duration : 0:04:09 (approx)
add a comment
|
Check out lltag if you are looking for a solution which supports more than just mp3/ID3.
Install it with:
sudo apt-get install lltag
to view all tags with it: (-S is for show)
lltag -S somefile.mp3
to view certain tags with it:
lltag --show-tags artist,album,title,number somefile.mp3
add a comment
|
Beets
You can start with this screencast and the Getting started guide
Install either:
pip install beets # latest version
apt install beets # repo version
Also:
- To just read the metadata:
exiftool -v3 *.mp3 mid3v2from (python-mutagenpackage) (instead ofid3v2, last update was on 2013!)id3- Editor for ID3 tags (not the same as this id3)id3tool- Command line editor for id3 tagsid3ren- id3 tagger and renamer
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f226773%2fhow-to-read-mp3-tags-in-shell%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can also use ffprobe which is part of ffmpeg.
sudo apt-get install ffmpeg
ffprobe file.mp3
If you don't want other information, like track length and so on, you can combine the output with grep:
ffprobe file.mp3 2>&1 | grep -A90 'Metadata:'
Or in order to get only the author:
ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 file.mp3
You can select other tags by separating them with a comma, such as format_tags=title,album.
I wanted to search for a keyword in all mp3 files in a folder. The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. Here is the loop I used:
# sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool
keyword='fill_me_in'
getTitleFF() ffprobe "$1" 2>&1
getTitleLL() sed -nE 's/^ TITLE=(.*)/1/p';
getTitleEyed() p';
getTitleInfo() mp3info -p %t "$1";
getTitleId3() Title *): (.*)/2/p';
getTitleExif() exiftool -title -b "$1";
getTitleId3i() id3info "$1"
getTitleTool() id3tool "$1"
for prog in FF LL Eyed Info Id3 Exif Id3i Tool; do
echo "=== getTitle$prog ==="
time
for file in *.mp3; do
if "getTitle$prog" "$file" | grep -q "$keyword"; then
echo "$file"
fi
done
done
Notes:
lltagandmp3infodon't find a title, because the files I was using had ID3v2 tags, see the comment by @s-prasanth: How to read mp3 tags in shell?eyeD3is problematic to use programmatically, because it uses color codes (boldness).eyeD3and alsoid3v2(but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things; thereforegetTitleEyedand sometimesgetTitleId3return both the title and the artist, so please don't copy-paste those functions.getTitleId3 will only work for ID3 v2 tags, because
id3v2has different formats for ID3v1- and ID3v2-tags, i.e.Title : Artist:vs. ID3v2:
TIT2 (Title/songname/content description):As the only program of these 5
eyeD3prints a red warning for two of the files:Invalid mode/bitrate combination for layer II
No ID3 v1.x/v2.x tag found!It seems like those two files have ID3v1 tags, because those two files are the only ones where
lltagandmp3infocan get a title. I'm wondering if this is a bug ineyeD3as no other program mentioned here has a problem with these files ...
Results (real time):
Program | Version | Time / s
----------+------------+-----------
exiftool | 10.25 | 49.5 ± 0.5
lltag | 0.14.5 | 41 ± 1.0
ffprobe | 3.1.3-1+b3 | 33 ± 0.5
eyeD3 | 0.6.18 | 24 ± 0.5
id3info | 3.8.3 | 4.2 ± 0.1
id3v2 | 0.1.12 | 2.9 ± 0.1
id3tool | 1.2a | 1.7 ± 0.1
mp3info | 0.8.5a | 1.4 ± 0.1
Time-wise the winner here is id3tool (mp3info is faster, but doesn't work with ID3 v2).id3v2 is also quite fast, but the getTitleId3 function would need adjustment to also work with ID3v1-tags, which may at worst slow it down by factor 2.
1
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
1
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please includeid3infoin your comparison?
– Vytenis Bivainis
Oct 1 '16 at 11:46
ffmpeghas another advantage: it works withaac/m4afiles. Other tools don't seem to (or do you know otherwise?). I will also suggest searching itsFORMATsection, to avoid cases where a stream also has atitleetc.:ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.
– Jonathan Y.
Jul 14 '17 at 15:33
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read withexiftoolorffprobe. The more specialized tool for this job would bemetaflac --listfrom theflacpackage. For oggexiftoolalso works, but there also isvorbiscomment -lfrom thevorbis-toolspackage. Weirdlyvorbiscommentandmetaflaccan not be interchanged, even though FLAC and OGG both have vorbis coment metadata?
– mxmlnkn
Feb 20 '18 at 15:32
add a comment
|
You can also use ffprobe which is part of ffmpeg.
sudo apt-get install ffmpeg
ffprobe file.mp3
If you don't want other information, like track length and so on, you can combine the output with grep:
ffprobe file.mp3 2>&1 | grep -A90 'Metadata:'
Or in order to get only the author:
ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 file.mp3
You can select other tags by separating them with a comma, such as format_tags=title,album.
I wanted to search for a keyword in all mp3 files in a folder. The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. Here is the loop I used:
# sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool
keyword='fill_me_in'
getTitleFF() ffprobe "$1" 2>&1
getTitleLL() sed -nE 's/^ TITLE=(.*)/1/p';
getTitleEyed() p';
getTitleInfo() mp3info -p %t "$1";
getTitleId3() Title *): (.*)/2/p';
getTitleExif() exiftool -title -b "$1";
getTitleId3i() id3info "$1"
getTitleTool() id3tool "$1"
for prog in FF LL Eyed Info Id3 Exif Id3i Tool; do
echo "=== getTitle$prog ==="
time
for file in *.mp3; do
if "getTitle$prog" "$file" | grep -q "$keyword"; then
echo "$file"
fi
done
done
Notes:
lltagandmp3infodon't find a title, because the files I was using had ID3v2 tags, see the comment by @s-prasanth: How to read mp3 tags in shell?eyeD3is problematic to use programmatically, because it uses color codes (boldness).eyeD3and alsoid3v2(but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things; thereforegetTitleEyedand sometimesgetTitleId3return both the title and the artist, so please don't copy-paste those functions.getTitleId3 will only work for ID3 v2 tags, because
id3v2has different formats for ID3v1- and ID3v2-tags, i.e.Title : Artist:vs. ID3v2:
TIT2 (Title/songname/content description):As the only program of these 5
eyeD3prints a red warning for two of the files:Invalid mode/bitrate combination for layer II
No ID3 v1.x/v2.x tag found!It seems like those two files have ID3v1 tags, because those two files are the only ones where
lltagandmp3infocan get a title. I'm wondering if this is a bug ineyeD3as no other program mentioned here has a problem with these files ...
Results (real time):
Program | Version | Time / s
----------+------------+-----------
exiftool | 10.25 | 49.5 ± 0.5
lltag | 0.14.5 | 41 ± 1.0
ffprobe | 3.1.3-1+b3 | 33 ± 0.5
eyeD3 | 0.6.18 | 24 ± 0.5
id3info | 3.8.3 | 4.2 ± 0.1
id3v2 | 0.1.12 | 2.9 ± 0.1
id3tool | 1.2a | 1.7 ± 0.1
mp3info | 0.8.5a | 1.4 ± 0.1
Time-wise the winner here is id3tool (mp3info is faster, but doesn't work with ID3 v2).id3v2 is also quite fast, but the getTitleId3 function would need adjustment to also work with ID3v1-tags, which may at worst slow it down by factor 2.
1
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
1
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please includeid3infoin your comparison?
– Vytenis Bivainis
Oct 1 '16 at 11:46
ffmpeghas another advantage: it works withaac/m4afiles. Other tools don't seem to (or do you know otherwise?). I will also suggest searching itsFORMATsection, to avoid cases where a stream also has atitleetc.:ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.
– Jonathan Y.
Jul 14 '17 at 15:33
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read withexiftoolorffprobe. The more specialized tool for this job would bemetaflac --listfrom theflacpackage. For oggexiftoolalso works, but there also isvorbiscomment -lfrom thevorbis-toolspackage. Weirdlyvorbiscommentandmetaflaccan not be interchanged, even though FLAC and OGG both have vorbis coment metadata?
– mxmlnkn
Feb 20 '18 at 15:32
add a comment
|
You can also use ffprobe which is part of ffmpeg.
sudo apt-get install ffmpeg
ffprobe file.mp3
If you don't want other information, like track length and so on, you can combine the output with grep:
ffprobe file.mp3 2>&1 | grep -A90 'Metadata:'
Or in order to get only the author:
ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 file.mp3
You can select other tags by separating them with a comma, such as format_tags=title,album.
I wanted to search for a keyword in all mp3 files in a folder. The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. Here is the loop I used:
# sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool
keyword='fill_me_in'
getTitleFF() ffprobe "$1" 2>&1
getTitleLL() sed -nE 's/^ TITLE=(.*)/1/p';
getTitleEyed() p';
getTitleInfo() mp3info -p %t "$1";
getTitleId3() Title *): (.*)/2/p';
getTitleExif() exiftool -title -b "$1";
getTitleId3i() id3info "$1"
getTitleTool() id3tool "$1"
for prog in FF LL Eyed Info Id3 Exif Id3i Tool; do
echo "=== getTitle$prog ==="
time
for file in *.mp3; do
if "getTitle$prog" "$file" | grep -q "$keyword"; then
echo "$file"
fi
done
done
Notes:
lltagandmp3infodon't find a title, because the files I was using had ID3v2 tags, see the comment by @s-prasanth: How to read mp3 tags in shell?eyeD3is problematic to use programmatically, because it uses color codes (boldness).eyeD3and alsoid3v2(but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things; thereforegetTitleEyedand sometimesgetTitleId3return both the title and the artist, so please don't copy-paste those functions.getTitleId3 will only work for ID3 v2 tags, because
id3v2has different formats for ID3v1- and ID3v2-tags, i.e.Title : Artist:vs. ID3v2:
TIT2 (Title/songname/content description):As the only program of these 5
eyeD3prints a red warning for two of the files:Invalid mode/bitrate combination for layer II
No ID3 v1.x/v2.x tag found!It seems like those two files have ID3v1 tags, because those two files are the only ones where
lltagandmp3infocan get a title. I'm wondering if this is a bug ineyeD3as no other program mentioned here has a problem with these files ...
Results (real time):
Program | Version | Time / s
----------+------------+-----------
exiftool | 10.25 | 49.5 ± 0.5
lltag | 0.14.5 | 41 ± 1.0
ffprobe | 3.1.3-1+b3 | 33 ± 0.5
eyeD3 | 0.6.18 | 24 ± 0.5
id3info | 3.8.3 | 4.2 ± 0.1
id3v2 | 0.1.12 | 2.9 ± 0.1
id3tool | 1.2a | 1.7 ± 0.1
mp3info | 0.8.5a | 1.4 ± 0.1
Time-wise the winner here is id3tool (mp3info is faster, but doesn't work with ID3 v2).id3v2 is also quite fast, but the getTitleId3 function would need adjustment to also work with ID3v1-tags, which may at worst slow it down by factor 2.
You can also use ffprobe which is part of ffmpeg.
sudo apt-get install ffmpeg
ffprobe file.mp3
If you don't want other information, like track length and so on, you can combine the output with grep:
ffprobe file.mp3 2>&1 | grep -A90 'Metadata:'
Or in order to get only the author:
ffprobe -loglevel error -show_entries format_tags=artist -of default=noprint_wrappers=1:nokey=1 file.mp3
You can select other tags by separating them with a comma, such as format_tags=title,album.
I wanted to search for a keyword in all mp3 files in a folder. The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. Here is the loop I used:
# sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool
keyword='fill_me_in'
getTitleFF() ffprobe "$1" 2>&1
getTitleLL() sed -nE 's/^ TITLE=(.*)/1/p';
getTitleEyed() p';
getTitleInfo() mp3info -p %t "$1";
getTitleId3() Title *): (.*)/2/p';
getTitleExif() exiftool -title -b "$1";
getTitleId3i() id3info "$1"
getTitleTool() id3tool "$1"
for prog in FF LL Eyed Info Id3 Exif Id3i Tool; do
echo "=== getTitle$prog ==="
time
for file in *.mp3; do
if "getTitle$prog" "$file" | grep -q "$keyword"; then
echo "$file"
fi
done
done
Notes:
lltagandmp3infodon't find a title, because the files I was using had ID3v2 tags, see the comment by @s-prasanth: How to read mp3 tags in shell?eyeD3is problematic to use programmatically, because it uses color codes (boldness).eyeD3and alsoid3v2(but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things; thereforegetTitleEyedand sometimesgetTitleId3return both the title and the artist, so please don't copy-paste those functions.getTitleId3 will only work for ID3 v2 tags, because
id3v2has different formats for ID3v1- and ID3v2-tags, i.e.Title : Artist:vs. ID3v2:
TIT2 (Title/songname/content description):As the only program of these 5
eyeD3prints a red warning for two of the files:Invalid mode/bitrate combination for layer II
No ID3 v1.x/v2.x tag found!It seems like those two files have ID3v1 tags, because those two files are the only ones where
lltagandmp3infocan get a title. I'm wondering if this is a bug ineyeD3as no other program mentioned here has a problem with these files ...
Results (real time):
Program | Version | Time / s
----------+------------+-----------
exiftool | 10.25 | 49.5 ± 0.5
lltag | 0.14.5 | 41 ± 1.0
ffprobe | 3.1.3-1+b3 | 33 ± 0.5
eyeD3 | 0.6.18 | 24 ± 0.5
id3info | 3.8.3 | 4.2 ± 0.1
id3v2 | 0.1.12 | 2.9 ± 0.1
id3tool | 1.2a | 1.7 ± 0.1
mp3info | 0.8.5a | 1.4 ± 0.1
Time-wise the winner here is id3tool (mp3info is faster, but doesn't work with ID3 v2).id3v2 is also quite fast, but the getTitleId3 function would need adjustment to also work with ID3v1-tags, which may at worst slow it down by factor 2.
edited May 30 at 11:06
answered Apr 7 '16 at 17:40
mxmlnknmxmlnkn
5734 silver badges6 bronze badges
5734 silver badges6 bronze badges
1
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
1
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please includeid3infoin your comparison?
– Vytenis Bivainis
Oct 1 '16 at 11:46
ffmpeghas another advantage: it works withaac/m4afiles. Other tools don't seem to (or do you know otherwise?). I will also suggest searching itsFORMATsection, to avoid cases where a stream also has atitleetc.:ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.
– Jonathan Y.
Jul 14 '17 at 15:33
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read withexiftoolorffprobe. The more specialized tool for this job would bemetaflac --listfrom theflacpackage. For oggexiftoolalso works, but there also isvorbiscomment -lfrom thevorbis-toolspackage. Weirdlyvorbiscommentandmetaflaccan not be interchanged, even though FLAC and OGG both have vorbis coment metadata?
– mxmlnkn
Feb 20 '18 at 15:32
add a comment
|
1
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
1
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please includeid3infoin your comparison?
– Vytenis Bivainis
Oct 1 '16 at 11:46
ffmpeghas another advantage: it works withaac/m4afiles. Other tools don't seem to (or do you know otherwise?). I will also suggest searching itsFORMATsection, to avoid cases where a stream also has atitleetc.:ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.
– Jonathan Y.
Jul 14 '17 at 15:33
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read withexiftoolorffprobe. The more specialized tool for this job would bemetaflac --listfrom theflacpackage. For oggexiftoolalso works, but there also isvorbiscomment -lfrom thevorbis-toolspackage. Weirdlyvorbiscommentandmetaflaccan not be interchanged, even though FLAC and OGG both have vorbis coment metadata?
– mxmlnkn
Feb 20 '18 at 15:32
1
1
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
Wow. I have been an exiftool power user for years and I had no idea it could also read metadata for sound files! The ffprobe (or avprobe in my case) solution is also great, thanks. This is the best answer!
– marlar
May 30 '16 at 19:34
1
1
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please include
id3info in your comparison?– Vytenis Bivainis
Oct 1 '16 at 11:46
Thanks for you gigantic work! Some of these tools are not available from my package manager in Fedora. Could you please include
id3info in your comparison?– Vytenis Bivainis
Oct 1 '16 at 11:46
ffmpeg has another advantage: it works with aac/m4a files. Other tools don't seem to (or do you know otherwise?). I will also suggest searching its FORMAT section, to avoid cases where a stream also has a title etc.: ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.– Jonathan Y.
Jul 14 '17 at 15:33
ffmpeg has another advantage: it works with aac/m4a files. Other tools don't seem to (or do you know otherwise?). I will also suggest searching its FORMAT section, to avoid cases where a stream also has a title etc.: ffprobe -loglevel error -show_entries format -i "$1" 2>&1 | sed -E -n 's|^TAG:title=(.*)$|1|p'.– Jonathan Y.
Jul 14 '17 at 15:33
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
@JonathanY. You're right, AAC encoded audio stored in a M4A-containter file has non-ID3 metadata and therefore can only be read by ffmpeg and additionally exiftool, out of the selection in my answer.
– mxmlnkn
Sep 27 '17 at 2:22
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read with
exiftool or ffprobe. The more specialized tool for this job would be metaflac --list from the flac package. For ogg exiftool also works, but there also is vorbiscomment -l from the vorbis-tools package. Weirdly vorbiscomment and metaflac can not be interchanged, even though FLAC and OGG both have vorbis coment metadata?– mxmlnkn
Feb 20 '18 at 15:32
FLACs has another metadata format different from MP4/M4A namely vorbis comment metadata, but the tags can also be read with
exiftool or ffprobe. The more specialized tool for this job would be metaflac --list from the flac package. For ogg exiftool also works, but there also is vorbiscomment -l from the vorbis-tools package. Weirdly vorbiscomment and metaflac can not be interchanged, even though FLAC and OGG both have vorbis coment metadata?– mxmlnkn
Feb 20 '18 at 15:32
add a comment
|
Ok, I found a program by myself. It is called mp3info and installed by
sudo apt-get install mp3info
To get single mp3 tags from a file, one has to call
mp3info -p %a file.mp3
which gives the artist of the file. The %a means that one want to get the artist and there are some other keys for the other tags.
20
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported bymp3info. You might want to look atid3v2- It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runsid3v2and processes the output appropriately.
– S Prasanth
Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using-Rflag withgrepto get the specified output.
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
1
Unfortunately:Only ID3 versions 1.0 and 1.1 are supported.
– simlev
Jan 8 at 21:58
add a comment
|
Ok, I found a program by myself. It is called mp3info and installed by
sudo apt-get install mp3info
To get single mp3 tags from a file, one has to call
mp3info -p %a file.mp3
which gives the artist of the file. The %a means that one want to get the artist and there are some other keys for the other tags.
20
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported bymp3info. You might want to look atid3v2- It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runsid3v2and processes the output appropriately.
– S Prasanth
Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using-Rflag withgrepto get the specified output.
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
1
Unfortunately:Only ID3 versions 1.0 and 1.1 are supported.
– simlev
Jan 8 at 21:58
add a comment
|
Ok, I found a program by myself. It is called mp3info and installed by
sudo apt-get install mp3info
To get single mp3 tags from a file, one has to call
mp3info -p %a file.mp3
which gives the artist of the file. The %a means that one want to get the artist and there are some other keys for the other tags.
Ok, I found a program by myself. It is called mp3info and installed by
sudo apt-get install mp3info
To get single mp3 tags from a file, one has to call
mp3info -p %a file.mp3
which gives the artist of the file. The %a means that one want to get the artist and there are some other keys for the other tags.
answered Dec 8 '12 at 13:33
community wiki
red_trumpet
20
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported bymp3info. You might want to look atid3v2- It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runsid3v2and processes the output appropriately.
– S Prasanth
Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using-Rflag withgrepto get the specified output.
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
1
Unfortunately:Only ID3 versions 1.0 and 1.1 are supported.
– simlev
Jan 8 at 21:58
add a comment
|
20
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported bymp3info. You might want to look atid3v2- It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runsid3v2and processes the output appropriately.
– S Prasanth
Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using-Rflag withgrepto get the specified output.
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
1
Unfortunately:Only ID3 versions 1.0 and 1.1 are supported.
– simlev
Jan 8 at 21:58
20
20
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported by
mp3info. You might want to look at id3v2 - It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runs id3v2 and processes the output appropriately.– S Prasanth
Dec 11 '12 at 8:04
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 en.wikipedia.org/wiki/ID3. A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to ibiblio.org/mp3info (See Todo) v2 tags are not supported by
mp3info. You might want to look at id3v2 - It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runs id3v2 and processes the output appropriately.– S Prasanth
Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file?
– Gowtham Gopalakrishnan
Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using
-R flag with grep to get the specified output.– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
@SPrasanth I got it. Thanks I'm using
-R flag with grep to get the specified output.– Gowtham Gopalakrishnan
Apr 23 '14 at 11:14
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
When you print the track title with %t, it prints it clipped.
– Tulains Córdova
Dec 14 '16 at 13:54
1
1
Unfortunately:
Only ID3 versions 1.0 and 1.1 are supported.– simlev
Jan 8 at 21:58
Unfortunately:
Only ID3 versions 1.0 and 1.1 are supported.– simlev
Jan 8 at 21:58
add a comment
|
You can use eyed3. First, from a terminal, install:
sudo apt-get install eyed3
Then, run:
eyeD3 song.mp3
Combine that with grep to get specific tags in one line.
eyeD3 song.mp3 | grep artist
(to strip all mp3 tags, see HERE)
1
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should beeyeD3noteyed3
– bmaupin
May 29 '13 at 4:03
Use the display plugin to output tags in the desired format:eyeD3 --plugin display -p "%t% by %a%" *.
– simlev
Jan 8 at 22:03
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
add a comment
|
You can use eyed3. First, from a terminal, install:
sudo apt-get install eyed3
Then, run:
eyeD3 song.mp3
Combine that with grep to get specific tags in one line.
eyeD3 song.mp3 | grep artist
(to strip all mp3 tags, see HERE)
1
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should beeyeD3noteyed3
– bmaupin
May 29 '13 at 4:03
Use the display plugin to output tags in the desired format:eyeD3 --plugin display -p "%t% by %a%" *.
– simlev
Jan 8 at 22:03
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
add a comment
|
You can use eyed3. First, from a terminal, install:
sudo apt-get install eyed3
Then, run:
eyeD3 song.mp3
Combine that with grep to get specific tags in one line.
eyeD3 song.mp3 | grep artist
(to strip all mp3 tags, see HERE)
You can use eyed3. First, from a terminal, install:
sudo apt-get install eyed3
Then, run:
eyeD3 song.mp3
Combine that with grep to get specific tags in one line.
eyeD3 song.mp3 | grep artist
(to strip all mp3 tags, see HERE)
edited Aug 19 '15 at 9:33
Duncan Lock
1315 bronze badges
1315 bronze badges
answered Dec 8 '12 at 13:12
philshemphilshem
1,9381 gold badge15 silver badges29 bronze badges
1,9381 gold badge15 silver badges29 bronze badges
1
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should beeyeD3noteyed3
– bmaupin
May 29 '13 at 4:03
Use the display plugin to output tags in the desired format:eyeD3 --plugin display -p "%t% by %a%" *.
– simlev
Jan 8 at 22:03
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
add a comment
|
1
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should beeyeD3noteyed3
– bmaupin
May 29 '13 at 4:03
Use the display plugin to output tags in the desired format:eyeD3 --plugin display -p "%t% by %a%" *.
– simlev
Jan 8 at 22:03
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
1
1
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer.
– red_trumpet
Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should be
eyeD3 not eyed3– bmaupin
May 29 '13 at 4:03
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should be
eyeD3 not eyed3– bmaupin
May 29 '13 at 4:03
Use the display plugin to output tags in the desired format:
eyeD3 --plugin display -p "%t% by %a%" *.– simlev
Jan 8 at 22:03
Use the display plugin to output tags in the desired format:
eyeD3 --plugin display -p "%t% by %a%" *.– simlev
Jan 8 at 22:03
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
This doesn't display ALL tags, for example no ISRC. The below mentioned program id3v2 returns also the ISRC, but no duration...
– minyves
Aug 29 at 8:45
add a comment
|
I prefer to use id3v2, just type id3v2 -l somefile.mp3.
You can also see the id3v2 man page for more specific use.
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Here is recommendedmid3v2instead because of the lack of Unicode support. Also id3v2 last update was on 2013.
– Pablo A
May 24 at 15:08
add a comment
|
I prefer to use id3v2, just type id3v2 -l somefile.mp3.
You can also see the id3v2 man page for more specific use.
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Here is recommendedmid3v2instead because of the lack of Unicode support. Also id3v2 last update was on 2013.
– Pablo A
May 24 at 15:08
add a comment
|
I prefer to use id3v2, just type id3v2 -l somefile.mp3.
You can also see the id3v2 man page for more specific use.
I prefer to use id3v2, just type id3v2 -l somefile.mp3.
You can also see the id3v2 man page for more specific use.
answered Mar 2 '16 at 2:58
PsddpPsddp
2362 silver badges4 bronze badges
2362 silver badges4 bronze badges
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Here is recommendedmid3v2instead because of the lack of Unicode support. Also id3v2 last update was on 2013.
– Pablo A
May 24 at 15:08
add a comment
|
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Here is recommendedmid3v2instead because of the lack of Unicode support. Also id3v2 last update was on 2013.
– Pablo A
May 24 at 15:08
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
This is great and works very well
– jpo38
Jun 19 '16 at 21:05
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Should definitely be the best answer, all other tools have dependencies problems on some distributions.
– Sergio
Jun 8 '17 at 22:31
Here is recommended
mid3v2 instead because of the lack of Unicode support. Also id3v2 last update was on 2013.– Pablo A
May 24 at 15:08
Here is recommended
mid3v2 instead because of the lack of Unicode support. Also id3v2 last update was on 2013.– Pablo A
May 24 at 15:08
add a comment
|
You can try exiftool(Read and write meta information in files).
"ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FLIR, FujiFilm, GE, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Motorola, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony." - ExifTool by Phil Harvey
Here is an example of the command:
exiftool test.mp3
ExifTool Version Number : 10.00
File Name : test.mp3
Directory : .
File Size : 8.2 MB
File Modification Date/Time : 2016:03:02 21:44:58+01:00
File Access Date/Time : 2016:04:06 21:34:01+02:00
File Inode Change Date/Time : 2016:03:02 21:45:36+01:00
File Permissions : rw-rw-r--
File Type : MP3
File Type Extension : mp3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Sample Rate : 44100
Channel Mode : Stereo
MS Stereo : Off
Intensity Stereo : Off
Copyright Flag : False
Original Media : False
Emphasis : None
VBR Frames : 9544
VBR Bytes : 8467680
ID3 Size : 115419
Band : Tech N9ne Collabos
Album : Strangeulation (Deluxe Edition)
Composer : Tech N9ne Collabos
Genre : Rap & Hip-Hop
Copyright : 2014 Strange Music, Inc
Title : American Horror Story (feat. Ces Cru)
Artist : Tech N9ne Collabos
Track : 10
Year : 2014
Comment :
Lyrics :
Private : (Binary data 8192 bytes, use -b option to extract)
Picture MIME Type : image/jpeg
Picture Type : Front Cover
Picture Description :
Picture : (Binary data 104371 bytes, use -b option to extract)
Audio Bitrate : 272 kbps
Date/Time Original : 2014
Duration : 0:04:09 (approx)
add a comment
|
You can try exiftool(Read and write meta information in files).
"ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FLIR, FujiFilm, GE, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Motorola, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony." - ExifTool by Phil Harvey
Here is an example of the command:
exiftool test.mp3
ExifTool Version Number : 10.00
File Name : test.mp3
Directory : .
File Size : 8.2 MB
File Modification Date/Time : 2016:03:02 21:44:58+01:00
File Access Date/Time : 2016:04:06 21:34:01+02:00
File Inode Change Date/Time : 2016:03:02 21:45:36+01:00
File Permissions : rw-rw-r--
File Type : MP3
File Type Extension : mp3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Sample Rate : 44100
Channel Mode : Stereo
MS Stereo : Off
Intensity Stereo : Off
Copyright Flag : False
Original Media : False
Emphasis : None
VBR Frames : 9544
VBR Bytes : 8467680
ID3 Size : 115419
Band : Tech N9ne Collabos
Album : Strangeulation (Deluxe Edition)
Composer : Tech N9ne Collabos
Genre : Rap & Hip-Hop
Copyright : 2014 Strange Music, Inc
Title : American Horror Story (feat. Ces Cru)
Artist : Tech N9ne Collabos
Track : 10
Year : 2014
Comment :
Lyrics :
Private : (Binary data 8192 bytes, use -b option to extract)
Picture MIME Type : image/jpeg
Picture Type : Front Cover
Picture Description :
Picture : (Binary data 104371 bytes, use -b option to extract)
Audio Bitrate : 272 kbps
Date/Time Original : 2014
Duration : 0:04:09 (approx)
add a comment
|
You can try exiftool(Read and write meta information in files).
"ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FLIR, FujiFilm, GE, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Motorola, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony." - ExifTool by Phil Harvey
Here is an example of the command:
exiftool test.mp3
ExifTool Version Number : 10.00
File Name : test.mp3
Directory : .
File Size : 8.2 MB
File Modification Date/Time : 2016:03:02 21:44:58+01:00
File Access Date/Time : 2016:04:06 21:34:01+02:00
File Inode Change Date/Time : 2016:03:02 21:45:36+01:00
File Permissions : rw-rw-r--
File Type : MP3
File Type Extension : mp3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Sample Rate : 44100
Channel Mode : Stereo
MS Stereo : Off
Intensity Stereo : Off
Copyright Flag : False
Original Media : False
Emphasis : None
VBR Frames : 9544
VBR Bytes : 8467680
ID3 Size : 115419
Band : Tech N9ne Collabos
Album : Strangeulation (Deluxe Edition)
Composer : Tech N9ne Collabos
Genre : Rap & Hip-Hop
Copyright : 2014 Strange Music, Inc
Title : American Horror Story (feat. Ces Cru)
Artist : Tech N9ne Collabos
Track : 10
Year : 2014
Comment :
Lyrics :
Private : (Binary data 8192 bytes, use -b option to extract)
Picture MIME Type : image/jpeg
Picture Type : Front Cover
Picture Description :
Picture : (Binary data 104371 bytes, use -b option to extract)
Audio Bitrate : 272 kbps
Date/Time Original : 2014
Duration : 0:04:09 (approx)
You can try exiftool(Read and write meta information in files).
"ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FLIR, FujiFilm, GE, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Motorola, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony." - ExifTool by Phil Harvey
Here is an example of the command:
exiftool test.mp3
ExifTool Version Number : 10.00
File Name : test.mp3
Directory : .
File Size : 8.2 MB
File Modification Date/Time : 2016:03:02 21:44:58+01:00
File Access Date/Time : 2016:04:06 21:34:01+02:00
File Inode Change Date/Time : 2016:03:02 21:45:36+01:00
File Permissions : rw-rw-r--
File Type : MP3
File Type Extension : mp3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Sample Rate : 44100
Channel Mode : Stereo
MS Stereo : Off
Intensity Stereo : Off
Copyright Flag : False
Original Media : False
Emphasis : None
VBR Frames : 9544
VBR Bytes : 8467680
ID3 Size : 115419
Band : Tech N9ne Collabos
Album : Strangeulation (Deluxe Edition)
Composer : Tech N9ne Collabos
Genre : Rap & Hip-Hop
Copyright : 2014 Strange Music, Inc
Title : American Horror Story (feat. Ces Cru)
Artist : Tech N9ne Collabos
Track : 10
Year : 2014
Comment :
Lyrics :
Private : (Binary data 8192 bytes, use -b option to extract)
Picture MIME Type : image/jpeg
Picture Type : Front Cover
Picture Description :
Picture : (Binary data 104371 bytes, use -b option to extract)
Audio Bitrate : 272 kbps
Date/Time Original : 2014
Duration : 0:04:09 (approx)
answered Apr 7 '16 at 19:19
blade19899blade19899
18.1k19 gold badges101 silver badges164 bronze badges
18.1k19 gold badges101 silver badges164 bronze badges
add a comment
|
add a comment
|
Check out lltag if you are looking for a solution which supports more than just mp3/ID3.
Install it with:
sudo apt-get install lltag
to view all tags with it: (-S is for show)
lltag -S somefile.mp3
to view certain tags with it:
lltag --show-tags artist,album,title,number somefile.mp3
add a comment
|
Check out lltag if you are looking for a solution which supports more than just mp3/ID3.
Install it with:
sudo apt-get install lltag
to view all tags with it: (-S is for show)
lltag -S somefile.mp3
to view certain tags with it:
lltag --show-tags artist,album,title,number somefile.mp3
add a comment
|
Check out lltag if you are looking for a solution which supports more than just mp3/ID3.
Install it with:
sudo apt-get install lltag
to view all tags with it: (-S is for show)
lltag -S somefile.mp3
to view certain tags with it:
lltag --show-tags artist,album,title,number somefile.mp3
Check out lltag if you are looking for a solution which supports more than just mp3/ID3.
Install it with:
sudo apt-get install lltag
to view all tags with it: (-S is for show)
lltag -S somefile.mp3
to view certain tags with it:
lltag --show-tags artist,album,title,number somefile.mp3
answered Aug 7 '15 at 0:45
0xcaff0xcaff
1639 bronze badges
1639 bronze badges
add a comment
|
add a comment
|
Beets
You can start with this screencast and the Getting started guide
Install either:
pip install beets # latest version
apt install beets # repo version
Also:
- To just read the metadata:
exiftool -v3 *.mp3 mid3v2from (python-mutagenpackage) (instead ofid3v2, last update was on 2013!)id3- Editor for ID3 tags (not the same as this id3)id3tool- Command line editor for id3 tagsid3ren- id3 tagger and renamer
add a comment
|
Beets
You can start with this screencast and the Getting started guide
Install either:
pip install beets # latest version
apt install beets # repo version
Also:
- To just read the metadata:
exiftool -v3 *.mp3 mid3v2from (python-mutagenpackage) (instead ofid3v2, last update was on 2013!)id3- Editor for ID3 tags (not the same as this id3)id3tool- Command line editor for id3 tagsid3ren- id3 tagger and renamer
add a comment
|
Beets
You can start with this screencast and the Getting started guide
Install either:
pip install beets # latest version
apt install beets # repo version
Also:
- To just read the metadata:
exiftool -v3 *.mp3 mid3v2from (python-mutagenpackage) (instead ofid3v2, last update was on 2013!)id3- Editor for ID3 tags (not the same as this id3)id3tool- Command line editor for id3 tagsid3ren- id3 tagger and renamer
Beets
You can start with this screencast and the Getting started guide
Install either:
pip install beets # latest version
apt install beets # repo version
Also:
- To just read the metadata:
exiftool -v3 *.mp3 mid3v2from (python-mutagenpackage) (instead ofid3v2, last update was on 2013!)id3- Editor for ID3 tags (not the same as this id3)id3tool- Command line editor for id3 tagsid3ren- id3 tagger and renamer
answered May 24 at 15:29
Pablo APablo A
4,1902 gold badges21 silver badges48 bronze badges
4,1902 gold badges21 silver badges48 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f226773%2fhow-to-read-mp3-tags-in-shell%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown