ACO Returning Bluray Disc

All your suggestions, requests and ideas for future development
Post Reply
cyberdoggy
Posts: 41
Joined: 03 Sep 2016, 21:27

ACO Returning Bluray Disc

Post by cyberdoggy »

Hi, For some reason I am using this code

Code: Select all

{ aco.replace('Dolby TrueHD with Dolby Atmos', 'TrueHD.Atmos').replace('Dolby TrueHD', 'TrueHD').replace('DTS-HD Master Audio', 'DTS-HD').replace('Dolby Digital Plus with Dolby Atmos', 'DD+.Atmos')
.replace('Dolby Digital Plus', 'DD+').replace('Dolby Digital', 'DD') }
When the file contains Dolby Digital Plus the output returns a Blu-ray Disc ? I do not understand this at all.
User avatar
rednoah
The Source
Posts: 23461
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: ACO Returning Bluray Disc

Post by rednoah »

:?: What does the MediaInfo table say?
:idea: Please read the FAQ and How to Request Help.
cyberdoggy
Posts: 41
Joined: 03 Sep 2016, 21:27

Re: ACO Returning Bluray Disc

Post by cyberdoggy »

I couldn't figure out how to send a screenshot so I copied and pasted this info. I am guessing this is where the error is coming from on the 1st Audio tab.

Properties: Select all

Format	AC-3
Format/String	E-AC-3 JOC
Format/Info	Enhanced AC-3 with Joint Object Coding
Format/Url	https://en.wikipedia.org/wiki/AC3
Format_Commercial	Dolby Digital Plus with Dolby Atmos
Format_Commercial_IfAny	Dolby Digital Plus with Dolby Atmos
Format_Profile	Blu-ray Disc
Format_Settings_Endianness	Big
Format_AdditionalFeatures	Dep JOC
InternetMediaType	audio/eac3
User avatar
rednoah
The Source
Posts: 23461
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: ACO Returning Bluray Disc

Post by rednoah »

{aco} is based on "Codec_Profile", "Format_Profile", "Format_Commercial" in that order. You are getting the value of the "Format_Profile" property, which has a bit of an unusual value:

Properties: Select all

Format_Profile	Blu-ray Disc


You can use {audio} to grab a specific property:

Format: Select all

{ audio[0].Format_Commercial }
:idea: Please read the FAQ and How to Request Help.
cyberdoggy
Posts: 41
Joined: 03 Sep 2016, 21:27

Re: ACO Returning Bluray Disc

Post by cyberdoggy »

Thanks as usual rednoah I set it up as this

Code: Select all

{audio[0].Format_Commercial ? (audio[0].Format_Commercial.contains('Atmos') ? audio[0].Format_Commercial.replace('Dolby TrueHD with Dolby Atmos', 'TrueHD')
.replace('Dolby Digital Plus with Dolby Atmos', 'DD+') + ' ' + channels + 'CH Atmos' : audio[0].Format_Commercial.replace('Dolby TrueHD', 'TrueHD').replace('TTS-HD Master Audio', 'TTS-HD')
.replace('Dolby Digital Plus', 'DD+').replace('Dolby Digital', 'DD') + ' ' + channels + 'CH') : aco + ' ' + channels + 'CH'}
And seems to be working great!
Post Reply