rednoah wrote: ↑22 Sep 2021, 03:02
I'd start by looking at the MediaInfo table:
viewtopic.php?t=4285
FileBot can identify DTS / TrueHD audio streams if you can identify them based on one MediaInfo property or another, and then add some if-then-else checks for that in your custom format to add the exactly the information you want to the proposed file path.
Thanks @rednoah
1) I did look up the MediaInfo property and the information that I looking for is available with the field "CodecID" for each for the Audio tabs (MediaInfo details below). The issue is that even after searching around and doing some trial iterations, I am unable to figure out how to get the "CodecID" information or know how to remove the extra "A_" in the "CodecID".
2) I am a n00b with Groovy and am unable to write if-then-else statements by my own. I can modify a statement to some extent but cannot write one from scratch

and thus am requesting some help in the area
3) I did some trial iterations with FileBot v4.9.4 (code snippets below) and am unable to understand what I am doing wrong, can you please help

:
Code: Select all
when any{ audio.take(3).collect
{ a ->allOf
{af} /* provides the information in the expected format "8ch" but only for the 1st audio stream */
}
Code: Select all
when any{ audio.take(3).collect
{ a ->allOf
{a.af} /* does not seem to work and does not provide any output */
}
Code: Select all
when any{ audio.take(3).collect
{ a ->allOf
{Channels} /* provides the information in the expected format "7.1" but only for 1st audio stream */
}
Code: Select all
when any{ audio.take(3).collect
{ a ->allOf
{a.Channels} /* works partially as in it provides the information for each audio stream similar to {af} but without the "ch" */
}
Below are the MediaInfo audio details for the file used in the trial (3 audio streams, all of 'eng' language where 1st stream is 8ch AAC, 2nd is 6ch DTS and 3rd is 8ch TrueHD):
Code: Select all
[Audio]
Count : 280
StreamCount : 3
StreamKind : Audio
StreamKind/String : Audio
StreamKindID : 0
StreamKindPos : 1
StreamOrder : 1
ID : 2
ID/String : 2
UniqueID : 14793711726077703427
Format : AAC
Format/String : AAC LC SBR
Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication
Format_Commercial : HE-AAC
Format_Commercial_IfAny : HE-AAC
Format_Settings : Explicit
Format_Settings_SBR : Yes (Explicit)
Format_Settings_SBR/String : Yes (Explicit)
Format_Settings_PS : No (Explicit)
Format_Settings_PS/String : No (Explicit)
Format_AdditionalFeatures : LC SBR
CodecID : A_AAC-2
Duration : 10949461.000000
Duration/String : 3 h 2 min
Duration/String1 : 3 h 2 min 29 s 461 ms
Duration/String2 : 3 h 2 min
Duration/String3 : 03:02:29.461
Duration/String4 : 03:05:57:17
Duration/String5 : 03:02:29.461 (03:05:57:17)
BitRate : 309137
BitRate/String : 309 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/4/0.1
ChannelLayout : C L R Ls Rs Lw Rw LFE
SamplesPerFrame : 2048
SamplingRate : 48000
SamplingRate/String : 48.0 kHz
SamplingCount : 525574128
FrameRate : 23.438
FrameRate/String : 23.438 FPS (2048 SPF)
FrameCount : 256628
Compression_Mode : Lossy
Compression_Mode/String : Lossy
Delay : 31
Delay/String : 31 ms
Delay/String1 : 31 ms
Delay/String2 : 31 ms
Delay/String3 : 00:00:00.031
Delay_Source : Container
Delay_Source/String : Container
Video_Delay : 31
Video_Delay/String : 31 ms
Video_Delay/String1 : 31 ms
Video_Delay/String2 : 31 ms
Video_Delay/String3 : 00:00:00.031
StreamSize : 423110652
StreamSize/String : 404 MiB (3%)
StreamSize/String1 : 404 MiB
StreamSize/String2 : 404 MiB
StreamSize/String3 : 404 MiB
StreamSize/String4 : 403.5 MiB
StreamSize/String5 : 404 MiB (3%)
StreamSize_Proportion : 0.03147
Title : AAC 8ch
Language : en
Language/String : English
Language/String1 : English
Language/String2 : en
Language/String3 : eng
Language/String4 : en
Default : Yes
Default/String : Yes
Forced : No
Forced/String : No
[Audio]
Count : 280
StreamCount : 3
StreamKind : Audio
StreamKind/String : Audio
StreamKindID : 1
StreamKindPos : 2
StreamOrder : 2
ID : 3
ID/String : 3
UniqueID : 15682389536924796531
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 : A_DTS
Duration : 10949462.000000
Duration/String : 3 h 2 min
Duration/String1 : 3 h 2 min 29 s 462 ms
Duration/String2 : 3 h 2 min
Duration/String3 : 03:02:29.462
Duration/String4 : 03:02:00:32
Duration/String5 : 03:02:29.462 (03:02:00:32)
BitRate_Mode : CBR
BitRate_Mode/String : Constant
BitRate : 1509000
BitRate/String : 1 509 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
SamplingCount : 525574176
FrameRate : 93.750
FrameRate/String : 93.750 FPS (512 SPF)
FrameCount : 1026512
BitDepth : 24
BitDepth/String : 24 bits
Compression_Mode : Lossy
Compression_Mode/String : Lossy
Delay : 0
Delay/String3 : 00:00:00.000
Delay_Source : Container
Delay_Source/String : Container
Video_Delay : 0
Video_Delay/String3 : 00:00:00.000
StreamSize : 2065342144
StreamSize/String : 1.92 GiB (15%)
StreamSize/String1 : 2 GiB
StreamSize/String2 : 1.9 GiB
StreamSize/String3 : 1.92 GiB
StreamSize/String4 : 1.923 GiB
StreamSize/String5 : 1.92 GiB (15%)
StreamSize_Proportion : 0.15360
Title : DTS 6ch
Language : en
Language/String : English
Language/String1 : English
Language/String2 : en
Language/String3 : eng
Language/String4 : en
Default : No
Default/String : No
Forced : No
Forced/String : No
[Audio]
Count : 284
StreamCount : 3
StreamKind : Audio
StreamKind/String : Audio
StreamKindID : 2
StreamKindPos : 3
StreamOrder : 3
ID : 4
ID/String : 4
UniqueID : 16605674554314757963
Format : MLP FBA
Format/String : MLP FBA 16-ch
Format/Info : Meridian Lossless Packing FBA with 16-channel presentation
Format_Commercial : Dolby TrueHD with Dolby Atmos
Format_Commercial_IfAny : Dolby TrueHD with Dolby Atmos
Format_AdditionalFeatures : 16-ch
CodecID : A_TRUEHD
CodecID/Url : http://www.dolby.com/consumer/technology/trueHD.html
Duration : 10949439.000000
Duration/String : 3 h 2 min
Duration/String1 : 3 h 2 min 29 s 439 ms
Duration/String2 : 3 h 2 min
Duration/String3 : 03:02:29.439
Duration/String5 : 03:02:29.439
BitRate_Mode : VBR
BitRate_Mode/String : Variable
BitRate : 3402708
BitRate/String : 3 403 kb/s
BitRate_Maximum : 5616000
BitRate_Maximum/String : 5 616 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 : 40
SamplingRate : 48000
SamplingRate/String : 48.0 kHz
SamplingCount : 525573072
FrameRate : 1200.000
FrameRate/String : 1 200.000 FPS (40 SPF)
FrameCount : 13139327
Compression_Mode : Lossless
Compression_Mode/String : Lossless
Delay : 0
Delay/String3 : 00:00:00.000
Delay_Source : Container
Delay_Source/String : Container
Video_Delay : 0
Video_Delay/String3 : 00:00:00.000
StreamSize : 4657218004
StreamSize/String : 4.34 GiB (35%)
StreamSize/String1 : 4 GiB
StreamSize/String2 : 4.3 GiB
StreamSize/String3 : 4.34 GiB
StreamSize/String4 : 4.337 GiB
StreamSize/String5 : 4.34 GiB (35%)
StreamSize_Proportion : 0.34635
Title : TrueHD Atmos 8ch
Language : en
Language/String : English
Language/String1 : English
Language/String2 : en
Language/String3 : eng
Language/String4 : en
Default : No
Default/String : No
Forced : No
Forced/String : No
NumberOfDynamicObjects : 11
BedChannelCount : 1
BedChannelCount/String : 1 channel
BedChannelConfiguration : LFE