multiple audio tracks, more than 3 chapters, only english subs

Support for Windows users
Post Reply
CaptainKen
Posts: 7
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

multiple audio tracks, more than 3 chapters, only english subs

Post by CaptainKen »

Could someone please help me modify the code below to include the following enhancements:

- List in filename not just the 1st, but all English aco audio tracks
- If the file includes more than 3 Chapters add "cp" to end of filename
- Only add "subs" to end of filename (before any above found "cp" qualifier) if it includes English textlanguages subs.

Example filename syntax:
Oppenheimer (2023 Bluray IMAX 1080p x265 DD 5.1 DDP Atmos 5.1 DTS-HD MA 5.1 subs cp)

Code: Select all

{n.replaceTrailingBrackets()} ({y} 
{fn.match(/REMUX/)} {source} {vf} 
{vc.replace(
	'AVC' : 'x264',
	'HEVC' : 'x265'
)} 
{aco.replace(
	'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
	'Dolby Digital Plus' : 'DDP',
	'Dolby Digital' : 'DD',
	'AC3' : 'DD',
	'DTS-HD Master Audio' : 'DTS-HD MA'
)} 
{channels}
{ 'en' in {textlanguages} ? ' subs' :null in {textlanguages} ? ' UNDSUB' : null }{subt})
Best regards.
User avatar
rednoah
The Source
Posts: 23950
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by rednoah »

:?: What does the MediaInfo Inspector say for the file at hand?


1.
You can use {audio} to access any audio stream property for all audio streams.


2.
You can use {menu} to access chapter information.


3.
Here's how I'd check if a specific subtitle language is available:

Format: Select all

{ textLanguages =~ /eng/ ? ' [ENGSUB]' : null }
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 7
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by CaptainKen »

Thank you rednoah for quick reply and some details.

I only have a file that's already been processed and manually adjusted. IOW I don't have an example file containing audio or sub title tracks that I would normally use MKVToolNix to filter out. Also in my original example I added DTS-HD MA just as an example that some files also have.

My code currently extracts the first english aco audio code, but I don't know how to add multiple audio aco's to the filename?

Also don't know how to check for >3 chapters and then add "cp" if true?

MediaInfo

Code: Select all

[General]
Count                      : 349
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
UniqueID                   : 154038477547104951052278376963395130929
UniqueID/String            : 154038477547104951052278376963395130929 (0x73E2BB4D630612C4FC4C682DF5819631)
VideoCount                 : 1
AudioCount                 : 2
TextCount                  : 1
MenuCount                  : 1
Video_Format_List          : HEVC
Video_Format_WithHint_List : HEVC
Video_Codec_List           : HEVC
Video_Language_List        : en
Audio_Format_List          : AC-3 / E-AC-3
Audio_Format_WithHint_List : AC-3 / E-AC-3
Audio_Codec_List           : AC-3 / E-AC-3
Audio_Language_List        : en / en
Audio_Channels_Total       : 12
Text_Format_List           : PGS
Text_Format_WithHint_List  : PGS
Text_Codec_List            : PGS
Text_Language_List         : en
Format                     : Matroska
Format/String              : Matroska
Format/Url                 : https://matroska.org/downloads/windows.html
Format/Extensions          : mkv mk3d mka mks
Format_Commercial          : Matroska
Format_Version             : Version 4
FileSize                   : 11335640072
FileSize/String            : 10.6 GiB
FileSize/String1           : 11 GiB
FileSize/String2           : 11 GiB
FileSize/String3           : 10.6 GiB
FileSize/String4           : 10.56 GiB
Duration                   : 10825280
Duration/String            : 3h 0mn
Duration/String1           : 3h 0mn 25s 280ms
Duration/String2           : 3h 0mn
Duration/String3           : 03:00:25.280
Duration/String4           : 03:00:11:08
Duration/String5           : 03:00:25.280 (03:00:11:08)
OverallBitRate             : 8377162
OverallBitRate/String      : 8377 Kbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 259472
StreamSize                 : 3197704
StreamSize/String          : 3.05 MiB (0%)
StreamSize/String1         : 3 MiB
StreamSize/String2         : 3.0 MiB
StreamSize/String3         : 3.05 MiB
StreamSize/String4         : 3.050 MiB
StreamSize/String5         : 3.05 MiB (0%)
StreamSize_Proportion      : 0.00028
IsStreamable               : Yes
Encoded_Date               : 2025-03-12 20:40:59 UTC
Encoded_Application        : mkvmerge v90.0 ('Hanging On') 64-bit
Encoded_Application/String : mkvmerge v90.0 ('Hanging On') 64-bit
Encoded_Library            : libebml v1.4.5 + libmatroska v1.7.1
Encoded_Library/String     : libebml v1.4.5 + libmatroska v1.7.1

[Video]
Count                            : 390
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
UniqueID                         : 10847681843967364466
Format                           : HEVC
Format/String                    : HEVC
Format/Info                      : High Efficiency Video Coding
Format/Url                       : http://www.itu.int
Format_Commercial                : HEVC
Format_Profile                   : Main@L4@High
InternetMediaType                : video/H265
CodecID                          : V_MPEGH/ISO/HEVC
Duration                         : 10822145.000000
Duration/String                  : 3h 0mn
Duration/String1                 : 3h 0mn 22s 145ms
Duration/String2                 : 3h 0mn
Duration/String3                 : 03:00:22.145
Duration/String4                 : 03:00:11:08
Duration/String5                 : 03:00:22.145 (03:00:11:08)
BitRate                          : 7037782
BitRate/String                   : 7038 Kbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 1080
Height/String                    : 1080 pixel
Stored_Height                    : 1088
Sampled_Width                    : 1920
Sampled_Height                   : 1080
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 1.778
DisplayAspectRatio/String        : 16:9
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 259472
ColorSpace                       : YUV
ChromaSubsampling                : 4:2:0
ChromaSubsampling/String         : 4:2:0
BitDepth                         : 8
BitDepth/String                  : 8 bit
Bits-(Pixel*Frame)               : 0.142
Delay                            : 0
Delay/String3                    : 00:00:00.000
Delay/String4                    : 00:00:00:00
Delay/String5                    : 00:00:00.000 (00:00:00:00)
Delay_Source                     : Container
Delay_Source/String              : Container
StreamSize                       : 9520487195
StreamSize/String                : 8.87 GiB (84%)
StreamSize/String1               : 9 GiB
StreamSize/String2               : 8.9 GiB
StreamSize/String3               : 8.87 GiB
StreamSize/String4               : 8.867 GiB
StreamSize/String5               : 8.87 GiB (84%)
StreamSize_Proportion            : 0.83987
Language                         : en
Language/String                  : en
Language/String1                 : en
Language/String2                 : en
Language/String3                 : eng
Language/String4                 : en
Default                          : Yes
Default/String                   : Yes
Forced                           : No
Forced/String                    : No
colour_description_present       : Yes
colour_description_present_Sourc : Container / Stream
colour_range                     : Limited
colour_range_Source              : Container / Stream
colour_primaries                 : BT.709
colour_primaries_Source          : Container / Stream
transfer_characteristics         : BT.709
transfer_characteristics_Source  : Container / Stream
matrix_coefficients              : BT.709
matrix_coefficients_Source       : Container / Stream

