Sur OS X, vous pouvez simplement utiliser mdls
ou mdfind
.
$ mdls 01\ Kindred.mp3
kMDItemAlbum = "Kindred EP"
kMDItemAudioBitRate = 320000
kMDItemAudioChannelCount = 2
kMDItemAudioSampleRate = 44100
kMDItemAudioTrackNumber = 1
kMDItemAuthors = (
Burial
)
kMDItemComment = "HDB059"
kMDItemContentCreationDate = 2012-03-19 21:20:59 +0000
kMDItemContentModificationDate = 2012-06-04 16:07:09 +0000
kMDItemContentType = "public.mp3"
kMDItemContentTypeTree = (
"public.mp3",
"public.audio",
"public.audiovisual-content",
"public.data",
"public.item",
"public.content"
)
kMDItemDateAdded = 2012-04-02 19:49:07 +0000
kMDItemDisplayName = "01 Kindred.mp3"
kMDItemDurationSeconds = 686.08
kMDItemFSContentChangeDate = 2012-06-04 16:07:09 +0000
kMDItemFSCreationDate = 2012-03-19 21:20:59 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = 0
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = 0
kMDItemFSLabel = 0
kMDItemFSName = "01 Kindred.mp3"
kMDItemFSNodeCount = 27457838
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 27457838
kMDItemFSTypeCode = ""
kMDItemKind = "MP3 audio"
kMDItemLogicalSize = 27457838
kMDItemMediaTypes = (
Sound
)
kMDItemMusicalGenre = "Dubstep"
kMDItemPhysicalSize = 27459584
kMDItemRecordingYear = 2012
kMDItemTitle = "Kindred"
kMDItemTotalBitRate = 320000
mdfind -onlyin ~/Music 'kMDItemFSName==*.mp3&&kMDItemAudioBitRate<=192000'
Pour une sortie facile à analyser, essayez ffprobe -show_format 2>/dev/null
de FFmpeg.
Sur OS X, vous pouvez l'installer via Homebrew via brew install ffmpeg
.
$ ffprobe *.mp3 -show_format 2>/dev/null [FORMAT] filename=02. Salvadoro Dali.mp3 nb_streams=2 format_name=mp3 format_long_name=MPEG audio layer 2/3 start_time=0.000000 duration=300.254667 size=7206112 bit_rate=191999 TAG:title=Salvadoro Dali TAG:artist=Siela TAG:track=2/10 TAG:album=Dali TAG:date=2005 TAG:genre=Gothic rock TAG:replaygain_album_peak=1.188815 TAG:replaygain_track_peak=1.178607 TAG:replaygain_track_gain=-9.00 dB TAG:replaygain_album_gain=-9.12 dB TAG:album_artist=Siela [/FORMAT]
Dans un script :
find -iname '*.mp3' | while read -r file; do
bitrate=$(ffprobe "$file" -show_format 2>/dev/null |
awk -F"=" '$1 == "bit_rate" {print $2}')
if (( bitrate <= 128000 )); then
echo "[$bitrate] $file"
fi
done
EDIT :je viens de trouver un programme Linux
Sous Linux, mp3info :
mp3info -p "%Q %L %v %o %r" test.mp3
output:
48000 III 1.000000 joint stereo
Je sais que vous voulez une solution Linux ; cependant, d'après la façon dont vous avez formulé votre question, il semble qu'une solution Windows ne soit pas complètement épuisée...
Sous Windows, tag.exe fera le travail.
Exemple :
C:\mp3>tag.exe "test.mp3"
Tag - Automatic Tag from filename
Copyright (c) 2002-2003 Case. Minor additions by Neil Popham, 2004-2007
Version 2.0.52, Compiled 2007-05-04
C:\dl\test.mp3
Format: MPEG 1 Layer 3, Joint Stereo
Details: 44100 Hz Stereo, 128 kbps, playtime 05:24
Tag: ID3v2
Pour obtenir uniquement le débit :
C:\mp3>tag.exe "test.mp3" 2>&1 | findstr /i "Details:"
Details: 44100 Hz Stereo, 128 kbps, playtime 05:24