eyeD3 and also id3v2 (but only for ID3 v1 tags) return the title and the artist on the same line, which further complicates things therefore getTitleEyed and sometimes getTitleId3 return both the title and the artist, so please don't copy-paste those functions.eyeD3 is problematic to use programmatically, because it uses color codes (boldness).lltag and mp3info don't find a title, because the files I was using had ID3v2 tags, see the comment by How to read mp3 tags in shell?. GetTitleFF() " "$file" | grep -q "$keyword" then Here is the loop I used: # sudo apt-get install ffmpeg lltag eyed3 mp3info id3v2 libimage-exiftool-perl libid3-tools id3tool The folder had 486 files, so it became interesting to know which of the solutions mentioned here is the fastest. I wanted to search for a keyword in all mp3 files in a folder. You can select other tags by separating them with a comma, such as format_tags=title,album. 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 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:' You can also use ffprobe which is part of ffmpeg.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |