Command to get information about a mp3 using ffmpeg?

You can also use:

$ mpg123 -t example.mp3 2>&1 | grep -A1 -E "^MPEG"
MPEG 2.5 L III cbr32 11025 mono
  • Notice cbr32 stand for (stream) constant bit rate, here at 32 kbps.
  • And 11025 is the Sample Rate.

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

you can try:

ffmpeg -i filename

Tags:

Bash

Ffmpeg