Filebot name, confusion, and auto deletion of file

All your suggestions, requests and ideas for future development
Post Reply
CaptainKen
Posts: 10
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Filebot name, confusion, and auto deletion of file

Post by CaptainKen »

Wondering where the "96/24 " is coming from in this rename? And how it's getting a weird destination and file name?

Original: Bite.the.Bullet.1975.1080p.BluRay.x264.DTS-FGT
Strange Destination path: "24 5.1 subs cp )"
Proposed new name: F:/Bite the Bullet (1975 BluRay 1080p x264 DTS 96/24 5.1 subs cp)
Actual new name that gets auto deleted: "24 5.1 subs cp )"

You'll really need to watch the short video to get the full story with your own eyes.

Screenshot: Screenshot
OneDrive Video: https://1drv.ms/v/c/96903c0d48433020/ES ... A?e=VCqALS

Format: Select all

{n.replaceTrailingBrackets()} ({y} 
{fn.match(/REMUX|IMAX/)} {source} {vf} 
{vc.replace(
	'AVC' : 'x264',
	'HEVC' : 'x265'
)} 
{
	audio.findAll{ it.language == /en/}.collect{ [
		it.Format_Commercial.replace(
			'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
			'Dolby Digital Plus' : 'DDP',
			'Dolby Digital' : 'DD',
			'AC3' : 'DD',
			'DTS-HD Master Audio' : 'DTS-HD MA'
		),
		it.Channels.match(
			8: '7.1',
			7: '6.1', 
			6: '5.1',
			5: '5.0',
			3: '2.1',
			2: '2.0'
		)	
	] }.joining(' ')
}
{ textLanguages =~ /eng/ ? ' subs' : null }
{ menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })
User avatar
rednoah
The Source
Posts: 24215
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot name, confusion, and auto deletion of file

Post by rednoah »

:?: Please the share the MediaInfo table for the file at hand, so that we can see the values that FileBot is working with at the time.


:idea: You access raw {audio} in your custom format. At a glance, the Format_Commercial property seems to be the likely culprit here. You'll want to replace DTS 96/24 in your format as well, as to not accidentally add a directory separator to your target file path.


:idea: The "subs" and "cp" bits are added by your format under certain conditions. It seem strange me that you add cryptic "subs" and "cp" instead of [English Subs] and [with Chapters] though:

Format: Select all

{ textLanguages =~ /eng/ ? ' subs' : null }
{ menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })



EDIT:

:?: How did you come up with your custom format code? What exactly do you intend to do? Most of your custom format code seems to not actually do what you intend to do?

:?: Maybe a less complex / more easy to understand custom format will work better for your use case?

Format: Select all

{ny} ({vf} {vc} {ac} {channels})


:!: Your video suggests that you want to just rename files in-place. You seem to be very confused by your own custom format doing more than that. Your current format moves files into a new file structure (as shown by the file path in the New Names section) because your custom format is generating file paths, likely by accident. The video shows the file being moved into a new folder, thus disappearing from the current folder, see History. The file in the bin is not the same file, it's the file that was overwritten / replaced as suggested by the Conflicts warning.

Image Image

Code: Select all

F:
└── Bite the Bullet (1975 BluRay 1080p x264 DTS 96
    └── 24 5.1 subs cp ).mkv

:idea: That said, if you're generally happy with your current format, and generally know what it does / is supposed to do, then we can of course also fix your custom code to better account for unexpected Format_Commercial property values. Let me know.
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 10
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: Filebot name, confusion, and auto deletion of file

Post by CaptainKen »

