Getting the language of an Audio track?

Started by meecect, March 05, 2013, 02:56:45 PM

Previous topic - Next topic

meecect

I have many video files and some of the video files have a spanish track alongside an english track.  I'm trying to use exiftool to flag those files that have a spanish track.  All of my files are .m4v.

When I look at one of these files with ffmpeg, I get something like this:

Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
    Metadata:
      creation_time   : 2013-03-05 17:54:30
Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      creation_time   : 2013-03-05 17:54:30
  Stream #0:3(spa): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 164 kb/s
    Metadata:
      creation_time   : 2013-03-05 17:54:30
  Stream #0:4(spa): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s

Notice that I have two English streams (eng) and two Spanish streams (spa)

Exiftool, without any parameters gives me this:

Track 2 Name                    : Stereo
Track 3 Name                    : Surround
Audio Format                    : mp4a
Track 4 Name                    : Stereo
Balance                         : 0
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Track 5 Name                    : Surround

Are there flags I can give to exiftool to find out the language of these audio tracks?

Phil Harvey

I'm not sure.  You can start by adding -a and -G1 so you are sure you aren't missing any tags.  If that doesn't do it, if you can send me the file I'll take a look and see if I can figure out where the information is hidden.  My email is philharvey66 at gmail.com

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

meecect

Thank you for the quick reply. Indeed, those flags seem to do the trick.  With -a, I get this additional info:

Media Header Version            : 0
Media Create Date               : 2013:03:05 17:54:30
Media Modify Date               : 2013:03:05 18:29:45
Media Time Scale                : 48000
Media Duration                  : 1:26:46
Media Language Code             : eng

Adding the G1 I get track numbers which makes it easier to keep the various tracks straight, eg:

[Track2]        Media Header Version            : 0
[Track2]        Media Create Date               : 2013:03:05 17:54:30
[Track2]        Media Modify Date               : 2013:03:05 18:29:45
[Track2]        Media Time Scale                : 48000
[Track2]        Media Duration                  : 1:26:46
[Track2]        Media Language Code             : eng

I apologize for not finding these flags by myself... the number of flags seemed very daunting.