Some questions regarding renaming

Any questions? Need some help?
kim
Power User
Posts: 1046
Joined: 15 May 2014, 16:17

Re: Some questions regarding renaming

Post by kim »

output from ?

Code: Select all

{audio.default}
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

It gives exactly the same result
So:
[Expression yields empty value: Binding "default": undefined] 8 Mile (2002)

respectively

[Expression yields empty value: Binding "audio": java.lang.NullPointerException] The BFG (2016)
For BFG I realised there is not even an Audio Tab in Mediainfo.
I tested with another .iso with the same result. Is it possible that Mediainfo is not working with .isos at all?

Edit:
Yeah, that seems to be the case
https://mediaarea.net/Vote/Mediainfo-Is ... upport-123
So, I guess that's not possible to fix for you :) But maybe the other issue?
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

ISO files are containers like ZIP archives. It's not a media file, so MediaInfo can't read media information.


:idea: FileBot can help you batch-extract all your ISO archives. This allows FileBot / MediaInfo to work because FileBot will handle disk folders as a single unit and MediaInfo bindings will be based on first video file within the disk folder.
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

Can you give me a hint how to extract them with filebot?
But when I extract them will I loose the menu of the bluray?
This is the reason why I have some .isos in the first place.
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

justkidding wrote: 04 Mar 2020, 07:11 Can you give me a hint how to extract them with filebot?
:arrow: Filter ➔ Archives ➔ Extract All

justkidding wrote: 04 Mar 2020, 07:11 But when I extract them will I loose the menu of the bluray?
Do you loose files when you extract ZIP / RAR / ISO / etc archives? No! ;)
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

Of course I don't loose files ;)
What I meant is I loose the menu structure.
When you open an .iso-file you get into the Bluray menu from which you can select certain chapters, specials like interviews and so on.
If you extract the .iso you can't see which file is what.
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

The menu structure is a file within the ISO archive. ;)


:idea: If you pass an ISO archive into a video player, it will open the archive, get the file listing within the archive, and then read files within the ISO archives according to the DVD / BD standards. Reading files from within the ISO archive is just an extract step, when we could read those files from the file system directly.


:idea: Note that you have the play the folder and not the raw video files within the folder. You can't play a disk folder by double-clicking on it for obvious reasons, but your player should have a directory chooser for that.
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

