Audio bitrate for MP4

Started by thany, March 09, 2015, 12:06:36 PM

Previous topic - Next topic

thany

So far I've been unable to squeeze the audio bitrate from an MP4 file. Video bitrate is identified by AvgBitrate, but audio bitrate seems nowhere to be found. Loading an MP4 into Avidemux I can get to the audio bitrate perfectly fine, so it can, in principle, be determined/extracted from an MP4.

I'm using Windows 7 x64 and Exitfool 9.89.

This is my very simple command line:
exiftool video.mp4
And staying relevant to audio tags, here they are:
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 44100


As for WMV, the audio bitrate is reported:
Audio Codec Name                : Windows Media Audio 9.2
Audio Codec Description         : 192 kbps, 48 kHz, stereo 2-pass CBR
Audio Codec ID                  : Windows Media Audio V2 V7 V8 V9 / DivX audio (WMA) / Alex AC3 Audio
Audio Channels                  : 2
Audio Sample Rate               : 48000

Albeit in text format, but at least it's there.

A MKV has the same problem as the MP4: audio bitrate isn't there. Also oddly enough, the audio codec in a MKV is identified by VideoCodecID?...

Phil Harvey

The 192 kbps in the WMV is just 48 kHz * 2 bytes per sample * 2 channels (stereo).  You can calculate this for the mp4a just the same: AudioSampleRate * AudioBitsPerSample/8 * AudioChannels.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Silico

The bitrate of an uncompressed 48kHz stereo stream of 16 bit samples is 192 k bytes per sec. So the codec is cutting it down by a factor of 8 to get 192 k bits per second.

So you can't derive the encoded audio bitrate from the other variables.

The video files I've tested don't report the "Audio Codec Description", so I'm not currently able to extract the audio bitrate using exiftool.