[Audio]
Count                      : 301
StreamCount                : 2
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 0
StreamKindPos              : 1
StreamOrder                : 1
ID                         : 2
ID/String                  : 2
UniqueID                   : 2626030937765111260
Format                     : AC-3
Format/String              : AC-3
Format/Info                : Audio Coding 3
Format/Url                 : https://en.wikipedia.org/wiki/AC3
Format_Commercial          : Dolby Digital
Format_Commercial_IfAny    : Dolby Digital
Format_Settings_Endianness : Big
CodecID                    : A_AC3
Duration                   : 10822176.000000
Duration/String            : 3h 0mn
Duration/String1           : 3h 0mn 22s 176ms
Duration/String2           : 3h 0mn
Duration/String3           : 03:00:22.176
Duration/String5           : 03:00:22.176
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 519464448
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 338193
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 865774080
StreamSize/String          : 826 MiB (8%)
StreamSize/String1         : 826 MiB
StreamSize/String2         : 826 MiB
StreamSize/String3         : 826 MiB
StreamSize/String4         : 825.7 MiB
StreamSize/String5         : 826 MiB (8%)
StreamSize_Proportion      : 0.07638
Title                      : Dolby Digital 5.1
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 8
dialnorm                   : -31 dB
acmod                      : 7
lfeon                      : 1
cmixlev                    : -4.5 dB
surmixlev                  : -6 dB
dialnorm_Average           : -31 dB
dialnorm_Minimum           : -31 dB
dialnorm_Maximum           : -31 dB
dialnorm_Count             : 742

[Audio]
Count                      : 306
StreamCount                : 2
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 1
StreamKindPos              : 2
StreamOrder                : 2
ID                         : 3
ID/String                  : 3
UniqueID                   : 4242192811328277948
Format                     : E-AC-3
Format/String              : E-AC-3
Format/Info                : Enhanced AC-3
Format/Url                 : https://en.wikipedia.org/wiki/Dolby_Digital_Plus
Format_Commercial          : Dolby Digital Plus
Format_Commercial_IfAny    : Dolby Digital Plus
Format_Settings_Endianness : Big
InternetMediaType          : audio/eac3
CodecID                    : A_EAC3
Duration                   : 10825280.000000
Duration/String            : 3h 0mn
Duration/String1           : 3h 0mn 25s 280ms
Duration/String2           : 3h 0mn
Duration/String3           : 03:00:25.280
Duration/String5           : 03:00:25.280
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 519613440
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 338290
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 866022400
StreamSize/String          : 826 MiB (8%)
StreamSize/String1         : 826 MiB
StreamSize/String2         : 826 MiB
StreamSize/String3         : 826 MiB
StreamSize/String4         : 825.9 MiB
StreamSize/String5         : 826 MiB (8%)
StreamSize_Proportion      : 0.07640
Title                      : Dolby Digital EX 5.1
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 16
dialnorm                   : -25 dB
compr                      : -0.28 dB
acmod                      : 7
lfeon                      : 1
dialnorm_Average           : -25 dB
dialnorm_Minimum           : -25 dB
dialnorm_Maximum           : -25 dB
dialnorm_Count             : 742
compr_Average              : 5.44 dB
compr_Minimum              : 0.53 dB
compr_Maximum              : 6.02 dB
compr_Count                : 740

[Text]
Count                 : 305
StreamCount           : 1
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 0
StreamOrder           : 3
ID                    : 4
ID/String             : 4
UniqueID              : 18066139241367934469
Format                : PGS
Format/String         : PGS
Format_Commercial     : PGS
CodecID               : S_HDMV/PGS
CodecID/Info          : Picture based subtitle format used on BDs/HD-DVDs
Duration              : 10392465.000000
Duration/String       : 2h 53mn
Duration/String1      : 2h 53mn 12s 465ms
Duration/String2      : 2h 53mn
Duration/String3      : 02:53:12.465
Duration/String4      : 01:42:53
Duration/String5      : 02:53:12.465 (01:42:53)
BitRate               : 61705
BitRate/String        : 61.7 Kbps
FrameRate             : 0.594
FrameRate/String      : 0.594 fps
FrameCount            : 6172
ElementCount          : 6172
StreamSize            : 80158693
StreamSize/String     : 76.4 MiB (1%)
StreamSize/String1    : 76 MiB
StreamSize/String2    : 76 MiB
StreamSize/String3    : 76.4 MiB
StreamSize/String4    : 76.45 MiB
StreamSize/String5    : 76.4 MiB (1%)
StreamSize_Proportion : 0.00707
Title                 : English SDH
Language              : en
Language/String       : en
Language/String1      : en
Language/String2      : en
Language/String3      : eng
Language/String4      : en
Default               : No
Default/String        : No
Forced                : No
Forced/String         : No

[Menu]
Count              : 121
StreamCount        : 1
StreamKind         : Menu
StreamKind/String  : Menu
StreamKindID       : 0
Chapters_Pos_Begin : 101
Chapters_Pos_End   : 121
00:00:00.000       : Chapter 01
00:07:23.526       : Chapter 02
00:16:36.078       : Chapter 03
00:27:24.017       : Chapter 04
00:36:01.701       : Chapter 05
00:42:51.652       : Chapter 06
00:52:31.607       : Chapter 07
00:59:56.593       : Chapter 08
01:10:53.583       : Chapter 09
01:17:58.215       : Chapter 10
01:24:14.341       : Chapter 11
01:36:07.011       : Chapter 12
01:43:06.931       : Chapter 13
01:51:19.631       : Chapter 14
02:00:18.378       : Chapter 15
02:09:02.193       : Chapter 16
02:17:08.637       : Chapter 17
02:32:05.199       : Chapter 18
02:47:40.759       : Chapter 19
02:54:12.734       : Chapter 20
User avatar
rednoah
The Source
Posts: 23950
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by rednoah »

CaptainKen wrote: 13 May 2025, 03:41 My code currently extracts the first english aco audio code, but I don't know how to add multiple audio aco's to the filename?
{aco} already considers multiple audio streams but will generally only yield one value. There is no {aco} for all audio streams. {aco} is based on audio.Codec_Profile and audio.Format_Profile and audio.Format_Commercial depending on the file at hand.

