Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command to get information about a mp3 using ffmpeg?

Tags:

Is there a command with ffmpeg that returns information about an mp3 like the bitrate or sampling frequency?

like image 450
user784637 Avatar asked Sep 18 '11 23:09

user784637


2 Answers

There is a ffprobe.

Simple usage:

ffprobe foo.mp3 2>&1 | grep -A1 Duration:

will give you output (without displaying any extra window) like:

  Duration: 00:03:10.48, start: 0.000000, bitrate: 128 kb/s
    Stream #0.0: Audio: mp3, 22050 Hz, 2 channels, s16, 128 kb/s
like image 173
Michał Šrajer Avatar answered Sep 21 '22 03:09

Michał Šrajer


you can try:

ffmpeg -i filename
like image 25
Davide Piras Avatar answered Sep 22 '22 03:09

Davide Piras