A command to retrieve mp3 information using ffmpeg?

Is there a command with ffmpeg that returns mp3 information, for example, bit rate or sample rate?

+6
source share
3 answers

you may try:

ffmpeg -i filename 
+8
source

There is ffprobe .

Simple use:

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

will give you an exit (without displaying an additional window), for example:

  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 
+11
source

You can also use:

 $ mpg123 -t example.mp3 2>&1 | grep -A1 -E "^MPEG" MPEG 2.5 L III cbr32 11025 mono 
  • Pay attention to cbr32 stand for (stream) codec bit rate , here at 32 kbps.
  • And 11025 is the sampling rate.
0
source

Source: https://habr.com/ru/post/897580/


All Articles