:idea: audio.Format_Commercial will work for the specific file information posted above:

Format: Select all

{ audio.Format_Commercial }

CaptainKen wrote: 13 May 2025, 03:41 Also don't know how to check for >3 chapters and then add "cp" if true?
I don't have a test file at hand but based on the file information above this should work:

Format: Select all

{ menu.count{ it =~ /:/ } >= 3 ? ' [3+ CHAPTERS]' : null }
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 7
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by CaptainKen »

rednoah wrote: 13 May 2025, 09:59
CaptainKen wrote: 13 May 2025, 03:41 My code currently extracts the first english aco audio code, but I don't know how to add multiple audio aco's to the filename?
{aco} already considers multiple audio streams but will generally only yield one value. There is no {aco} for all audio streams. {aco} is based on audio.Codec_Profile and audio.Format_Profile and audio.Format_Commercial depending on the file at hand.

:idea: audio.Format_Commercial will work for the specific file information posted above:

Format: Select all

{ audio.Format_Commercial }
I got mixed results with [audio.Format_Commercial} as shown below.

EXAMPLE 1:
Desired name: Oppenheimer (2023 Bluray IMAX 1080p x265 DD 5.1 DDP Atmos 5.1 subs cp)
Current Output: Oppenheimer (2023 Bluray 1080p x265 DD 5.1 subs cp)

Unlike the 2nd example below for Wicked, this Oppenheimer example appears to be showing only the 1st audio code.

Code: Select all

[General]
Count                      : 349
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
UniqueID                   : 154038477547104951052278376963395130929
UniqueID/String            : 154038477547104951052278376963395130929 (0x73E2BB4D630612C4FC4C682DF5819631)
VideoCount                 : 1
AudioCount                 : 2
TextCount                  : 1
MenuCount                  : 1
Video_Format_List          : HEVC
Video_Format_WithHint_List : HEVC
Video_Codec_List           : HEVC
Video_Language_List        : en
Audio_Format_List          : AC-3 / E-AC-3
Audio_Format_WithHint_List : AC-3 / E-AC-3
Audio_Codec_List           : AC-3 / E-AC-3
Audio_Language_List        : en / en
Audio_Channels_Total       : 12
Text_Format_List           : PGS
Text_Format_WithHint_List  : PGS
Text_Codec_List            : PGS
Text_Language_List         : en
Format                     : Matroska
Format/String              : Matroska
Format/Url                 : https://matroska.org/downloads/windows.html
Format/Extensions          : mkv mk3d mka mks
Format_Commercial          : Matroska
Format_Version             : Version 4
FileSize                   : 11335640072
FileSize/String            : 10.6 GiB
FileSize/String1           : 11 GiB
FileSize/String2           : 11 GiB
FileSize/String3           : 10.6 GiB
FileSize/String4           : 10.56 GiB
Duration                   : 10825280
Duration/String            : 3h 0mn
Duration/String1           : 3h 0mn 25s 280ms
Duration/String2           : 3h 0mn
Duration/String3           : 03:00:25.280
Duration/String4           : 03:00:11:08
Duration/String5           : 03:00:25.280 (03:00:11:08)
OverallBitRate             : 8377162
OverallBitRate/String      : 8377 Kbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 259472
StreamSize                 : 3197704
StreamSize/String          : 3.05 MiB (0%)
StreamSize/String1         : 3 MiB
StreamSize/String2         : 3.0 MiB
StreamSize/String3         : 3.05 MiB
StreamSize/String4         : 3.050 MiB
StreamSize/String5         : 3.05 MiB (0%)
StreamSize_Proportion      : 0.00028
IsStreamable               : Yes
Encoded_Date               : 2025-03-12 20:40:59 UTC
Encoded_Application        : mkvmerge v90.0 ('Hanging On') 64-bit
Encoded_Application/String : mkvmerge v90.0 ('Hanging On') 64-bit
Encoded_Library            : libebml v1.4.5 + libmatroska v1.7.1
Encoded_Library/String     : libebml v1.4.5 + libmatroska v1.7.1

[Video]
Count                            : 390
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
UniqueID                         : 10847681843967364466
Format                           : HEVC
Format/String                    : HEVC
Format/Info                      : High Efficiency Video Coding
Format/Url                       : http://www.itu.int
Format_Commercial                : HEVC
Format_Profile                   : Main@L4@High
InternetMediaType                : video/H265
CodecID                          : V_MPEGH/ISO/HEVC
Duration                         : 10822145.000000
Duration/String                  : 3h 0mn
Duration/String1                 : 3h 0mn 22s 145ms
Duration/String2                 : 3h 0mn
Duration/String3                 : 03:00:22.145
Duration/String4                 : 03:00:11:08
Duration/String5                 : 03:00:22.145 (03:00:11:08)
BitRate                          : 7037782
BitRate/String                   : 7038 Kbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 1080
Height/String                    : 1080 pixel
Stored_Height                    : 1088
Sampled_Width                    : 1920
Sampled_Height                   : 1080
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 1.778
DisplayAspectRatio/String        : 16:9
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 259472
ColorSpace                       : YUV
ChromaSubsampling                : 4:2:0
ChromaSubsampling/String         : 4:2:0
BitDepth                         : 8
BitDepth/String                  : 8 bit
Bits-(Pixel*Frame)               : 0.142
Delay                            : 0
Delay/String3                    : 00:00:00.000
Delay/String4                    : 00:00:00:00
Delay/String5                    : 00:00:00.000 (00:00:00:00)
Delay_Source                     : Container
Delay_Source/String              : Container
StreamSize                       : 9520487195
StreamSize/String                : 8.87 GiB (84%)
StreamSize/String1               : 9 GiB
StreamSize/String2               : 8.9 GiB
StreamSize/String3               : 8.87 GiB
StreamSize/String4               : 8.867 GiB
StreamSize/String5               : 8.87 GiB (84%)
StreamSize_Proportion            : 0.83987
Language                         : en
Language/String                  : en
Language/String1                 : en
Language/String2                 : en
Language/String3                 : eng
Language/String4                 : en
Default                          : Yes
Default/String                   : Yes
Forced                           : No
Forced/String                    : No
colour_description_present       : Yes
colour_description_present_Sourc : Container / Stream
colour_range                     : Limited
colour_range_Source              : Container / Stream
colour_primaries                 : BT.709
colour_primaries_Source          : Container / Stream
transfer_characteristics         : BT.709
transfer_characteristics_Source  : Container / Stream
matrix_coefficients              : BT.709
matrix_coefficients_Source       : Container / Stream

