what does this mean ?
Phatty wrote: ↑24 May 2020, 21:54
I recently started using it on my new linux GCP VM but it would seem there is one part of this naming does not carry over very well (the "/" causes it to create a new sub folder).
Anyone able to help re jig this so that rather than a / it - or + or even just a space.
are you using format in CLI or GUI ?
(if CLI you may need to escape something?)
better code of your format:
Code: Select all
{'G:/Movies/'}
{ny}
{'/' + ny}
{' ' + tags}
{any{' CD' + pi}{}}
{' - ' + vf}
{def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
if(self.video[0].bitdepth != null && self.bitdepth >= 10 && self.video[0].colourprimaries != null && mHDRCol.get(self.video[0].colourprimaries) == "YES") 'HDR ' else ''}
{any{video[0].bitdepth.match('10') ? ' [10bit]' : null}{}}
{' ' + vc}
{def best = any{audio.max{it.StreamSize.toInteger()}}{ audio.max{it.BitRate.replaceAll(/Unknown\s?\/\s?/).split(' / ')*.toInteger().max()}}{null};
def ChannelString = any{(best.'ChannelPositionsString2'.replaceAll(/Object\sBased\s\/|(\d+)?\sobjects\s\/|0.(?=\d.\d)/, '').split(' / ').collect{ it.split('/')*.toDouble().sum() }.max()).toString()}{null};
def audioCodec = (ac == 'MP3'||ac == 'AAC') ? ac :
any{best.FormatProfile ? (best.Codec+'.'+best.FormatProfile.replaceAll(/\s?\/.*|E-AC-3\+|TrueHD|AC3|Matrix/)).replaceAll(/\.\+|\+\./, '+').replaceAll(/\.$/).replaceAll(/DTS\./, 'DTS-') : null}{best.Codec}{aco}{ac}{'ERROR'};
' '+ allOf{audioCodec}{any{ChannelString}{channels}}.join(' ')}
{subt}
Also you may want to look here:
viewtopic.php?f=5&t=5285&p=48827#p48827
e.g.
Code: Select all
{'G:/Movies/'}
{ny}
{'/' + ny}
{' ' + tags}
{any{' CD' + pi}{}}
{' - ' + vf}
{def mHDRCol = ["BT.709" : "NO", "BT.2020" : "YES"];
if(self.video[0].bitdepth != null && self.bitdepth >= 10 && self.video[0].colourprimaries != null && mHDRCol.get(self.video[0].colourprimaries) == "YES") 'HDR ' else ''}
{any{video[0].bitdepth.match('10') ? ' [10bit]' : null}{}}
{' ' + vc}
{
def preferredLang = 'Eng'
def useChFilter = false
def filter = { [it.codec, it.ch] }
def codecList =
[
'MP3' : 'MP3',
'PCM' : 'PCM',
'AAC LC' : 'AAC',
'AAC LC SBR' : 'AAC',
'AAC LC SBR PS' : 'AAC',
'AC 3' : 'AC3',
'AC 3 Dep' : 'EAC3',
'E AC 3' : 'EAC3',
'E AC 3 JOC' : 'EAC3 Atmos',
'AC 3 Dep JOC' : 'EAC3 Atmos',
'DTS' : 'DTS',
'DTS 96 24' : 'DTS 96-24',
'DTS ES' : 'DTS-ES',
'DTS ES XXCH' : 'DTS-ES',
'DTS XBR' : 'DTS-HD HRA',
'DTS ES XBR' : 'DTS-HD HRA',
'DTS ES XXCH XBR' : 'DTS-HD HRA',
'DTS XLL' : 'DTS-HD MA',
'DTS ES XLL' : 'DTS-HD MA',
'DTS ES XXCH XLL' : 'DTS-HD MA',
'DTS XLL X' : 'DTS X',
'MLP FBA' : 'TrueHD',
'MLP FBA 16 ch' : 'TrueHD Atmos'
]
def audioStreams = []
def audioClean = { it.replaceAll(/[\p{Pd}\p{Space}]/, ' ').replaceAll(/\p{Space}{2,}/, ' ').slash(' ') }
def channelClean = { it.replaceAll(/Debug.+|Object\sBased\s?\/?|(\d+)?\sobjects\s\/\s|0.(?=\d.\d)|20/).replaceAll(/6.0/,'5.1').replaceAll(/8.0/,'7.1') }
def oneStream = { it.collect{ filter(it) }*.minus(null).unique().flatten().join(' ') }
def dString = { it.toDouble().toString() }
def toInt = { it.toInteger() }
any{audio.collect{ au ->
def codec = audioClean(any{ au['CodecID/Hint'] }{ au['Format'] })
def format_profile = any{ audioClean(au['Format_AdditionalFeatures'])}{}
def String ch = any{ channelClean(au.ChannelPositionsString2).tokenize('\\/')*.toDouble().toString().sum() }
{ channelClean(dString(au.ChannelsOriginal)) } { channelClean(dString(au.Channels)) }
def chFilter = ( ( ( (ac == 'AAC'||ac == 'MP3') && ch != '2.0') || ( (ac == 'AC3'||ac == 'EAC3'||ac == 'DTS'||ac == 'TrueHD'||ac == 'MLPFBA') && ch != '5.1' ) ) ? ch : null )
def combined = allOf{codec}{format_profile}.join(' ')
audioStreams << ['index' : codecList.findIndexOf { it.key == combined }, 'default' : any {au['default'][0].toBoolean() }{ audio.size == 1 ? true : '' },
'codec' : codecList.get(combined, 'Add to "' + combined + '" codecList'), 'combined' : combined, 'ch' : useChFilter ? chFilter : ch,
'bitrate' : any{ toInt(au.BitRate) }{ toInt(au.BitRate_Maximum) }{ dString(au.FrameRate) }{null},
'objects' : any{ '[' + au['NumberOfDynamicObjects'] + ' Objs]' }{null}, 'lang' : any{ au.'LanguageString3'.upperInitial() }{null} ]
return audioStreams
}
def addToList = audioStreams.codec.findAll{ it.contains('Add to') }.unique().sort()
def bestBitRate = oneStream(audioStreams.findAll{ it.bitrate == audioStreams.bitrate.max() })
' ' + any{addToList}{bestBitRate}
}{'NO_AUDIO'}
}
{subt}