ExifTool Forum

General => Metadata => Topic started by: Crusty on December 21, 2021, 08:17:13 AM

Title: 5.1 Audio Channels
Post by: Crusty on December 21, 2021, 08:17:13 AM
Hi there,

Could someone let me know how to find out if an .mp4 file has surround sound audio? I've been using the following command to catalogue my library of .mp4 files...

ExifTool -csv -r . -ext mp4 -Duration -ImageWidth -ImageHeight -Title -Comment -AudioChannels -ContentCreateDate# >\ExifData.csv

...but -AudioChannels only comes back with '2' even though File Properties in Windows Explorer shows 6 for files that are 5.1 audio.

Thanks!
Title: Re: 5.1 Audio Channels
Post by: Phil Harvey on December 21, 2021, 08:21:56 AM
This could be another case of metadata that is not being properly written.  I'm guessing that this information is also available in the audio stream (which ExifTool is not processing).

- Phil
Title: Re: 5.1 Audio Channels
Post by: Crusty on December 21, 2021, 01:08:06 PM
Hi Phil,

Thanks for the swift reply. With the files I have, it looks like it's not possible with ExifTool then, or do you have a work-around?

Thanks, Chris
Title: Re: 5.1 Audio Channels
Post by: StarGeek on December 21, 2021, 01:26:04 PM
You would probably have to use FFProbe (part of the FFMpeg package) or something similar and script something up.
Title: Re: 5.1 Audio Channels
Post by: Crusty on December 22, 2021, 05:04:15 AM
Superbness! That gives me...

channels=6
channel_layout=5.1


...just what I'm looking for.

Thanks StarGeek :-)