[Audio]
Count                      : 301
StreamCount                : 2
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 0
StreamKindPos              : 1
StreamOrder                : 1
ID                         : 2
ID/String                  : 2
UniqueID                   : 2626030937765111260
Format                     : AC-3
Format/String              : AC-3
Format/Info                : Audio Coding 3
Format/Url                 : https://en.wikipedia.org/wiki/AC3
Format_Commercial          : Dolby Digital
Format_Commercial_IfAny    : Dolby Digital
Format_Settings_Endianness : Big
CodecID                    : A_AC3
Duration                   : 10822176.000000
Duration/String            : 3h 0mn
Duration/String1           : 3h 0mn 22s 176ms
Duration/String2           : 3h 0mn
Duration/String3           : 03:00:22.176
Duration/String5           : 03:00:22.176
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 519464448
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 338193
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 865774080
StreamSize/String          : 826 MiB (8%)
StreamSize/String1         : 826 MiB
StreamSize/String2         : 826 MiB
StreamSize/String3         : 826 MiB
StreamSize/String4         : 825.7 MiB
StreamSize/String5         : 826 MiB (8%)
StreamSize_Proportion      : 0.07638
Title                      : Dolby Digital 5.1
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 8
dialnorm                   : -31 dB
acmod                      : 7
lfeon                      : 1
cmixlev                    : -4.5 dB
surmixlev                  : -6 dB
dialnorm_Average           : -31 dB
dialnorm_Minimum           : -31 dB
dialnorm_Maximum           : -31 dB
dialnorm_Count             : 742

[Audio]
Count                      : 306
StreamCount                : 2
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 1
StreamKindPos              : 2
StreamOrder                : 2
ID                         : 3
ID/String                  : 3
UniqueID                   : 4242192811328277948
Format                     : E-AC-3
Format/String              : E-AC-3
Format/Info                : Enhanced AC-3
Format/Url                 : https://en.wikipedia.org/wiki/Dolby_Digital_Plus
Format_Commercial          : Dolby Digital Plus
Format_Commercial_IfAny    : Dolby Digital Plus
Format_Settings_Endianness : Big
InternetMediaType          : audio/eac3
CodecID                    : A_EAC3
Duration                   : 10825280.000000
Duration/String            : 3h 0mn
Duration/String1           : 3h 0mn 25s 280ms
Duration/String2           : 3h 0mn
Duration/String3           : 03:00:25.280
Duration/String5           : 03:00:25.280
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 519613440
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 338290
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 866022400
StreamSize/String          : 826 MiB (8%)
StreamSize/String1         : 826 MiB
StreamSize/String2         : 826 MiB
StreamSize/String3         : 826 MiB
StreamSize/String4         : 825.9 MiB
StreamSize/String5         : 826 MiB (8%)
StreamSize_Proportion      : 0.07640
Title                      : Dolby Digital EX 5.1
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 16
dialnorm                   : -25 dB
compr                      : -0.28 dB
acmod                      : 7
lfeon                      : 1
dialnorm_Average           : -25 dB
dialnorm_Minimum           : -25 dB
dialnorm_Maximum           : -25 dB
dialnorm_Count             : 742
compr_Average              : 5.44 dB
compr_Minimum              : 0.53 dB
compr_Maximum              : 6.02 dB
compr_Count                : 740

[Text]
Count                 : 305
StreamCount           : 1
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 0
StreamOrder           : 3
ID                    : 4
ID/String             : 4
UniqueID              : 18066139241367934469
Format                : PGS
Format/String         : PGS
Format_Commercial     : PGS
CodecID               : S_HDMV/PGS
CodecID/Info          : Picture based subtitle format used on BDs/HD-DVDs
Duration              : 10392465.000000
Duration/String       : 2h 53mn
Duration/String1      : 2h 53mn 12s 465ms
Duration/String2      : 2h 53mn
Duration/String3      : 02:53:12.465
Duration/String4      : 01:42:53
Duration/String5      : 02:53:12.465 (01:42:53)
BitRate               : 61705
BitRate/String        : 61.7 Kbps
FrameRate             : 0.594
FrameRate/String      : 0.594 fps
FrameCount            : 6172
ElementCount          : 6172
StreamSize            : 80158693
StreamSize/String     : 76.4 MiB (1%)
StreamSize/String1    : 76 MiB
StreamSize/String2    : 76 MiB
StreamSize/String3    : 76.4 MiB
StreamSize/String4    : 76.45 MiB
StreamSize/String5    : 76.4 MiB (1%)
StreamSize_Proportion : 0.00707
Title                 : English SDH
Language              : en
Language/String       : en
Language/String1      : en
Language/String2      : en
Language/String3      : eng
Language/String4      : en
Default               : No
Default/String        : No
Forced                : No
Forced/String         : No

[Menu]
Count              : 121
StreamCount        : 1
StreamKind         : Menu
StreamKind/String  : Menu
StreamKindID       : 0
Chapters_Pos_Begin : 101
Chapters_Pos_End   : 121
00:00:00.000       : Chapter 01
00:07:23.526       : Chapter 02
00:16:36.078       : Chapter 03
00:27:24.017       : Chapter 04
00:36:01.701       : Chapter 05
00:42:51.652       : Chapter 06
00:52:31.607       : Chapter 07
00:59:56.593       : Chapter 08
01:10:53.583       : Chapter 09
01:17:58.215       : Chapter 10
01:24:14.341       : Chapter 11
01:36:07.011       : Chapter 12
01:43:06.931       : Chapter 13
01:51:19.631       : Chapter 14
02:00:18.378       : Chapter 15
02:09:02.193       : Chapter 16
02:17:08.637       : Chapter 17
02:32:05.199       : Chapter 18
02:47:40.759       : Chapter 19
02:54:12.734       : Chapter 20

EXAMPLE 2:
Desired name: Wicked (2024 WEBDL 1080p x264 DDP 5.1 DDP Atmos 5.1 subs cp)
Current Output: Wicked (2024 WEBDL 1080p x264 DDP [Dolby Digital Plus, Dolby Digital, Dolby Digital Plus with Dolby Atmos, Dolby Digital]5.1 subs cp)

a) This file only has DDP 5.1 and DDP Atmos 5.1.
b) Notice how "DDP" is separated from the rest and outside the "[]".
c) I don't see how to remove the "[]" brackets?
d) Is there a way to use my defined audio code abbreviations?
e) Also, wow do I keep "IMAX" in title?

Code: Select all