1) MediaInfo below
2) "It seem strange me that you add cryptic "subs" and "cp" instead of [English Subs] and [with Chapters] though"
Using those abbreviations are my way of keeping file names shorter, which sometime can be long. Since, I'm the only person that ever sees this, the customization you allow is perfect for me.
3) Could you please clean this up for me? "You'll want to replace DTS 96/24 in your format as well, as to not accidentally add a directory separator to your target file path."
4) Thank you for pointing out my various confusions. For the most part the code works as desired, however, I have had some off renames. I have typically manually fixed the odd balls. Whatever you can do to clean this up is great appreciated.
5) Yes, I like the renames to happen in the original file folder.
6) Yes I'm generally happy with my current format, and generally know what it does / is supposed to do, so I'd like to take you up on your offer to fix the custom code to better account for unexpected Format_Commercial property values. Thank you this offer!! If you need a copy of the file I can share it (to your email via or generic link) via OneDrive, unless of course sharing media is in violation of your forum rules.

Code: Select all

[General]
Count                      : 349
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
UniqueID                   : 289697209888343943819820738084139793523
UniqueID/String            : 289697209888343943819820738084139793523 (0xD9F1A733B8675E98A4CA86BFB2157C73)
VideoCount                 : 1
AudioCount                 : 1
TextCount                  : 1
MenuCount                  : 1
Video_Format_List          : AVC
Video_Format_WithHint_List : AVC
Video_Codec_List           : AVC
Video_Language_List        : en
Audio_Format_List          : DTS x96
Audio_Format_WithHint_List : DTS x96
Audio_Codec_List           : DTS x96
Audio_Language_List        : en
Audio_Channels_Total       : 6
Text_Format_List           : PGS
Text_Format_WithHint_List  : PGS
Text_Codec_List            : PGS
Text_Language_List         : en
Format                     : Matroska
Format/String              : Matroska
Format/Url                 : https://matroska.org/downloads/windows.html
Format/Extensions          : mkv mk3d mka mks
Format_Commercial          : Matroska
Format_Version             : Version 4
FileSize                   : 11398116296
FileSize/String            : 10.6 GiB
FileSize/String1           : 11 GiB
FileSize/String2           : 11 GiB
FileSize/String3           : 10.6 GiB
FileSize/String4           : 10.62 GiB
Duration                   : 7867894
Duration/String            : 2h 11mn
Duration/String1           : 2h 11mn 7s 894ms
Duration/String2           : 2h 11mn
Duration/String3           : 02:11:07.894
Duration/String4           : 02:11:00:00
Duration/String5           : 02:11:07.894 (02:11:00:00)
OverallBitRate             : 11589497
OverallBitRate/String      : 11.6 Mbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 188640
StreamSize                 : 2465324
StreamSize/String          : 2.35 MiB (0%)
StreamSize/String1         : 2 MiB
StreamSize/String2         : 2.4 MiB
StreamSize/String3         : 2.35 MiB
StreamSize/String4         : 2.351 MiB
StreamSize/String5         : 2.35 MiB (0%)
StreamSize_Proportion      : 0.00022
IsStreamable               : Yes
Title                      : Bite.the.Bullet.1975.1080p.BluRay.x264.DTS-FGT
Movie                      : Bite.the.Bullet.1975.1080p.BluRay.x264.DTS-FGT
Encoded_Date               : 2025-09-07 17:15:16 UTC
Encoded_Application        : mkvmerge v94.0 ('Initiate') 64-bit
Encoded_Application/String : mkvmerge v94.0 ('Initiate') 64-bit
Encoded_Library            : libebml v1.4.5 + libmatroska v1.7.1
Encoded_Library/String     : libebml v1.4.5 + libmatroska v1.7.1

[Video]
Count                            : 390
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
UniqueID                         : 1
Format                           : AVC
Format/String                    : AVC
Format/Info                      : Advanced Video Codec
Format/Url                       : http://developers.videolan.org/x264.html
Format_Commercial                : AVC
Format_Profile                   : [email protected]
Format_Settings                  : CABAC / 4 Ref Frames
Format_Settings_CABAC            : Yes
Format_Settings_CABAC/String     : Yes
Format_Settings_RefFrames        : 4
Format_Settings_RefFrames/String : 4 frame
InternetMediaType                : video/H264
CodecID                          : V_MPEG4/ISO/AVC
CodecID/Url                      : http://ffdshow-tryout.sourceforge.net/
Duration                         : 7867861.000000
Duration/String                  : 2h 11mn
Duration/String1                 : 2h 11mn 7s 861ms
Duration/String2                 : 2h 11mn
Duration/String3                 : 02:11:07.861
Duration/String4                 : 02:11:00:00
Duration/String5                 : 02:11:07.861 (02:11:00:00)
BitRate                          : 10000000
BitRate/String                   : 10000 Kbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 816
Height/String                    : 816 pixel
Sampled_Width                    : 1920
Sampled_Height                   : 816
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 2.353
DisplayAspectRatio/String        : 2.35:1
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 188640
ColorSpace                       : YUV
ChromaSubsampling                : 4:2:0
ChromaSubsampling/String         : 4:2:0
BitDepth                         : 8
BitDepth/String                  : 8 bit
ScanType                         : Progressive
ScanType/String                  : Progressive
Bits-(Pixel*Frame)               : 0.266
Delay                            : 83
Delay/String                     : 83ms
Delay/String1                    : 83ms
Delay/String2                    : 83ms
Delay/String3                    : 00:00:00.083
Delay/String4                    : 00:00:00:02
Delay/String5                    : 00:00:00.083 (00:00:00:02)
Delay_Source                     : Container
Delay_Source/String              : Container
StreamSize                       : 9881801120
StreamSize/String                : 9.20 GiB (87%)
StreamSize/String1               : 9 GiB
StreamSize/String2               : 9.2 GiB
StreamSize/String3               : 9.20 GiB
StreamSize/String4               : 9.203 GiB
StreamSize/String5               : 9.20 GiB (87%)
StreamSize_Proportion            : 0.86697
Encoded_Library                  : x264 - core 142 r2479 dd79a61
Encoded_Library/String           : x264 core 142 r2479 dd79a61
Encoded_Library_Name             : x264
Encoded_Library_Version          : core 142 r2479 dd79a61
Encoded_Library_Settings         : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=10000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language                         : en
Language/String                  : en
Language/String1                 : en
Language/String2                 : en
Language/String3                 : eng
Language/String4                 : en
Default                          : Yes
Default/String                   : Yes
Forced                           : No
Forced/String                    : No
colour_description_present       : Yes
colour_description_present_Sourc : Stream
colour_range                     : Limited
colour_range_Source              : Stream
colour_primaries                 : BT.709
colour_primaries_Source          : Stream
transfer_characteristics         : BT.709
transfer_characteristics_Source  : Stream
matrix_coefficients              : BT.709
matrix_coefficients_Source       : Stream

[Audio]
Count                      : 285
StreamCount                : 1
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 0
StreamOrder                : 1
ID                         : 2
ID/String                  : 2
UniqueID                   : 2
Format                     : DTS
Format/String              : DTS x96
Format/Info                : Digital Theater Systems
Format/Url                 : https://en.wikipedia.org/wiki/DTS_(sound_system)
Format_Commercial          : DTS 96/24
Format_Commercial_IfAny    : DTS 96/24
Format_Settings_Mode       : 16
Format_Settings_Endianness : Big
Format_AdditionalFeatures  : x96
CodecID                    : A_DTS
Duration                   : 7867894.000000
Duration/String            : 2h 11mn
Duration/String1           : 2h 11mn 7s 894ms
Duration/String2           : 2h 11mn
Duration/String3           : 02:11:07.894
Duration/String5           : 02:11:07.894
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 1509000
BitRate/String             : 1509 Kbps
Channel(s)                 : 6
Channel(s)/String          : 6 channel
ChannelPositions           : Front: L C R, Side: L R, LFE
ChannelPositions/String2   : 3/2/0.1
ChannelLayout              : C L R Ls Rs LFE
SamplesPerFrame            : 1024
SamplingRate               : 96000
SamplingRate/String        : 96.0 KHz
SamplingCount              : 755317824
FrameRate                  : 93.750
FrameRate/String           : 93.750 fps (1024 SPF)
FrameCount                 : 737615
BitDepth                   : 24
BitDepth/String            : 24 bit
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 83
Delay/String               : 83ms
Delay/String1              : 83ms
Delay/String2              : 83ms
Delay/String3              : 00:00:00.083
Delay/String5              : 00:00:00.083
Delay_Source               : Container
Delay_Source/String        : Container
Video_Delay                : 0
Video_Delay/String3        : 00:00:00.000
Video_Delay/String5        : 00:00:00.000
StreamSize                 : 1484081380
StreamSize/String          : 1.38 GiB (13%)
StreamSize/String1         : 1 GiB
StreamSize/String2         : 1.4 GiB
StreamSize/String3         : 1.38 GiB
StreamSize/String4         : 1.382 GiB
StreamSize/String5         : 1.38 GiB (13%)
StreamSize_Proportion      : 0.13020
Title                      : DTS 5.1
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No

[Text]
Count                 : 305
StreamCount           : 1
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 0
StreamOrder           : 2
ID                    : 3
ID/String             : 3
UniqueID              : 4
Format                : PGS
Format/String         : PGS
Format_Commercial     : PGS
CodecID               : S_HDMV/PGS
CodecID/Info          : Picture based subtitle format used on BDs/HD-DVDs
Duration              : 7770888.000000
Duration/String       : 2h 9mn
Duration/String1      : 2h 9mn 30s 888ms
Duration/String2      : 2h 9mn
Duration/String3      : 02:09:30.888
Duration/String5      : 02:09:30.888
BitRate               : 30646
BitRate/String        : 30.6 Kbps
FrameRate             : 0.259
FrameRate/String      : 0.259 fps
FrameCount            : 2010
ElementCount          : 2010
StreamSize            : 29768472
StreamSize/String     : 28.4 MiB (0%)
StreamSize/String1    : 28 MiB
StreamSize/String2    : 28 MiB
StreamSize/String3    : 28.4 MiB
StreamSize/String4    : 28.39 MiB
StreamSize/String5    : 28.4 MiB (0%)
StreamSize_Proportion : 0.00261
Title                 : English PGS
Language              : en
Language/String       : en
Language/String1      : en
Language/String2      : en
Language/String3      : eng
Language/String4      : en
Default               : No
Default/String        : No
Forced                : No
Forced/String         : No

[Menu]
Count              : 113
StreamCount        : 1
StreamKind         : Menu
StreamKind/String  : Menu
StreamKindID       : 0
Chapters_Pos_Begin : 101
Chapters_Pos_End   : 113
00:00:00.000       : Chapter 1
00:12:45.306       : Chapter 2
00:24:01.315       : Chapter 3
00:32:10.345       : Chapter 4
00:40:53.951       : Chapter 5
00:52:04.538       : Chapter 6
00:58:48.608       : Chapter 7
01:14:09.236       : Chapter 8
01:33:05.288       : Chapter 9
01:47:01.457       : Chapter 10
01:55:52.237       : Chapter 11
02:06:42.470       : Chapter 12


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

Re: Filebot name, confusion, and auto deletion of file

Post by rednoah »

:arrow: I've modified your audio stream snippet to handle DTS 96/24 specifically and to remove any and all / or \ characters generically:

Format: Select all

{
	audio.findAll{ it.language == /en/}.collect{ [
		it.Format_Commercial.replace(
			'DTS 96/24' : 'DTS',
			'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
			'Dolby Digital Plus' : 'DDP',
			'Dolby Digital' : 'DD',
			'AC3' : 'DD',
			'DTS-HD Master Audio' : 'DTS-HD MA'
		),
		it.Channels.match(
			8: '7.1',
			7: '6.1', 
			6: '5.1',
			5: '5.0',
			3: '2.1',
			2: '2.0'
		)	
	] }.joining(' ').slash(' ')
}
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 10
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: Filebot name, confusion, and auto deletion of file

Post by CaptainKen »

Wonderful, thank you!
Post Reply