Monday, April 29, 2024
43
rated 0 times [  43] [ 0]  / answers: 1 / hits: 47374  / 1 Year ago, tue, december 6, 2022, 12:04:44

What is the terminal command that can used to find the bitrate of an mp3 file?



Is there any other option available other than mpg321 -t name.mp3?


More From » command-line

 Answers
4

Simply put:



file song.mp3



Note: file is included with Ubuntu.







For alias lovers, insert this at the end of your ~/.bashrc file:



bitrate () {
echo `basename "$1"`: `file "$1" | sed 's/.*, (.*)kbps.*/1/' | tr -d " " ` kbps
}


Open a new Terminal window. You may now run the following command:



bitrate song.mp3

[#35127] Tuesday, December 6, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nguai

Total Points: 216
Total Questions: 108
Total Answers: 116

Location: Hong Kong
Member since Thu, Dec 16, 2021
2 Years ago
;