[General]
Count                      : 349
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
UniqueID                   : 47109962570717406131359202428059969611
UniqueID/String            : 47109962570717406131359202428059969611 (0x23710C7B7ED43AF7FDE0B9113DE4E84B)
VideoCount                 : 1
AudioCount                 : 4
TextCount                  : 3
MenuCount                  : 1
Video_Format_List          : AVC
Video_Format_WithHint_List : AVC
Video_Codec_List           : AVC
Video_Language_List        : en (US)
Audio_Format_List          : E-AC-3 / AC-3 / E-AC-3 JOC / AC-3
Audio_Format_WithHint_List : E-AC-3 / AC-3 / E-AC-3 JOC / AC-3
Audio_Codec_List           : E-AC-3 / AC-3 / E-AC-3 JOC / AC-3
Audio_Language_List        : it /  / en / en
Audio_Channels_Total       : 24
Text_Format_List           : UTF-8 / UTF-8 / UTF-8
Text_Format_WithHint_List  : UTF-8 / UTF-8 / UTF-8
Text_Codec_List            : UTF-8 / UTF-8 / UTF-8
Text_Language_List         : it / en (US) / en (US)
Format                     : Matroska
Format/String              : Matroska
Format/Url                 : https://matroska.org/downloads/windows.html
Format/Extensions          : mkv mk3d mka mks
Format_Commercial          : Matroska
Format_Version             : Version 4
FileSize                   : 14682673481
FileSize/String            : 13.7 GiB
FileSize/String1           : 14 GiB
FileSize/String2           : 14 GiB
FileSize/String3           : 13.7 GiB
FileSize/String4           : 13.67 GiB
Duration                   : 9702496
Duration/String            : 2h 41mn
Duration/String1           : 2h 41mn 42s 496ms
Duration/String2           : 2h 41mn
Duration/String3           : 02:41:42.496
Duration/String4           : 02:41:32:18
Duration/String5           : 02:41:42.496 (02:41:32:18)
OverallBitRate             : 12106306
OverallBitRate/String      : 12.1 Mbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 232626
StreamSize                 : 3833716
StreamSize/String          : 3.66 MiB (0%)
StreamSize/String1         : 4 MiB
StreamSize/String2         : 3.7 MiB
StreamSize/String3         : 3.66 MiB
StreamSize/String4         : 3.656 MiB
StreamSize/String5         : 3.66 MiB (0%)
StreamSize_Proportion      : 0.00026
IsStreamable               : Yes
Encoded_Date               : 2024-12-31 11:28:43 UTC
Encoded_Application        : mkvmerge v88.0 ('All I Know') 64-bit
Encoded_Application/String : mkvmerge v88.0 ('All I Know') 64-bit
Encoded_Library            : libebml v1.4.5 + libmatroska v1.7.1
Encoded_Library/String     : libebml v1.4.5 + libmatroska v1.7.1

[Video]
Count                            : 390
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
UniqueID                         : 3854020558580557253
Format                           : AVC
Format/String                    : AVC
Format/Info                      : Advanced Video Codec
Format/Url                       : http://developers.videolan.org/x264.html
Format_Commercial                : AVC
Format_Profile                   : High@L4
Format_Settings                  : CABAC / 4 Ref Frames
Format_Settings_CABAC            : Yes
Format_Settings_CABAC/String     : Yes
Format_Settings_RefFrames        : 4
Format_Settings_RefFrames/String : 4 frame
InternetMediaType                : video/H264
CodecID                          : V_MPEG4/ISO/AVC
CodecID/Url                      : http://ffdshow-tryout.sourceforge.net/
Duration                         : 9702443.000000
Duration/String                  : 2h 41mn
Duration/String1                 : 2h 41mn 42s 443ms
Duration/String2                 : 2h 41mn
Duration/String3                 : 02:41:42.443
Duration/String4                 : 02:41:32:18
Duration/String5                 : 02:41:42.443 (02:41:32:18)
BitRate_Mode                     : CBR
BitRate_Mode/String              : CBR
BitRate                          : 9428446
BitRate/String                   : 9428 Kbps
BitRate_Nominal                  : 10000000
BitRate_Nominal/String           : 10000 Kbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 800
Height/String                    : 800 pixel
Sampled_Width                    : 1920
Sampled_Height                   : 800
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 2.400
DisplayAspectRatio/String        : 2.40:1
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 232626
ColorSpace                       : YUV
ChromaSubsampling                : 4:2:0
ChromaSubsampling/String         : 4:2:0
BitDepth                         : 8
BitDepth/String                  : 8 bit
ScanType                         : Progressive
ScanType/String                  : Progressive
Bits-(Pixel*Frame)               : 0.256
Delay                            : 0
Delay/String3                    : 00:00:00.000
Delay/String4                    : 00:00:00:00
Delay/String5                    : 00:00:00.000 (00:00:00:00)
Delay_Source                     : Container
Delay_Source/String              : Container
StreamSize                       : 11434870770
StreamSize/String                : 10.6 GiB (78%)
StreamSize/String1               : 11 GiB
StreamSize/String2               : 11 GiB
StreamSize/String3               : 10.6 GiB
StreamSize/String4               : 10.65 GiB
StreamSize/String5               : 10.6 GiB (78%)
StreamSize_Proportion            : 0.77880
Language                         : en-US
Language/String                  : en (US)
Language/String1                 : en (US)
Language/String2                 : en
Language/String3                 : eng
Language/String4                 : en-US
Default                          : Yes
Default/String                   : Yes
Forced                           : No
Forced/String                    : No
BufferSize                       : 31250000
colour_description_present       : Yes
colour_description_present_Sourc : Stream
colour_range                     : Limited
colour_range_Source              : Stream
colour_primaries                 : BT.709
colour_primaries_Source          : Stream
transfer_characteristics         : BT.709
transfer_characteristics_Source  : Stream
matrix_coefficients              : BT.709
matrix_coefficients_Source       : Stream

