Code: Select all
{audio.default}
Code: Select all
{audio.default}
Do you loose files when you extract ZIP / RAR / ISO / etc archives? No!
I've just unpacked one of the .iso files manually which worked well
Is it not doing that by default?justkidding wrote: ↑04 Mar 2020, 12:26 Is it possible for filebot/mediainfo to choose the biggest file in a bluray folder structure?
Indeed, it does not. FileBot r7193 will now pick the largest file within the disk folder, and not just the first one.
Code: Select all
MenuID 1
MenuID/String 1 (0x1)
Format AC-3
Format/String AC-3 MLP FBA 16-ch
Format/Info Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Format/Url https://en.wikipedia.org/wiki/AC3
Format_Commercial Dolby TrueHD with Dolby Atmos
Format_Commercial_IfAny Dolby TrueHD with Dolby Atmos
Format_Settings_Endianness Big
Format_AdditionalFeatures MLP FBA 16-ch
MuxingMode Stream extension
CodecID 131
Duration 8077069
Duration/String 2 h 14 min
Duration/String1 2 h 14 min 37 s 69 ms
Duration/String2 2 h 14 min
Duration/String3 02:14:37.069
Duration/String4 02:15:42:06
Duration/String5 02:14:37.069 (02:15:42:06)
BitRate_Mode VBR
BitRate_Mode/String Variable
BitRate 640000
BitRate/String 640 kb/s
BitRate_Maximum 8277000
BitRate_Maximum/String 8 277 kb/s
Channel(s) 8
Channel(s)/String 8 channels
ChannelPositions Front: L C R, Side: L R, Back: L R, LFE
ChannelPositions/String2 3/2/2.1
ChannelLayout L R C LFE Ls Rs Lb Rb
SamplesPerFrame 1536
SamplingRate 48000
SamplingRate/String 48.0 kHz
FrameRate 31.250
FrameRate/String 31.250 FPS (1536 SPF)
Compression_Mode Lossy
Compression_Mode/String Lossy
Delay 11650.666667
Delay/String 11 s 651 ms
Delay/String1 11 s 651 ms
Delay/String2 11 s 651 ms
Delay/String3 00:00:11.651
Delay_Source Container
Delay_Source/String Container
Video_Delay 0
Video_Delay/String3 00:00:00.000
StreamSize 646165520
StreamSize/String 616 MiB (1%)
StreamSize/String1 616 MiB
StreamSize/String2 616 MiB
StreamSize/String3 616 MiB
StreamSize/String4 616.2 MiB
StreamSize/String5 616 MiB (1%)
StreamSize_Proportion 0.01169
ServiceKind CM
ServiceKind/String Complete Main
NumberOfDynamicObjects 13
BedChannelCount/String 1 channel
BedChannelConfiguration LFE
bsid 6
dialnorm -31
dialnorm/String -31 dB
compr 6.02
compr/String 6.02 dB
dynrng 6.02
dynrng/String 6.02 dB
acmod 7
lfeon 1
dialnorm_Average -31
dialnorm_Average/String -31 dB
dialnorm_Minimum -31
dialnorm_Minimum/String -31 dB
dialnorm_Maximum -31
dialnorm_Maximum/String -31 dB
compr_Average 1.98
compr_Average/String 1.98 dB
compr_Minimum -6.58
compr_Minimum/String -6.58 dB
compr_Maximum 6.02
compr_Maximum/String 6.02 dB
dynrng_Average 2.22
dynrng_Average/String 2.22 dB
dynrng_Minimum -2.87
dynrng_Minimum/String -2.87 dB
dynrng_Maximum 6.02
dynrng_Maximum/String 6.02 dB
format_identifier AC-3
Code: Select all
'default' : any{au['default'][0].toBoolean()}{audio.size == 1 ? true : ''}
Code: Select all
AC 3 MLP FBA 16-ch : 'TrueHD Atmos'
Code: Select all
Bohemian Rhapsody (2018) 2160p HDR10+ [UHD] DTS 5 1 DTS-HD MA 2 0
Code: 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
CodecID A_EAC3
Code: Select all
'E AC 3 JOC' : 'EAC3 ATMOS',
'E AC3 JOC' : 'EAC3 ATMOS',
'EAC-3-JOC' : 'EAC3 ATMOS',
'EAC3-JOC' : 'EAC3 ATMOS',
'E-AC 3 JOC' : 'EAC3 ATMOS',
'E-AC-3 JOC' : 'EAC3 ATMOS',
'E-AC-3-JOC' : 'EAC3 ATMOS',
Code: Select all
'AC 3 Dep' : 'EAC3',
'E AC 3' : 'EAC3',
'AC 3 Dep JOC' : 'EAC3 Atmos',
'E AC 3 JOC' : 'EAC3 Atmos',
Aaah, now I get it. And it's working perfectly thank you!kim wrote: ↑05 Mar 2020, 14:24 "If I get "UNKNOWN FORMAT" is it always due to the codec list?"
YES
it's ALWAYS a audioClean on ("CodecID/Hint" OR "Format") + "Format_AdditionalFeatures" = "combined"
so...
Code: Select all
'AC 3 Dep' : 'EAC3', 'E AC 3' : 'EAC3', 'AC 3 Dep JOC' : 'EAC3 Atmos', 'E AC 3 JOC' : 'EAC3 Atmos',
Thanks - I didn't know this. So I will sort my codec order again
Here are the outputs:
Code: Select all
MenuID 1
MenuID/String 1 (0x1)
Format AC-3
Format/String AC-3 MLP FBA 16-ch
Format/Info Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Format/Url https://en.wikipedia.org/wiki/AC3
Format_Commercial Dolby TrueHD with Dolby Atmos
Format_Commercial_IfAny Dolby TrueHD with Dolby Atmos
Format_Settings_Endianness Big
Format_AdditionalFeatures MLP FBA 16-ch
MuxingMode Stream extension
CodecID 131
Duration 8077069
Duration/String 2 h 14 min
Duration/String1 2 h 14 min 37 s 69 ms
Duration/String2 2 h 14 min
Duration/String3 02:14:37.069
Duration/String4 02:15:42:06
Duration/String5 02:14:37.069 (02:15:42:06)
BitRate_Mode VBR
BitRate_Mode/String Variable
BitRate 640000
BitRate/String 640 kb/s
BitRate_Maximum 8277000
BitRate_Maximum/String 8 277 kb/s
Channel(s) 8
Channel(s)/String 8 channels
ChannelPositions Front: L C R, Side: L R, Back: L R, LFE
ChannelPositions/String2 3/2/2.1
ChannelLayout L R C LFE Ls Rs Lb Rb
SamplesPerFrame 1536
SamplingRate 48000
SamplingRate/String 48.0 kHz
FrameRate 31.250
FrameRate/String 31.250 FPS (1536 SPF)
Compression_Mode Lossy
Compression_Mode/String Lossy
Delay 11650.666667
Delay/String 11 s 651 ms
Delay/String1 11 s 651 ms
Delay/String2 11 s 651 ms
Delay/String3 00:00:11.651
Delay_Source Container
Delay_Source/String Container
Video_Delay 0
Video_Delay/String3 00:00:00.000
StreamSize 646165520
StreamSize/String 616 MiB (1%)
StreamSize/String1 616 MiB
StreamSize/String2 616 MiB
StreamSize/String3 616 MiB
StreamSize/String4 616.2 MiB
StreamSize/String5 616 MiB (1%)
StreamSize_Proportion 0.01169
ServiceKind CM
ServiceKind/String Complete Main
NumberOfDynamicObjects 13
BedChannelCount/String 1 channel
BedChannelConfiguration LFE
bsid 6
dialnorm -31
dialnorm/String -31 dB
compr 6.02
compr/String 6.02 dB
dynrng 6.02
dynrng/String 6.02 dB
acmod 7
lfeon 1
dialnorm_Average -31
dialnorm_Average/String -31 dB
dialnorm_Minimum -31
dialnorm_Minimum/String -31 dB
dialnorm_Maximum -31
dialnorm_Maximum/String -31 dB
compr_Average 1.98
compr_Average/String 1.98 dB
compr_Minimum -6.58
compr_Minimum/String -6.58 dB
compr_Maximum 6.02
compr_Maximum/String 6.02 dB
dynrng_Average 2.22
dynrng_Average/String 2.22 dB
dynrng_Minimum -2.87
dynrng_Minimum/String -2.87 dB
dynrng_Maximum 6.02
dynrng_Maximum/String 6.02 dB
format_identifier AC-3
Code: Select all
MenuID 1
MenuID/String 1 (0x1)
Format DTS
Format/String DTS XLL
Format/Info Digital Theater Systems
Format/Url https://en.wikipedia.org/wiki/DTS_(sound_system)
Format_Commercial DTS-HD Master Audio
Format_Commercial_IfAny DTS-HD Master Audio
Format_Settings_Mode 16
Format_Settings_Endianness Big
Format_AdditionalFeatures XLL
MuxingMode Stream extension
CodecID 134
Duration 8077067
Duration/String 2 h 14 min
Duration/String1 2 h 14 min 37 s 67 ms
Duration/String2 2 h 14 min
Duration/String3 02:14:37.067
Duration/String4 02:14:15:55
Duration/String5 02:14:37.067 (02:14:15:55)
BitRate_Mode VBR
BitRate_Mode/String Variable
Channel(s) 2
Channel(s)/String 2 channels
ChannelPositions Front: L R
ChannelPositions/String2 2/0/0
ChannelLayout L R
SamplesPerFrame 512
SamplingRate 48000
SamplingRate/String 48.0 kHz
FrameRate 93.750
FrameRate/String 93.750 FPS (512 SPF)
BitDepth 24
BitDepth/String 24 bits
Compression_Mode Lossless
Compression_Mode/String Lossless
Delay 11650.666667
Delay/String 11 s 651 ms
Delay/String1 11 s 651 ms
Delay/String2 11 s 651 ms
Delay/String3 00:00:11.651
Delay_Source Container
Delay_Source/String Container
Video_Delay 0
Video_Delay/String3 00:00:00.000
Code: Select all
MenuID 1
MenuID/String 1 (0x1)
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 129
Duration 8077120
Duration/String 2 h 14 min
Duration/String1 2 h 14 min 37 s 120 ms
Duration/String2 2 h 14 min
Duration/String3 02:14:37.120
Duration/String4 02:15:42:08
Duration/String5 02:14:37.120 (02:15:42:08)
BitRate_Mode CBR
BitRate_Mode/String Constant
BitRate 448000
BitRate/String 448 kb/s
Channel(s) 6
Channel(s)/String 6 channels
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
FrameRate 31.250
FrameRate/String 31.250 FPS (1536 SPF)
Compression_Mode Lossy
Compression_Mode/String Lossy
Delay 11623.666667
Delay/String 11 s 624 ms
Delay/String1 11 s 624 ms
Delay/String2 11 s 624 ms
Delay/String3 00:00:11.624
Delay_Source Container
Delay_Source/String Container
Video_Delay -27
Video_Delay/String -27 ms
Video_Delay/String1 -27 ms
Video_Delay/String2 -27 ms
Video_Delay/String3 -00:00:00.027
StreamSize 452318720
StreamSize/String 431 MiB (1%)
StreamSize/String1 431 MiB
StreamSize/String2 431 MiB
StreamSize/String3 431 MiB
StreamSize/String4 431.4 MiB
StreamSize/String5 431 MiB (1%)
StreamSize_Proportion 0.00818
ServiceKind CM
ServiceKind/String Complete Main
bsid 6
dialnorm -31
dialnorm/String -31 dB
compr 6.02
compr/String 6.02 dB
dynrng 6.02
dynrng/String 6.02 dB
acmod 7
lfeon 1
dialnorm_Average -31
dialnorm_Average/String -31 dB
dialnorm_Minimum -31
dialnorm_Minimum/String -31 dB
dialnorm_Maximum -31
dialnorm_Maximum/String -31 dB
compr_Average 1.86
compr_Average/String 1.86 dB
compr_Minimum -8.16
compr_Minimum/String -8.16 dB
compr_Maximum 6.02
compr_Maximum/String 6.02 dB
dynrng_Average 2.14
dynrng_Average/String 2.14 dB
dynrng_Minimum -3.25
dynrng_Minimum/String -3.25 dB
dynrng_Maximum 6.02
dynrng_Maximum/String 6.02 dB
format_identifier AC-3
Code: Select all
MenuID 1
MenuID/String 1 (0x1)
Format DTS
Format/String DTS
Format/Info Digital Theater Systems
Format/Url https://en.wikipedia.org/wiki/DTS_(sound_system)
Format_Commercial DTS
Format_Settings_Mode 16
Format_Settings_Endianness Big
CodecID 130
Duration 8077077
Duration/String 2 h 14 min
Duration/String1 2 h 14 min 37 s 77 ms
Duration/String2 2 h 14 min
Duration/String3 02:14:37.077
Duration/String4 02:14:15:56
Duration/String5 02:14:37.077 (02:14:15:56)
BitRate_Mode CBR
BitRate_Mode/String Constant
BitRate 768000
BitRate/String 768 kb/s
Channel(s) 6
Channel(s)/String 6 channels
ChannelPositions Front: L C R, Side: L R, LFE
ChannelPositions/String2 3/2/0.1
ChannelLayout C L R Ls Rs LFE
SamplesPerFrame 512
SamplingRate 48000
SamplingRate/String 48.0 kHz
FrameRate 93.750
FrameRate/String 93.750 FPS (512 SPF)
BitDepth 24
BitDepth/String 24 bits
Compression_Mode Lossy
Compression_Mode/String Lossy
Delay 11650.666667
Delay/String 11 s 651 ms
Delay/String1 11 s 651 ms
Delay/String2 11 s 651 ms
Delay/String3 00:00:11.651
Delay_Source Container
Delay_Source/String Container
Video_Delay 0
Video_Delay/String3 00:00:00.000
StreamSize 775399392
StreamSize/String 739 MiB (1%)
StreamSize/String1 739 MiB
StreamSize/String2 739 MiB
StreamSize/String3 739 MiB
StreamSize/String4 739.5 MiB
StreamSize/String5 739 MiB (1%)
StreamSize_Proportion 0.01403
Code: Select all
MenuID 1
MenuID/String 1 (0x1)
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 129
Duration 8077120
Duration/String 2 h 14 min
Duration/String1 2 h 14 min 37 s 120 ms
Duration/String2 2 h 14 min
Duration/String3 02:14:37.120
Duration/String4 02:15:42:08
Duration/String5 02:14:37.120 (02:15:42:08)
BitRate_Mode CBR
BitRate_Mode/String Constant
BitRate 448000
BitRate/String 448 kb/s
Channel(s) 6
Channel(s)/String 6 channels
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
FrameRate 31.250
FrameRate/String 31.250 FPS (1536 SPF)
Compression_Mode Lossy
Compression_Mode/String Lossy
Delay 11623.666667
Delay/String 11 s 624 ms
Delay/String1 11 s 624 ms
Delay/String2 11 s 624 ms
Delay/String3 00:00:11.624
Delay_Source Container
Delay_Source/String Container
Video_Delay -27
Video_Delay/String -27 ms
Video_Delay/String1 -27 ms
Video_Delay/String2 -27 ms
Video_Delay/String3 -00:00:00.027
StreamSize 452318720
StreamSize/String 431 MiB (1%)
StreamSize/String1 431 MiB
StreamSize/String2 431 MiB
StreamSize/String3 431 MiB
StreamSize/String4 431.4 MiB
StreamSize/String5 431 MiB (1%)
StreamSize_Proportion 0.00818
ServiceKind CM
ServiceKind/String Complete Main
bsid 6
dialnorm -31
dialnorm/String -31 dB
compr 6.02
compr/String 6.02 dB
dynrng 6.02
dynrng/String 6.02 dB
acmod 7
lfeon 1
dialnorm_Average -31
dialnorm_Average/String -31 dB
dialnorm_Minimum -31
dialnorm_Minimum/String -31 dB
dialnorm_Maximum -31
dialnorm_Maximum/String -31 dB
compr_Average 1.86
compr_Average/String 1.86 dB
compr_Minimum -8.16
compr_Minimum/String -8.16 dB
compr_Maximum 6.02
compr_Maximum/String 6.02 dB
dynrng_Average 2.14
dynrng_Average/String 2.14 dB
dynrng_Minimum -3.25
dynrng_Minimum/String -3.25 dB
dynrng_Maximum 6.02
dynrng_Maximum/String 6.02 dB
format_identifier AC-3
Code: Select all
def useChFilter = false
Code: Select all
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 allStreams = audioStreams.collect{ filter(it) }*.minus(null).unique()*.join(' ')
def preferredStream = oneStream(audioStreams.findAll{ it.index == audioStreams.index.max() })
def bestBitRate = oneStream(audioStreams.findAll{ it.bitrate == audioStreams.bitrate.max() })
def defaultStream = oneStream(audioStreams.findAll{ it.default == true })
def bestPreferredLang = any{ audioStreams.findAll{ it.lang == preferredLang }.sort{ a, b -> b.bitrate <=> a.bitrate }.collect{ filter(it) }*.minus(null).unique().get(0).join(' ') }{}
any{addToList}{bestPreferredLang}{bestBitRate}{preferredStream}
}{'NO_AUDIO'}
Code: Select all
{
def preferredLang = 'Eng'
def useChFilter = false
def filter = { [it.codec, it.ch, it.objects, it.lang] }
Code: Select all
def chFilter = ( ( ( (ac == 'AAC'||ac == 'MP3') && ch != '2.0') || ( (ac == 'AC3'||ac == 'EAC3'||ac == 'DTS'||ac == 'TrueHD'||ac == 'MLPFBA') && ch != '5.1' ) ) ? ch : null )
I did change this part as well.kim wrote: ↑06 Mar 2020, 18:19 You are missing the first part ?Code: Select all
{ def preferredLang = 'Eng' def useChFilter = false def filter = { [it.codec, it.ch, it.objects, it.lang] }
Code: Select all
{
def preferredLang = 'Eng'
def useChFilter = false
def filter = { [it.codec, it.ch, it.objects, it.lang] }
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 allStreams = audioStreams.collect{ filter(it) }*.minus(null).unique()*.join(' ')
def preferredStream = oneStream(audioStreams.findAll{ it.index == audioStreams.index.max() })
def bestBitRate = oneStream(audioStreams.findAll{ it.bitrate == audioStreams.bitrate.max() })
def defaultStream = oneStream(audioStreams.findAll{ it.default == true })
def bestPreferredLang = any{ audioStreams.findAll{ it.lang == preferredLang }.sort{ a, b -> b.bitrate <=> a.bitrate }.collect{ filter(it) }*.minus(null).unique().get(0).join(' ') }{}
any{addToList}{bestPreferredLang}{defaultStream}{bestBitRate}{preferredStream}
}{'NO_AUDIO'}
}
Ah, I see. Thanks fot the explanation.kim wrote: ↑06 Mar 2020, 18:19 useChFilter = this line:= if AAC/MP3 2.0 OR AC3/EAC3/DTS/TrueHD/MLPFBA 5.1, then don't show the 2.0/5.1 partCode: Select all
def chFilter = ( ( ( (ac == 'AAC'||ac == 'MP3') && ch != '2.0') || ( (ac == 'AC3'||ac == 'EAC3'||ac == 'DTS'||ac == 'TrueHD'||ac == 'MLPFBA') && ch != '5.1' ) ) ? ch : null )
what is your full format?
Code: Select all
{az}/{collection}/{
def KIND = ( media.find{media.fileextension != 'm2ts'} ? 'NOBD'
: 'BD' )
def LOCLANG = any{ (audio.find{ it.language == 'en'} ? 'LOCENG'
: 'LOCGER' ) } {null}
( KIND == 'NOBD' ? ( ( LOCLANG == 'LOCENG' ) ? {any{localize.eng.ny.upperInitial()/localize.eng.ny.upperInitial()}{ny.upperInitial()/ny.upperInitial()}}
: {any{localize.deu.ny.upperInitial().replace('Ä', 'Ae').replace('ä', 'ae').replace('Ö', 'Oe').replace('ö', 'oe').replace('Ü', 'Ue').replace('ü', 'ue').replace('ß', 'ss')/localize.deu.ny.upperInitial().replace('Ä', 'Ae').replace('ä', 'ae').replace('Ö', 'Oe').replace('ö', 'oe').replace('Ü', 'Ue').replace('ü', 'ue').replace('ß', 'ss')}{ny.upperInitial()/ny.upperInitial()}} )
: {any{localize.eng.ny.upperInitial()/localize.eng.ny.upperInitial()}{ny.upperInitial()/ny.upperInitial().fn.matchAll(/UHD|SBS|framepacked/)}} )
} {
def KIND = ( media.find{media.fileextension != 'm2ts'} ? 'NOBD'
: 'BD' )
( KIND == 'BD' ? {''+fn.match(/HSBS|SBS|H-SBS/)} : {null})
}{' '+tags}{' '+vf}{' '+any{hdr}{'SDR'}}{' '+fn.matchAll(/UHD|MVC|framepacked/)}{' '+s3d}{
def preferredGer = 'DEU'
def preferredEng = 'ENG'
def codecList =
[
'MP3' : 'MP3',
'PCM' : 'PCM',
'AAC' : 'AAC',
'AAC LC' : 'AAC',
'AAC LC SBR' : 'AAC',
'AAC LC SBR PS' : 'AAC',
'AC 3' : 'AC3',
'AC 3 Dep' : 'EAC3',
'E AC 3' : 'EAC3',
'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',
'MLP FBA' : 'TrueHD',
'DTS XLL X' : 'DTS X',
'E AC 3 JOC' : 'EAC3 ATMOS',
'AC 3 Dep JOC' : 'DD+ ATMOS',
'AC 3 MLP FBA 16 ch' : 'TrueHD ATMOS',
'AC 3 MLP FBA 16-ch' : 'TrueHD ATMOS',
'MLP FBA 16 ch' : 'TrueHD ATMOS'
]
def filter = { [it.lang, it.codec, it.ch] }
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() }
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, 'UNKNOWN_FORMAT'), 'combined' : combined, 'ch' : ch,
'bitrate' : any{toInt(au.BitRate)}{toInt(au.BitRate_Maximum)}{au.FrameRate.toDouble()}{null},
'objects' : any{'[' + au['NumberOfDynamicObjects'] + ' Objs]'}{null}, 'lang' : any{au.'LanguageString3'.upper() }{null} ]
return audioStreams
}
def allStreams = audioStreams.collect{ filter(it) }*.minus(null).unique()*.join(' ')
def preferredStream = oneStream(audioStreams.findAll{ it.index == audioStreams.index.max() })
def bestBitRate = oneStream(audioStreams.findAll{ it.bitrate == audioStreams.bitrate.max() })
def defaultStream = oneStream(audioStreams.findAll{it.default == true})
def bestPreferredGer = any{audioStreams.findAll{it.lang == preferredGer }.sort{it.bitrate}.reverse().collect{ filter(it) }*.minus(null).unique().get(0).join(' ')}{preferredStream}
def bestPreferredEng = any{audioStreams.findAll{it.lang == preferredEng }.sort{it.bitrate}.reverse().collect{ filter(it) }*.minus(null).unique().get(0).join(' ')}{bestBitRate}
' '+[defaultStream, bestPreferredEng, bestPreferredGer ].unique().join(' ').space(' ')
}{
def gersub = text.find{ it.language == 'de'}
' '+gersub.language+'-sub'
}{
def engsub = text.find{ it.language == 'en'}
' '+engsub.language+'-sub'
}{fn.match(/-fanart|-banner|-clearart|-clearlogo|-discart|-landscape|-poster/)}{subt}
Presumably, you're using the ZIP portable package for Windows? Your formats and format history will be stored in the prefs.properties file, which is persisted to the file system when you close the application.justkidding wrote: ↑07 Mar 2020, 10:07 I found an issue with 4.9.0 on windows but it may be hard to replicate.
I did create some formats yesterday with the application and I used them. Later that day I wanted to use them again but they were gone. They are not available in the preset selection anymore. I don't exactly know what happened during that time.