How to get video and audio bitrate from .m4v?

Started by iwenkang, November 05, 2014, 02:34:18 PM

Previous topic - Next topic

iwenkang

I tried exiftool on several .m4v video files and could not find the video and audio bitrate info. Below is a sample output of the command "exiftool 480.m4v". I think the "Avg Bitrate" is simply the average bitrate, i.e., FileSize*8/Duration, not the video stream bitrate. How do I get video bitrate and audio bitrate seperately? Your help will be much appreciated!

ExifTool Version Number         : 9.74
File Name                       : 480.m4v
Directory                       : .
File Size                       : 2.8 MB
File Modification Date/Time     : 2014:06:25 16:00:00-07:00
File Access Date/Time           : 2014:11:04 16:28:59-08:00
File Inode Change Date/Time     : 2014:11:03 11:48:29-08:00
File Permissions                : rw-rw-r--
File Type                       : MP4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.0.1
Compatible Brands               : mp42, avc1
Movie Header Version            : 0
Create Date                     : 2014:06:25 22:59:49
Modify Date                     : 2014:06:25 23:00:01
Time Scale                      : 2997
Duration                        : 15.55 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2014:06:25 22:59:45
Track Modify Date               : 2014:06:25 23:00:01
Track ID                        : 1
Track Duration                  : 15.55 s
Track Layer                     : 0
Track Volume                    : 100.00%
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Image Width                     : 854
Image Height                    : 480
Media Header Version            : 0
Media Create Date               : 2014:06:25 22:59:49
Media Modify Date               : 2014:06:25 23:00:01
Media Time Scale                : 2997
Media Duration                  : 15.55 s
Media Language Code             : eng
Handler Type                    : Video Track
Handler Description             : Apple Video Media Handler
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 854
Source Image Height             : 480
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Video Frame Rate                : 29.97
Movie Data Size                 : 2932471
Movie Data Offset               : 8480
Avg Bitrate                     : 1.51 Mbps
Image Size                      : 854x480
Rotation                        : 0

Phil Harvey

ExifTool only reports the metadata that is available (other than calculating a few Composite tags like AvgBitrate as you point out).

If they don't exist in the metadata, sometimes it requires parsing of the video stream (which ExifTool does not do) to determine some parameters.

However, you might be able to calculate AudioBitrate from the other audio tags if it is not compressed.

- 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 ($).