[Audio]
Count                      : 306
StreamCount                : 4
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 0
StreamKindPos              : 1
StreamOrder                : 1
ID                         : 2
ID/String                  : 2
UniqueID                   : 633174562340229194
Format                     : E-AC-3
Format/String              : E-AC-3
Format/Info                : Enhanced AC-3
Format/Url                 : https://en.wikipedia.org/wiki/Dolby_Digital_Plus
Format_Commercial          : Dolby Digital Plus
Format_Commercial_IfAny    : Dolby Digital Plus
Format_Settings_Endianness : Big
InternetMediaType          : audio/eac3
CodecID                    : A_EAC3
Duration                   : 9702464.000000
Duration/String            : 2h 41mn
Duration/String1           : 2h 41mn 42s 464ms
Duration/String2           : 2h 41mn
Duration/String3           : 02:41:42.464
Duration/String5           : 02:41:42.464
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 465718272
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 303202
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 776197120
StreamSize/String          : 740 MiB (5%)
StreamSize/String1         : 740 MiB
StreamSize/String2         : 740 MiB
StreamSize/String3         : 740 MiB
StreamSize/String4         : 740.2 MiB
StreamSize/String5         : 740 MiB (5%)
StreamSize_Proportion      : 0.05286
Title                      : E-AC3 5.1 iTA
Language                   : it
Language/String            : it
Language/String1           : it
Language/String2           : it
Language/String3           : ita
Language/String4           : it
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 16
dialnorm                   : -31 dB
compr                      : -0.28 dB
acmod                      : 7
lfeon                      : 1
dialnorm_Average           : -31 dB
dialnorm_Minimum           : -31 dB
dialnorm_Maximum           : -31 dB
dialnorm_Count             : 862
compr_Average              : -1.46 dB
compr_Minimum              : -2.87 dB
compr_Maximum              : -0.56 dB
compr_Count                : 54

[Audio]
Count                      : 301
StreamCount                : 4
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 1
StreamKindPos              : 2
StreamOrder                : 2
ID                         : 3
ID/String                  : 3
UniqueID                   : 10676933793907164080
Format                     : AC-3
Format/String              : AC-3
Format/Info                : Audio Coding 3
Format/Url                 : https://en.wikipedia.org/wiki/AC3
Format_Commercial          : Dolby Digital
Format_Commercial_IfAny    : Dolby Digital
Format_Settings_Endianness : Big
CodecID                    : A_AC3
Duration                   : 9702496.000000
Duration/String            : 2h 41mn
Duration/String1           : 2h 41mn 42s 496ms
Duration/String2           : 2h 41mn
Duration/String3           : 02:41:42.496
Duration/String5           : 02:41:42.496
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 465719808
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 303203
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 776199680
StreamSize/String          : 740 MiB (5%)
StreamSize/String1         : 740 MiB
StreamSize/String2         : 740 MiB
StreamSize/String3         : 740 MiB
StreamSize/String4         : 740.2 MiB
StreamSize/String5         : 740 MiB (5%)
StreamSize_Proportion      : 0.05287
Title                      : AC3 5.1 iTA
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 8
dialnorm                   : -31 dB
acmod                      : 7
lfeon                      : 1
cmixlev                    : -3.0 dB
surmixlev                  : -3 dB
dialnorm_Average           : -31 dB
dialnorm_Minimum           : -31 dB
dialnorm_Maximum           : -31 dB
dialnorm_Count             : 862

[Audio]
Count                      : 311
StreamCount                : 4
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 2
StreamKindPos              : 3
StreamOrder                : 3
ID                         : 4
ID/String                  : 4
UniqueID                   : 5089294480397836076
Format                     : E-AC-3
Format/String              : E-AC-3 JOC
Format/Info                : Enhanced AC-3 with Joint Object Coding
Format/Url                 : https://en.wikipedia.org/wiki/Dolby_Digital_Plus
Format_Commercial          : Dolby Digital Plus with Dolby Atmos
Format_Commercial_IfAny    : Dolby Digital Plus with Dolby Atmos
Format_Settings_Endianness : Big
Format_AdditionalFeatures  : JOC
InternetMediaType          : audio/eac3
CodecID                    : A_EAC3
Duration                   : 9610336.000000
Duration/String            : 2h 40mn
Duration/String1           : 2h 40mn 10s 336ms
Duration/String2           : 2h 40mn
Duration/String3           : 02:40:10.336
Duration/String5           : 02:40:10.336
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 768000
BitRate/String             : 768 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 461296128
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 300323
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 922592256
StreamSize/String          : 880 MiB (6%)
StreamSize/String1         : 880 MiB
StreamSize/String2         : 880 MiB
StreamSize/String3         : 880 MiB
StreamSize/String4         : 879.9 MiB
StreamSize/String5         : 880 MiB (6%)
StreamSize_Proportion      : 0.06284
Title                      : E-AC3 5.1 ENG
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : No
Default/String             : No
Forced                     : No
Forced/String              : No
ComplexityIndex            : 16
NumberOfDynamicObjects     : 15
BedChannelCount            : 1 channel
BedChannelConfiguration    : LFE
bsid                       : 16
dialnorm                   : -26 dB
compr                      : -0.28 dB
acmod                      : 7
lfeon                      : 1
dialnorm_Average           : -26 dB
dialnorm_Minimum           : -26 dB
dialnorm_Maximum           : -26 dB
dialnorm_Count             : 859
compr_Average              : 2.37 dB
compr_Minimum              : 0.53 dB
compr_Maximum              : 5.16 dB
compr_Count                : 461

[Audio]
Count                      : 301
StreamCount                : 4
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 3
StreamKindPos              : 4
StreamOrder                : 4
ID                         : 5
ID/String                  : 5
UniqueID                   : 4550124511904822869
Format                     : AC-3
Format/String              : AC-3
Format/Info                : Audio Coding 3
Format/Url                 : https://en.wikipedia.org/wiki/AC3
Format_Commercial          : Dolby Digital
Format_Commercial_IfAny    : Dolby Digital
Format_Settings_Endianness : Big
CodecID                    : A_AC3
Duration                   : 9610368.000000
Duration/String            : 2h 40mn
Duration/String1           : 2h 40mn 10s 368ms
Duration/String2           : 2h 40mn
Duration/String3           : 02:40:10.368
Duration/String5           : 02:40:10.368
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 640000
BitRate/String             : 640 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 461297664
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 300324
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 768829440
StreamSize/String          : 733 MiB (5%)
StreamSize/String1         : 733 MiB
StreamSize/String2         : 733 MiB
StreamSize/String3         : 733 MiB
StreamSize/String4         : 733.2 MiB
StreamSize/String5         : 733 MiB (5%)
StreamSize_Proportion      : 0.05236
Title                      : AC3 5.1 ENG
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : No
Default/String             : No
Forced                     : No
Forced/String              : No
bsid                       : 8
dialnorm                   : -31 dB
acmod                      : 7
lfeon                      : 1
cmixlev                    : -3.0 dB
surmixlev                  : -3 dB
dialnorm_Average           : -31 dB
dialnorm_Minimum           : -31 dB
dialnorm_Maximum           : -31 dB
dialnorm_Count             : 854

[Text]
Count                 : 304
StreamCount           : 3
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 0
StreamKindPos         : 1
StreamOrder           : 5
ID                    : 6
ID/String             : 6
UniqueID              : 2948071089280390975
Format                : UTF-8
Format/String         : UTF-8
Format_Commercial     : UTF-8
CodecID               : S_TEXT/UTF8
CodecID/Info          : UTF-8 Plain Text
Duration              : 9534192.000000
Duration/String       : 2h 38mn
Duration/String1      : 2h 38mn 54s 192ms
Duration/String2      : 2h 38mn
Duration/String3      : 02:38:54.192
Duration/String5      : 02:38:54.192
BitRate               : 1
BitRate/String        : 1 bps
FrameRate             : 0.004
FrameRate/String      : 0.004 fps
FrameCount            : 34
ElementCount          : 34
StreamSize            : 1280
StreamSize/String     : 1.25 KiB (0%)
StreamSize/String1    : 1 KiB
StreamSize/String2    : 1.2 KiB
StreamSize/String3    : 1.25 KiB
StreamSize/String4    : 1.250 KiB
StreamSize/String5    : 1.25 KiB (0%)
StreamSize_Proportion : 0.00000
Title                 : FORCED iTA
Language              : it
Language/String       : it
Language/String1      : it
Language/String2      : it
Language/String3      : ita
Language/String4      : it
Default               : No
Default/String        : No
Forced                : Yes
Forced/String         : Yes

[Text]
Count                 : 304
StreamCount           : 3
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 1
StreamKindPos         : 2
StreamOrder           : 6
ID                    : 7
ID/String             : 7
UniqueID              : 13639385409819603244
Format                : UTF-8
Format/String         : UTF-8
Format_Commercial     : UTF-8
CodecID               : S_TEXT/UTF8
CodecID/Info          : UTF-8 Plain Text
Duration              : 9014350.000000
Duration/String       : 2h 30mn
Duration/String1      : 2h 30mn 14s 350ms
Duration/String2      : 2h 30mn
Duration/String3      : 02:30:14.350
Duration/String5      : 02:30:14.350
BitRate               : 58
BitRate/String        : 58 bps
FrameRate             : 0.256
FrameRate/String      : 0.256 fps
FrameCount            : 2312
ElementCount          : 2312
StreamSize            : 65689
StreamSize/String     : 64.1 KiB (0%)
StreamSize/String1    : 64 KiB
StreamSize/String2    : 64 KiB
StreamSize/String3    : 64.1 KiB
StreamSize/String4    : 64.15 KiB
StreamSize/String5    : 64.1 KiB (0%)
StreamSize_Proportion : 0.00000
Title                 : REGULAR
Language              : en-US
Language/String       : en (US)
Language/String1      : en (US)
Language/String2      : en
Language/String3      : eng
Language/String4      : en-US
Default               : No
Default/String        : No
Forced                : No
Forced/String         : No

[Text]
Count                 : 304
StreamCount           : 3
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 2
StreamKindPos         : 3
StreamOrder           : 7
ID                    : 8
ID/String             : 8
UniqueID              : 6386159845195149853
Format                : UTF-8
Format/String         : UTF-8
Format_Commercial     : UTF-8
CodecID               : S_TEXT/UTF8
CodecID/Info          : UTF-8 Plain Text
Duration              : 9606459.000000
Duration/String       : 2h 40mn
Duration/String1      : 2h 40mn 6s 459ms
Duration/String2      : 2h 40mn
Duration/String3      : 02:40:06.459
Duration/String5      : 02:40:06.459
BitRate               : 69
BitRate/String        : 69 bps
FrameRate             : 0.308
FrameRate/String      : 0.308 fps
FrameCount            : 2954
ElementCount          : 2954
StreamSize            : 83530
StreamSize/String     : 81.6 KiB (0%)
StreamSize/String1    : 82 KiB
StreamSize/String2    : 82 KiB
StreamSize/String3    : 81.6 KiB
StreamSize/String4    : 81.57 KiB
StreamSize/String5    : 81.6 KiB (0%)
StreamSize_Proportion : 0.00001
Title                 : NON UDENTI
Language              : en-US
Language/String       : en (US)
Language/String1      : en (US)
Language/String2      : en
Language/String3      : eng
Language/String4      : en-US
Default               : No
Default/String        : No
Forced                : No
Forced/String         : No

[Menu]
Count              : 180
StreamCount        : 1
StreamKind         : Menu
StreamKind/String  : Menu
StreamKindID       : 0
Chapters_Pos_Begin : 101
Chapters_Pos_End   : 180
00:00:00.000       : en:Studio Logo
00:00:29.000       : en:Scene 02
00:03:16.000       : en:Scene 03
00:06:11.000       : en:Scene 04
00:07:19.000       : en:Scene 05
00:07:21.000       : en:Scene 06
00:08:51.000       : en:Scene 07
00:09:40.000       : en:Scene 08
00:10:37.000       : en:Scene 09
00:13:04.000       : en:Scene 10
00:14:22.000       : en:Scene 11
00:14:48.000       : en:Scene 12
00:15:35.000       : en:Scene 13
00:17:32.000       : en:Scene 14
00:19:25.000       : en:Scene 15
00:21:28.000       : en:Scene 16
00:22:04.000       : en:Scene 17
00:24:29.000       : en:Scene 18
00:25:39.000       : en:Scene 19
00:25:55.000       : en:Scene 20
00:27:31.000       : en:Scene 21
00:32:17.000       : en:Scene 22
00:39:02.000       : en:Scene 23
00:42:50.000       : en:Scene 24
00:43:56.000       : en:Scene 25
00:46:15.000       : en:Scene 26
00:48:36.000       : en:Scene 27
00:50:07.000       : en:Scene 28
00:51:35.000       : en:Scene 29
00:53:48.000       : en:Scene 30
00:59:33.000       : en:Scene 31
01:00:52.000       : en:Scene 32
01:01:33.000       : en:Scene 33
01:02:43.000       : en:Scene 34
01:03:53.000       : en:Scene 35
01:05:03.000       : en:Scene 36
01:05:13.000       : en:Scene 37
01:05:22.000       : en:Scene 38
01:08:07.000       : en:Scene 39
01:08:22.000       : en:Scene 40
01:09:34.000       : en:Scene 41
01:14:17.000       : en:Scene 42
01:16:34.000       : en:Scene 43
01:27:03.000       : en:Scene 44
01:29:34.000       : en:Scene 45
01:31:56.000       : en:Scene 46
01:32:25.000       : en:Scene 47
01:33:05.000       : en:Scene 48
01:34:31.000       : en:Scene 49
01:34:45.000       : en:Scene 50
01:36:07.000       : en:Scene 51
01:39:38.000       : en:Scene 52
01:42:04.000       : en:Scene 53
01:42:35.000       : en:Scene 54
01:42:57.000       : en:Scene 55
01:45:39.000       : en:Scene 56
01:45:50.000       : en:Scene 57
01:47:31.000       : en:Scene 58
01:50:13.000       : en:Scene 59
01:53:59.000       : en:Scene 60
01:55:41.000       : en:Scene 61
02:03:11.000       : en:Scene 62
02:12:13.000       : en:Scene 63
02:12:45.000       : en:Scene 64
02:13:46.000       : en:Scene 65
02:14:10.000       : en:Scene 66
02:17:15.000       : en:Scene 67
02:18:06.000       : en:Scene 68
02:26:55.000       : en:Scene 69
02:27:12.000       : en:Scene 70
02:27:41.000       : en:Scene 71
02:28:40.000       : en:Scene 72
02:28:43.000       : en:Scene 73
02:28:52.000       : en:Scene 74
02:29:02.000       : en:Scene 75
02:29:12.000       : en:Scene 76
02:29:35.000       : en:Scene 77
02:29:38.000       : en:Scene 78
02:30:47.000       : en:End Credits