That sounds good :D
But it seems I do something wrong.
When I go to Filter -> Load folder with .iso-file in it -> press extract all nothing happens :(

Image
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

Since the File / Path table is empty, there's nothing to extract, so Extract All will do nothing. I guess FileBot just can't read those ISO files (i.e. unsupported file format) for some reason. The log will probably contain corresponding error messages.

Image
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

rednoah wrote: 04 Mar 2020, 06:11 :idea: FileBot can help you batch-extract all your ISO archives. This allows FileBot / MediaInfo to work because FileBot will handle disk folders as a single unit and MediaInfo bindings will be based on first video file within the disk folder.
I've just unpacked one of the .iso files manually which worked well ;).
Is it possible for filebot/mediainfo to choose the biggest file in a bluray folder structure?
Otherwise I think it's possible to choose the wrong file.
https://ibb.co/DpNcTpm
As you can see in this case the movie is by far not the first file (I've sorted descending by size).
There are several video files before it. Even some with a duration much longer than 10 minutes.

@kim
I figured out that .iso respectively movies in the bluray folder structure (.m2ts) don't have any defaultstream in audio. That's why your coding is not working for these kind of files.
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

justkidding wrote: 04 Mar 2020, 12:26 Is it possible for filebot/mediainfo to choose the biggest file in a bluray folder structure?
Is it not doing that by default?

:idea: Use {media.CompleteName} to see which media file MediaInfo is working with for a given disk folder / subtitle file / artwork file / etc.


EDIT:
rednoah wrote: 04 Mar 2020, 12:43 Is it not doing that by default?
Indeed, it does not. FileBot r7193 will now pick the largest file within the disk folder, and not just the first one.
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

Awesome! Thank you. I will wait for the update :)
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

Please give FileBot r7193 a spin:
https://get.filebot.net/filebot/BETA/
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

You are insanely fast :D
It looks very good:
https://ibb.co/xDPsYCd
Thank you very much!

@kim is it possible to include a special handling for files with a .m2ts-ending?
They seem to be very different than audio-streams from .mkv-files.
It would be great to at least get the best quality stream as I don't see any language information in mediainfo.
Here is what I get from MediaInfo:

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
Maybe StreamSize? I guess the best quality audio stream should be the biggest one shouldn't it?
kim
Power User
Posts: 1046
Joined: 15 May 2014, 16:17

Re: Some questions regarding renaming

Post by kim »

quick fix, try replace the default part with this:

Code: Select all

'default' : any{au['default'][0].toBoolean()}{audio.size == 1 ? true : ''}
if 'UNKNOWN_FORMAT' you need to add something like this to codecList

Code: Select all

AC 3 MLP FBA 16-ch : 'TrueHD Atmos'
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

Thank you! It is working but unfortunately it is not giving the result I hoped for.
It gives:

Code: Select all

Bohemian Rhapsody (2018) 2160p HDR10+ [UHD] DTS 5 1 DTS-HD MA 2 0
So it is not finding the dolby atmos audio line. Reason is my assumption was wrong unfortunately. The ATMOS-line is not the one with the biggest Streamsize.
Could you change the coding in a way that if there is no default line it not only gives the audio line with the biggest streamsize but also the one with the most NumberOfDynamicObjects or if this is not possible the one with the most channels?

If I get "UNKNOWN FORMAT" is it always due to the codec list?
I have one audio line with following information:

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
For this one I get "UNKNOWN FORMAT" but I have already included following lines in the codec list:

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',
kim
Power User
Posts: 1046
Joined: 15 May 2014, 16:17

Re: Some questions regarding renaming

Post by kim »

"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',
remember if you use "preferredStream" the order matters (last = better)

using Streamsize or NumberOfDynamicObjects is not good
what is audio mediainfo output on all streams ?
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

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',
Aaah, now I get it. And it's working perfectly thank you!
kim wrote: 05 Mar 2020, 14:24 remember if you use "preferredStream" the order matters (last = better)
Thanks - I didn't know this. So I will sort my codec order again :)
EDIT: After changing the order your code works perfectly now. Thank you so much!
kim wrote: 05 Mar 2020, 14:24 using Streamsize or NumberOfDynamicObjects is not good
what is audio mediainfo output on all streams ?
Here are the outputs:
Line 1:

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
Line 2:

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
Line 3:

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
Line 4:

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
Line 5:

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

It would be great if Line 1 and Line 4 are returned (but at least line 1).
EDIT:
It already works :D
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

Thank you!
What do I influence with that part

Code: Select all

def useChFilter = false
?

Also I think the changes broke the support for the .m2ts-files. I always get "NO_AUDIO" for these files now.

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'}
In the old version it at least gives me "True HD ATMOS" without the language.



@rednoah Do you already have a timeline when 4.9.0 will be general available? :)
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

Use the latest beta. If you can confirm everything works well, then that'll speed up the final release. ;)
:idea: Please read the FAQ and How to Request Help.
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

All right - I will :). So far it is running really well ;).
kim
Power User
Posts: 1046
Joined: 15 May 2014, 16:17

Re: Some questions regarding renaming

Post by kim »

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] }
useChFilter = this line:

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 )
= if AAC/MP3 2.0 OR AC3/EAC3/DTS/TrueHD/MLPFBA 5.1, then don't show the 2.0/5.1 part

what is your full format?
justkidding
Posts: 38
Joined: 12 Oct 2015, 20:42

Re: Some questions regarding renaming

Post by justkidding »

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] }
I did change this part as well.
I've also tried to just use your script and nothing else.
So like this:

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'}
}
For .mkv-fies it is working perfectly fine but for BD-folder structures (.m2ts-files) it gives no audio.
kim wrote: 06 Mar 2020, 18:19 useChFilter = this line:

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 )
= if AAC/MP3 2.0 OR AC3/EAC3/DTS/TrueHD/MLPFBA 5.1, then don't show the 2.0/5.1 part

what is your full format?
Ah, I see. Thanks fot the explanation.
I am using this format at the moment:

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}
With this format for .m2ts-files it at least gives me the information "TrueHD ATMOS 7.1" e.g. (so just without the language).
It includes your script before your last changes.

@rednoah
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.
User avatar
rednoah
The Source
Posts: 19127
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Some questions regarding renaming

Post by rednoah »

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.
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.


:idea: If FileBot crashes, or if you kill the process, then settings that have changed in-memory are lost.


:idea: Similarly, if you have multiple instances of FileBot open and running at the same time, and then change settings in-memory in each open FileBot window, each will override prefs.properties on close, meaning only the last FileBot window will get to persist it's settings.


:arrow: Please make new threads for these things. As we're completely unrelated to the OP at this point. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply