conversion in rename slow

Support for macOS users
Post Reply
mpegman
Posts: 19
Joined: 11 Feb 2023, 13:38

conversion in rename slow

Post by mpegman »

Hi,

is it normal that the conversion from the identified movie to the correctly formatted filename is taking +/- a second per entry?

Filebot identified that the movie is

Code: Select all

A Bright Summer Day (1991)
now it needs to reformat that to

Code: Select all

/Volumes/video/1080p/B/A Brighter Summer Day (1991) {imdb-tt0101985}/A Brighter Summer Day (1991) {imdb-tt0101985} - EN - [Audio - 2.0 AAC ][Video - BLURAY 1080P X264 8 BIT[NOSUB]]- [YTS.MX]
every file found takes a second to rename.

Code: Select all

/Volumes/video/
{
	any
	{ if ( group =~ /(?i)mercator|xyze/) 'Movies nl' }
	{ if ( original =~ (/(?i)NLKIDS/) ) 'Movies kids' }
	{ if ( certification =~ /TV-Y|TV-G|TV-Y7|U/) 'Movies kids' }
    	{ if ( info.network 
    	=~ (/(?i)(ketnet|één|een|vtm|VTM GO|vt4|Canvas|streamz|Play4|play5|play6|play7|vtm2|vtm3|vtm4|vrt|2be|Ketnet|xcv)/ ))  'Movies nl' } 
	{ if ( info.certifications*.value*.findAll(/\d+/).flatten()*.toInteger().average().toInteger() < 8 )  'Movies kids'  }	  
	{ if ( vf =~ /(?i)2160p/) '4K UHD' } 
	{ if ( vf =~ /(?i)1080p/) '1080p' } 
	{ if ( vf =~ /(?i)720p/) '720p' } 
	{ '4K optimized to 1080p' }
}
/
{n00 = n.sortName().charAt(0)toUpperCase(); n00.isDigit() ? '0-9' : n00}
/
{ 
	var =  any 
	   		{ if (imdbid) '{imdb-'+imdbid+'}'} 
	   		{ if (tmdbid) '{tmdb-'+tmdbid+'}'} 

						
~ plex ** " $var"   %  any { ' - ' + audio.collect { [it['Language/String2'].upper(), ] }*.join(' ').join(' + ') + ' - ' }{ " - EN - " } % { "[Audio - " +[channels,ac].join(" ") + any {" [" + audio.collect { [it['Language/String2'].upper(), ] }*.join(' ').join(' + ') +']' 
}{ " " } + ']' } % { "[Video - " + allOf{vs}{vf}{'AVC' in vc ? 'h264' : vc }{bitdepth + ' bit'}{hdr}.join(' ').upper() } % {' '+original.matchAll(/proper|repack|rerip/).join('.').lower() } % { any{ 'en' in text.language ? '[EN]' : 'nl' in text.language ? '[NL]' : '[]' }{'[NOSUB]'	} } % {']'}  % { any 	{ if (original =~ /YTS.MX/  )  { "- [YTS.MX]"}} 	{ if (group =~ /MX/  )  { "- [YTS.MX]"}}	{'- [' + group + ']'} 	{ fn.matchlast(/\[([^\[\]]+)\]+/) } } ^ {'.'+lang.ISO2} }
In this slowness I'm not referring to the actual file renaming or copying. Just the string conversion done by my custom rename script
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: conversion in rename slow

Post by rednoah »

You can try just {plex} as baseline for how fast it can be, and then do systematic trial & error testing to see what makes your custom format slow in comparison.


:idea: Bindings such as {info} will require additional network requests (unless already cached) so we can expected that to be somewhat slow.


:idea: Bindings such as {vf} will require partial file reads (unless already cached) via libmediainfo so we can expected that to be somewhat slow, especially if the files are on a remote network drive.



EDIT:


:?: Can narrow down what exactly is slow? A specific binding? Internet? Local network? Disk latency? Disk throughput?


:idea: Running multiple formats in parallel may (or may not) speed up the process if you're formatting a large number of matches:
rednoah wrote: 30 Jun 2016, 08:36 Configure parallelism level: parallelism = <min>..<max>

Code: Select all

filebot -script fn:properties --def parallelism=8..64
:idea: Please read the FAQ and How to Request Help.
jamilmereck
Posts: 4
Joined: 29 May 2023, 00:36

Re: conversion in rename slow

Post by jamilmereck »

Agreed....I thought at first it might be the files I was searching for, but it seems to be slow across the board now
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: conversion in rename slow

Post by rednoah »

jamilmereck wrote: 29 May 2023, 00:40 Agreed....I thought at first it might be the files I was searching for, but it seems to be slow across the board now
What exactly is slow? What custom formats have you tried?
:idea: Please read the FAQ and How to Request Help.
Post Reply