I'd also like to show the channels after each audio code listed as shown in the desired name.
User avatar
rednoah
The Source
Posts: 23950
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by rednoah »

:idea: EXAMPLE 1: { audio.Format_Commercial } will give you [Dolby Digital, Dolby Digital Plus] because the file has 2 audio streams:

Properties: Select all

Format_Commercial          : Dolby Digital
Format_Commercial          : Dolby Digital Plus

:idea: EXAMPLE 2: { audio.Format_Commercial } will give you [Dolby Digital Plus, Dolby Digital, Dolby Digital Plus with Dolby Atmos, Dolby Digital] because the file has 4 audio streams:

Properties: Select all

Format_Commercial          : Dolby Digital Plus
Format_Commercial          : Dolby Digital
Format_Commercial          : Dolby Digital Plus with Dolby Atmos
Format_Commercial          : Dolby Digital

:idea: Please read Format List of Values on how to format a list of values if you don't like the [A, B, C] default string representation.

Format: Select all

{ audio.Format_Commercial.joiningDistinct(' ') }

:idea: Yes, you can replace one value with another value, pretty much in exactly the same way that you have already figured out:

Format: Select all

{ audio.Format_Commercial.replace(
	'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
	'Dolby Digital Plus' : 'DDP',
	'Dolby Digital' : 'DD',
	'AC3' : 'DD',
	'DTS-HD Master Audio' : 'DTS-HD MA'
) }

:idea: Match information from the file path will teach you how to do the IMAX thing:

Format: Select all

{ ' ' + fn.match(/IMAX/) }


:arrow: Let's copy & paste everything together:

Format: Select all

 { audio.Format_Commercial.replace(
	'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
	'Dolby Digital Plus' : 'DDP',
	'Dolby Digital' : 'DD',
	'AC3' : 'DD',
	'DTS-HD Master Audio' : 'DTS-HD MA'
	).joiningDistinct(' ') }
 { fn.match(/IMAX/) }
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23950
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by rednoah »

CaptainKen wrote: 14 May 2025, 16:39 I'd also like to show the channels after each audio code listed as shown in the desired name.
This will get progressively more difficult since you will need to loop over each audio stream and format the information as needed for each audio stream:

Format: Select all

{ audio.collect{ it.Format_Commercial + ' ' + it.Channels }.joining(' ')  }
Especially if you need custom replacements for each value on top of that:

Format: Select all

{ audio.collect{ it.Format_Commercial.replace(
	'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
	'Dolby Digital Plus' : 'DDP',
	'Dolby Digital' : 'DD',
	'AC3' : 'DD',
	'DTS-HD Master Audio' : 'DTS-HD MA'
) + ' ' +  it.Channels.replace(
	8: '7.1',
	7: '6.1', 
	6: 'DD 5.1',
	5: '5.0',
	3: '2.1',
	2: '2.0'
) }.joining(' ')  }
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 7
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by CaptainKen »

Thank you again.

Here are the results:
Oppenheimer (2023 Bluray 1080p x265 DD DD DD 5.0.1 DDP DD 5.0.1)

Wicked (2024 WEBDL 1080p x264 DDP DD 5.0.1 DD DD 5.0.1 DDP Atmos DD 5.0.1 DD DD 5.0.1 subs cp )

Based on your previous response I'm interpreting that there's no way to reduce {audio.Format_Commercial} to give a reduced number of English only audio stream values as shown below and as MediaInfo reports?
Example 1 to return: "DD 5.1 DDP 5.1"
Example 2 to return: "DD 5.1 DDP Atmos 5.1 DD 5.1"
User avatar
rednoah
The Source
Posts: 23950
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by rednoah »

CaptainKen wrote: Yesterday, 20:56 there's no way to reduce {audio.Format_Commercial} to give a reduced number of English only audio stream values as shown below and as MediaInfo reports?
:?: I don't know what that means exactly, but anything is possible. You mean to say you only want to print audio stream information for English language audio streams?

:idea: That'd be a brand new requirement but we can add support for that easily since we know the language for each stream:

Properties: Select all

Language                   : en

e.g.

Format: Select all

{
	audio.findAll{ it.Language == /en/ }.collect{ [
		it.Format_Commercial.replace(
			'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
			'Dolby Digital Plus' : 'DDP',
			'Dolby Digital' : 'DD',
			'AC3' : 'DD',
			'DTS-HD Master Audio' : 'DTS-HD MA'
		),
		it.Channels.match(
			8: '7.1',
			7: '6.1', 
			6: '5.1',
			5: '5.0',
			3: '2.1',
			2: '2.0'
		)	
	] }.joining(' ')
}

Code: Select all

DDP Atmos 5.1 DD 5.1
According to the media information of the sample file at hand, Audio #1 is excluded because it's Language = it, Audio #2 is excluded because it's Language = undefined, and so Audio #3 and Audio #4 generate the DDP Atmos 5.1 DD 5.1 value.
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 7
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by CaptainKen »

Perfect as shown below thanks to you! Thank you!

Just noticed one last item, which is how do I keep IMAX in the filename?

Example 1, Oppenheimer:
Oppenheimer (2023 Bluray 1080p x265 DD 5.1 DDP 5.1 subs cp)

Example 2, Wicked:
Wicked (2024 WEBDL 1080p x264 DDP Atmos 5.1 DDP 5.1 subs cp)
User avatar
rednoah
The Source
Posts: 23950
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: multiple audio tracks, more than 3 chapters, only english subs

Post by rednoah »

CaptainKen wrote: Yesterday, 22:54 Just noticed one last item, which is how do I keep IMAX in the filename?
:idea: Match information from the file path will teach you how to do the IMAX thing:

Format: Select all

{ ' ' + fn.match(/IMAX/) }
:idea: Please read the FAQ and How to Request Help.
Post Reply