automatically rename and movie folder and movie file on Unraid

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Using filebot v26.02.3 (2026-02-22) on unraid 7.2.3.

Container paths:
\downloads\torrents\filebot-in
\downloads\torrents\filebot-out

1) Attempting to get it to automatically rename movie folder and movie file inside of filebot-in/Movies and then move to filebot-out/Movies folder. It's renaming the folder and movie file as well as successfully moving them, however, it's deleting all files in the original folder, instead of moving all files (nfo, jpg's) into movie folder inside of filebot-out/Movies. So the newly renamed movie folder inside of filebot-out/Movies only has the movie file. Note, that I don't want the original folder and contents deleted.

Just before posting here, I discovered this old post on the topic. However, since it's 14-years old I'm lead to believe it's outdated, so I did not review or try it.
viewtopic.php?t=215

2) It is also not using a custom preset flagged as default. To set as default I opened the edit "Movies" preset I created, then opened the format editor and selected "use format".

MY ATTEMPTS:
I worked with Chatgpt for hours trying various code in "Automated Media Center: Custom Options:". Here are a few we tried:
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --apply import
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --def exts="srt|jpg|nfo"
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --apply import
--def movieFormat="{ny} ({y})/{ny} ({y})" --def clean=n --def subtitles=en --def artwork=y --def exts="srt|jpg|nfo"

ChatGPT also provided various User Bash Scripts. Here's the last one, but no luck:

Code: Select all

#!/bin/bash
# ===============================================
# Auto-Process FileBot Script for Unraid (Docker)
# Works with jlesage/filebot container
# Moves .mkv, .srt, .jpg, movie.nfo
# ===============================================

# Name of your FileBot container
CONTAINER_NAME="filebot"

# Input / output folders (mapped inside container)
SRC="/mnt/user/downloads/torrents/filebot-in/Movies"
DEST="/mnt/user/downloads/torrents/filebot-out/Movies"

# Loop over each folder in the input directory
for folder in "$SRC"/*/; do
    [ -d "$folder" ] || continue  # skip non-folders

    # Run FileBot inside the container
    docker exec "$CONTAINER_NAME" filebot -rename "$folder" \
        --db TheMovieDB \
        --format "{ny} ({y})/{ny} ({y})" \
        --action move \
        --output "$DEST" \
        --def clean=n \
        --def subtitles=en \
        --def exts="mkv|jpg|srt|nfo" \
        --def artwork=y

    # Log success
    echo "$(date): Processed folder $folder" >> /mnt/user/downloads/torrents/filebot-log.txt
done
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

CaptainKen wrote: 10 Mar 2026, 23:24 Container paths:

Code: Select all

\downloads\torrents\filebot-in
\downloads\torrents\filebot-out
:!: If you're using docker then you need to make sure that you have a single volume mount that contains both input and output folder, especially if you plan on moving files. Notes on --action MOVE and --action HARDLINK
will explain the technical details.


CaptainKen wrote: 10 Mar 2026, 23:24 1) Attempting to get it to automatically rename movie folder and movie file inside of filebot-in/Movies and then move to filebot-out/Movies folder. It's renaming the folder and movie file as well as successfully moving them, however, it's deleting all files in the original folder, instead of moving all files (nfo, jpg's) into movie folder inside of filebot-out/Movies. So the newly renamed movie folder inside of filebot-out/Movies only has the movie file. Note, that I don't want the original folder and contents deleted.
:?: Please paste the console output so that we can see what your filebot command is doing. Using a --log file is strongly recommended, so that you can check what's going on after the fact if you're not using an interactive terminal running commands yourself.


CaptainKen wrote: 10 Mar 2026, 23:24 Just before posting here, I discovered this old post on the topic. However, since it's 14-years old I'm lead to believe it's outdated, so I did not review or try it.
viewtopic.php?t=215
:idea: The amc script manual is up-to-date and reading it from top to bottom is strongly recommended. Let me know if you have any questions on the content, especially if you find any thing that does not work as documented. Running the amc script manually - before setting up any kind of unattended automation - is always a good idea.
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Thanks for the response and details. Here a screenshot of the container template as well as the log file.



Screenshot
https://imgur.com/tHg2awa
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

:!: Note that you are using the jlesage/filebot container. This is not one of ours, not made nor maintained by us. See Installing FileBot on unRAID for details. If you have questions specific to the jlesage/filebot container then it's best to ask the developer directly.


:idea: The container you are using seems to be calling the amc script and that seems to run and organise files correctly as specified:

Code: Select all

...
Parameter: movieFormat = {plex}
...
[MOVE] from [/watch/Movies/Big Bad Mama II TEST 11(1987)/Big Bad Mama II (1987 TEST).mp4] to [/output/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987).mp4]
:idea: The screenshot shows that you're mapping /mnt/users/downloads/torrents/filebot-out to /output so the file will have been moved to the following NAS file path:

Code: Select all

/mnt/users/downloads/torrents/filebot-out/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987).mp4


:idea: --def clean=y is also set and working as expected:

Code: Select all

Parameter: clean = y
...
Clean clutter files and empty folders
Delete /watch/Movies/Big Bad Mama II TEST-12 (1987)/fanart.jpg
...


:idea: The screenshot shows that jlesage/filebot has a Automated Media Center: Movie Format configuration field that is currently set to {plex}. It's all working correctly as it should as far as I can tell. If you want things to work differently, then you need pass the appropriate arguments.



:idea: If you want to move along Companion Files, then you can add --apply import to the filebot command. The jlesage/filebot container does not seem to provide dedicated unRAID configuration fields for that though. As per README.md › Environment Variables, you can add arbitrary command-line arguments via the AMC_CUSTOM_OPTIONS environment variable. The screenshot shows that this environment variable is exposed via the Automated Media Center: Custom Options configuration field.

Code: Select all

--apply import


:idea: At a glance, --def clean=y is hardcoded at docker-filebot/rootfs/etc/services.d/amc/run#L136 but AMC_CUSTOM_OPTIONS can probably be used to overwrite that.



:arrow: tl;dr set Automated Media Center: Custom Options to the following options, to make filebot move along companion files and not clean left-behind files afterwards:

Shell: Select all

--apply import --def clean=n
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Awesome, the solution to moving all the files was "--apply import --def clean=n". THANK YOU!

Log file: https://pastebin.com/rjqwjDcQ

However,
1) It still leaves the original folder with no contents in filebot-in.

2) Also, how do I get my custom renaming preset to be used rather than the default?
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

1.
You are using --action move so files are moved, thus no longer in the input folder. Use --action duplicate instead, i.e. set the Automated Media Center: Action field to duplicate. That would ideally hardlink / reflink the files instead of physically copying them, but since your input / output folders are separate volume mounts you will be physically copying files.


2.
You can use the Automated Media Center: Movie Format field to set the --def movieFormat parameter.
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Thank you again for your responses!

1) When I stated that "It still leaves the original folder with no contents in filebot-in", I understand that was a little ambiguous, sorry. What I was attempting to say is that it left the empty original folder in filebot-in, rather than deleting it once the files are moved. Therefore, just asking how to delete the original folder and it's contents, not just the contents.

2) Instead of using the "Automated Media Center: Custom Options:" field, I replaced {plex} in the "Automated Media Center: Movie Format:" field with:

Code: Select all

@/config/MovieFormat.groovy
The AMC dev has an interesting sense of humor requiring ".groovy" as the file extension. Using this groovy file approach, finally renames using my custom preset. However, when it moves all the files it looses the specific movie folder itself and just puts the files into the main filebot-out folder without a specific folder for the movie and not within the "Movies" folder.

Here's the contents of: \\kennas1\downloads\torrents\
\\kennas1\downloads\torrents\
filebot-out\Movies
filebot-out\Big Bad Mama II (1987 Bluray 1080p x264)
filebot-out\fanart.jpg
filebot-out\movie.nfo
filebot-out\poster.jpg

Here's what the proper structure should be. In fact, this was the case (minus the custom file rename) before implementing the groovy file approach:
\\kennas1\downloads\torrents\
filebot-out\Movies\Big Bad Mama II (1987)\Big Bad Mama II (1987 Bluray 1080p x264)
filebot-out\Movies\Big Bad Mama II (1987)\fanart.jpg
filebot-out\Movies\Big Bad Mama II (1987)\movie.nfo
filebot-out\Movies\Big Bad Mama II (1987)\poster.jpg

Log file: https://pastebin.com/3f3Y8SmR

BTW, the log file always contains these lines and I don't know if they should be of concern:
[xvnc ] Could not find any render nodes
[xvnc ] Failed to initialize DRI3 extension
[xvnc ] [mi] mieq: warning: overriding existing handler 0 with 0x1495120140bd for event 2
[xvnc ] [mi] mieq: warning: overriding existing handler 0 with 0x1495120140bd for event 3
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

1.
You could keep the previously discussed --def clean=y if you want to delete left-behind files and folders. If you want to explicitly only delete left-behind empty folders, but not left-behind files if any, then you can use --apply prune to do just that.



2.
If you want a Movies folder, a Name (Year) folder, etc, then you can modify your format to do just that. The entire file path - not just the file name - is entirely up to your custom format.

e.g. Movies/Avatar (2009)/Avatar (2009)

Format: Select all

{plex}
e.g. Avatar (2009)

Format: Select all

{n} ({y})
e.g. Avatar (2009)/Avatar (2009)

Format: Select all

{n} ({y})/{n} ({y})
e.g. Movies/Avatar (2009)/Avatar (2009)

Format: Select all

Movies/{n} ({y})/{n} ({y})
:idea: You get the target file path that you generate via your custom format. There's not much I can add to that. If you need help modifying your custom format to fit your needs, then you'd have to paste your custom format here so we can edit it for you.




:!: As for humour, unfortunately we have none... --def name=@file script parameter usage is generic and allows any file extension, including no file extension:

Console Output: Select all

$ date > value.txt
$ filebot -script g:"println date" --def date="@value.txt"
Sun Mar 15 05:14:59 UTC 2026

:?: What exactly made you think otherwise? 🤔




3.
xvnc is the remote desktop software that your container is using to make the FileBot Desktop application available to you via the your browser, i.e. completely unrelated to filebot specifically. That said, looks like it's just warning messages, running a Linux Desktop inside a container is bound to print some warning messages, so if everything is working, don't worry about it:

Console Output: Select all

[xvnc ] Could not find any render nodes
[xvnc ] Failed to initialize DRI3 extension
[xvnc ] [mi] mieq: warning: overriding existing handler 0 with 0x1495120140bd for event 2
[xvnc ] [mi] mieq: warning: overriding existing handler 0 with 0x1495120140bd for event 3
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

This "--apply import --def clean=y" is working well, with one small exception. As wanted it's deleting the original folder "filebot-in\Movies\Big Bad Mama II (1987)", but what's not wanted is it's deleting its' parent folder "Movies" as well.

Log file:

Code: Select all

text  error  warn  system  array  login  

[cont-init   ] 55-filebot.sh: Update user-defined System Properties
[cont-init   ] 55-filebot.sh: * Set net.filebot.theme = Darcula
[cont-init   ] 55-filebot.sh: Store user-defined System Properties
[cont-init   ] 55-filebot.sh: * Write /config/system.properties
[cont-init   ] 55-filebot.sh: #FileBot System Properties
[cont-init   ] 55-filebot.sh: #Sun Mar 15 13:16:32 MST 2026
[cont-init   ] 55-filebot.sh: net.filebot.theme=Darcula
[cont-init   ] 55-filebot.sh: 
[cont-init   ] 55-filebot.sh: Done ヾ(@⌒ー⌒@)ノ
[cont-init   ] 55-filebot.sh: terminated successfully.
[cont-init   ] 85-take-config-ownership.sh: executing...
[cont-init   ] 85-take-config-ownership.sh: terminated successfully.
[cont-init   ] 89-info.sh: executing...
    ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           FileBot                                       │
    │ Application Version:   5.2.1                                         │
    │ Docker Image Version:  26.02.3                                       │
    │ Docker Image Platform: linux/amd64                                   │
    │                                                                      │
    ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init   ] 89-info.sh: terminated successfully.
[cont-init   ] all container initialization scripts executed.
[init        ] giving control to process supervisor.
[supervisor  ] loading services...
[supervisor  ] loading service 'default'...
[supervisor  ] loading service 'app'...
[supervisor  ] loading service 'filebot-info'...
[supervisor  ] loading service 'gui'...
[supervisor  ] loading service 'audiorecorder'...
[supervisor  ] service 'audiorecorder' is disabled.
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] service 'certsmonitor' is disabled.
[supervisor  ] loading service 'dbus'...
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'webauth'...
[supervisor  ] service 'webauth' is disabled.
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'pulseaudio'...
[supervisor  ] service 'pulseaudio' is disabled.
[supervisor  ] loading service 'webservices'...
[supervisor  ] loading service 'xcompmgr'...
[supervisor  ] loading service 'xrdb'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] loading service 'amc'...
[supervisor  ] all services loaded.
[supervisor  ] starting services...
[supervisor  ] starting service 'filebot-info'...
[filebot-info] FileBot 5.2.1 (r10920)
[filebot-info] JNA Native: 7.0.2
[filebot-info] MediaInfo: 26.01
[filebot-info] Tools: fpcalc/1.5.1 7z/17.04 unrar/6.12
[filebot-info] Extended Attributes: OK
[filebot-info] Unicode Filesystem: OK
[filebot-info] Script Bundle: 2026-02-12 (r1026)
[filebot-info] Groovy: 4.0.28
[filebot-info] JRE: OpenJDK Runtime Environment 17.0.18
[filebot-info] JVM: OpenJDK 64-Bit Server VM
[filebot-info] System Property: net.filebot.theme=Darcula
[filebot-info] CPU/MEM: 32 Core / 12 GB Max Memory / 44 MB Used Memory
[filebot-info] OS: Linux (amd64)
[filebot-info] HW: Linux 9c0581cfbc82 6.12.54-Unraid #1 SMP PREEMPT_DYNAMIC Tue Oct 21 15:58:46 PDT 2025 x86_64 GNU/Linux
[filebot-info] CPU/MEM: : AMD Ryzen 9 7950X 16-Core Processor / MemTotal: 49 GB / MemFree: 8 GB / MemAvailable: 45 GB
[filebot-info] STORAGE: overlay [/] @ 14 GB | fuse.shfs [/storage] @ 79 TB | fuse.shfs [/watch] @ 79 TB | fuse.shfs [/output] @ 79 TB | fuse.shfs [/config] @ 2.0 TB
[filebot-info] UID/GID: uid=99(app) gid=100(app) groups=100(app)
[filebot-info] DATA: /config
[filebot-info] Package: DOCKER
[filebot-info] License: FileBot License PX67913137 (Valid-Until: 2074-12-19)
[filebot-info] Done ヾ(@⌒ー⌒@)ノ
[supervisor  ] service 'filebot-info' exited (with status 0).
[supervisor  ] starting service 'dbus'...
[supervisor  ] starting service 'xvnc'...
[xvnc        ] Xvnc TigerVNC 1.16.0 - built Feb 22 2026 16:30:20
[xvnc        ] Copyright (C) 1999-2026 TigerVNC team and many others (see README.rst)
[xvnc        ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc        ] Underlying X server release 12101021
[xvnc        ] Could not find any render nodes
[xvnc        ] Failed to initialize DRI3 extension
[xvnc        ] Sun Mar 15 13:16:33 2026
[xvnc        ]  vncext:      VNC extension running!
[xvnc        ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc        ]  vncext:      Listening for VNC connections on all interface(s), port 5900
[xvnc        ]  vncext:      Created VNC server for screen 0
[xvnc        ] [mi] mieq: warning: overriding existing handler 0 with 0x1545273f80bd for event 2
[xvnc        ] [mi] mieq: warning: overriding existing handler 0 with 0x1545273f80bd for event 3
[supervisor  ] starting service 'nginx'...
[nginx       ] Listening for HTTP connections on port 5800.
[supervisor  ] starting service 'openbox'...
[supervisor  ] starting service 'webservices'...
[supervisor  ] starting service 'xcompmgr'...
[supervisor  ] starting service 'xrdb'...
[supervisor  ] starting service 'app'...
[supervisor  ] starting service 'amc'...
[amc         ] Changes detected in input folder.
[amc         ] Waiting 10 seconds before proceeding...
[supervisor  ] all services started.
[supervisor  ] service 'xrdb' exited (with status 0).
[amc         ] Invoking AMC script...
[amc         ] Run script [fn:amc] at [Sun Mar 15 13:16:47 MST 2026]
[amc         ] Parameter: artwork = n
[amc         ] Parameter: music = y
[amc         ] Parameter: clean = y
[amc         ] Parameter: excludeList = /config/amc-exlude-list.txt
[amc         ] Parameter: movieFormat = Movies/{n} ({y})/
[amc         ] {n.replaceTrailingBrackets()} ({y} 
[amc         ] {fn.match(/REMUX|IMAX/)} {source} {vf} 
[amc         ] {vc.replace(
[amc         ] 'AVC' : 'x264',
[amc         ] 'HEVC' : 'x265'
[amc         ] )} 
[amc         ] {
[amc         ] audio.findAll{ it.language == /en/}.collect{ [
[amc         ] it.Format_Commercial.replace(
[amc         ] 'DTS 96/24' : 'DTS',
[amc         ] 'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
[amc         ] 'Dolby Digital Plus' : 'DDP',
[amc         ] 'Dolby Digital' : 'DD',
[amc         ] 'AC3' : 'DD',
[amc         ] 'DTS-HD Master Audio' : 'DTS-HD MA',
[amc         ] 'AAC LC' : 'AAC'
[amc         ] ),
[amc         ] it.Channels.match(
[amc         ] 8: '7.1',
[amc         ] 7: '6.1', 
[amc         ] 6: '5.1',
[amc         ] 5: '5.0',
[amc         ] 3: '2.1',
[amc         ] 2: '2.0'
[amc         ] )
[amc         ] ] }.joining(' ').slash(' ')
[amc         ] }
[amc         ] { textLanguages =~ /eng/ ? ' subs' : null }
[amc         ] { menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })
[amc         ] Parameter: musicFormat = {plex}
[amc         ] Parameter: seriesFormat = {plex}
[amc         ] Parameter: animeFormat = {plex}
[amc         ] Argument[0]: /watch
[amc         ] Use excludes: /config/amc-exlude-list.txt (0)
[amc         ] Input: /watch/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987).mp4
[amc         ] └─ xattr metadata: Big Bad Mama II (1987)
[amc         ] Group files by movie or series
[amc         ] Group: {Movie=Big Bad Mama II (1987)} => [Big Bad Mama II (1987).mp4]
[amc         ] Rename movies using [TheMovieDB]
[amc         ] Auto-detect movie from context [/watch/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987).mp4]
[amc         ] [XATTR] Big Bad Mama II (1987) (/watch/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987).mp4)
[amc         ] [MOVE] from [/watch/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987).mp4] to [/output/Movies/Big Bad Mama II (1987)/Big Bad Mama II (1987 Bluray 1080p x264 ).mp4]
[amc         ] [IMPORT] Moving fanart.jpg (/output/Movies/Big Bad Mama II (1987)/fanart.jpg)
[amc         ] [IMPORT] Moving movie.nfo (/output/Movies/Big Bad Mama II (1987)/movie.nfo)
[amc         ] [IMPORT] Moving poster.jpg (/output/Movies/Big Bad Mama II (1987)/poster.jpg)
[amc         ] Processed 1 file
[amc         ] Clean clutter files and empty folders
[amc         ] Delete /watch/Movies/Big Bad Mama II (1987)
[amc         ] Delete /watch/Movies
[amc         ] Keep /watch (root folder)
[amc         ] Done ヾ(@⌒ー⌒@)ノ
Here's the custom preset I'd like to use. I added "Movies/{n} ({y})/" which creates the folder during the move with all the files inside.

This is the rename results "Big Bad Mama II (1987 Bluray 1080p x264 )", however, it would be great if you could fix it so it picks up the AAC audio format with associated channels.

Format: Select all

Movies/{n} ({y})/
{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(
			'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',
			'AAC LC' : 'AAC'
		),
		it.Channels.match(
			8: '7.1',
			7: '6.1', 
			6: '5.1',
			5: '5.0',
			3: '2.1',
			2: '2.0'
		)	
	] }.joining(' ').slash(' ')
}
{ textLanguages =~ /eng/ ? ' subs' : null }
{ menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })
Thank you for your time and assistance.
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

CaptainKen wrote: 15 Mar 2026, 20:20 As wanted it's deleting the original folder "filebot-in\Movies\Big Bad Mama II (1987)", but what's not wanted is it's deleting its' parent folder "Movies" as well.
--def clean=y will delete any left-over that's in the input folder. You could watch /watch/Movies instead of /watch I guess. Alternatively, you could create a random / hidden place holder file (e.g. .keep but could by anything) in your Movies folder to ensure that it's never empty and thus never gets deleted.



CaptainKen wrote: 15 Mar 2026, 20:20 This is the rename results "Big Bad Mama II (1987 Bluray 1080p x264 )", however, it would be great if you could fix it so it picks up the AAC audio format with associated channels.
:?: What does the MediaInfo table for the file at hand? What target file name do you want to generate for this file?
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Movie file MediaInfo:

Code: Select all

[General]
Count                      : 359
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
VideoCount                 : 1
AudioCount                 : 1
Video_Format_List          : AVC
Video_Format_WithHint_List : AVC
Video_Codec_List           : AVC
Audio_Format_List          : AAC LC
Audio_Format_WithHint_List : AAC LC
Audio_Codec_List           : AAC LC
Audio_Channels_Total       : 2
Format                     : MPEG-4
Format/String              : MPEG-4
Format/Extensions          : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Format_Commercial          : MPEG-4
Format_Profile             : Base Media
InternetMediaType          : video/mp4
CodecID                    : isom
CodecID/String             : isom (isom/iso2/avc1/mp41)
CodecID/Url                : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible         : isom/iso2/avc1/mp41
FileSize                   : 1493960815
FileSize/String            : 1.39 GiB
FileSize/String1           : 1 GiB
FileSize/String2           : 1.4 GiB
FileSize/String3           : 1.39 GiB
FileSize/String4           : 1.391 GiB
Duration                   : 5014027
Duration/String            : 1h 23mn
Duration/String1           : 1h 23mn 34s 27ms
Duration/String2           : 1h 23mn
Duration/String3           : 01:23:34.027
Duration/String4           : 01:23:28:22
Duration/String5           : 01:23:34.027 (01:23:28:22)
OverallBitRate             : 2383650
OverallBitRate/String      : 2384 Kbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 120214
StreamSize                 : 4277598
StreamSize/String          : 4.08 MiB (0%)
StreamSize/String1         : 4 MiB
StreamSize/String2         : 4.1 MiB
StreamSize/String3         : 4.08 MiB
StreamSize/String4         : 4.079 MiB
StreamSize/String5         : 4.08 MiB (0%)
StreamSize_Proportion      : 0.00286
HeaderSize                 : 4277590
DataSize                   : 1489683225
FooterSize                 : 0
IsStreamable               : Yes
Encoded_Application        : Lavf59.0.101
Encoded_Application/String : Lavf59.0.101

[Video]
Count                            : 399
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 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                          : avc1
CodecID/Info                     : Advanced Video Coding
Duration                         : 5013926
Duration/String                  : 1h 23mn
Duration/String1                 : 1h 23mn 33s 926ms
Duration/String2                 : 1h 23mn
Duration/String3                 : 01:23:33.926
Duration/String4                 : 01:23:28:22
Duration/String5                 : 01:23:33.926 (01:23:28:22)
BitRate                          : 2250000
BitRate/String                   : 2250 Kbps
BitRate_Maximum                  : 31250000
BitRate_Maximum/String           : 31.2 Mbps
Width                            : 1920
Width/String                     : 1920 pixel
Height                           : 1024
Height/String                    : 1024 pixel
Sampled_Width                    : 1920
Sampled_Height                   : 1024
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 1.875
DisplayAspectRatio/String        : 1.85:1
Rotation                         : 0.000
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate_Mode_Original          : VFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 120214
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.048
StreamSize                       : 1409237752
StreamSize/String                : 1.31 GiB (94%)
StreamSize/String1               : 1 GiB
StreamSize/String2               : 1.3 GiB
StreamSize/String3               : 1.31 GiB
StreamSize/String4               : 1.312 GiB
StreamSize/String5               : 1.31 GiB (94%)
StreamSize_Proportion            : 0.94329
Encoded_Library                  : x264 - core 163
Encoded_Library/String           : x264 core 163
Encoded_Library_Name             : x264
Encoded_Library_Version          : core 163
Encoded_Library_Settings         : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=18 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=2250 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
CodecConfigurationBox            : avcC

[Audio]
Count                        : 286
StreamCount                  : 1
StreamKind                   : Audio
StreamKind/String            : Audio
StreamKindID                 : 0
StreamOrder                  : 1
ID                           : 2
ID/String                    : 2
Format                       : AAC
Format/String                : AAC LC
Format/Info                  : Advanced Audio Codec Low Complexity
Format_Commercial            : AAC
Format_Settings_SBR          : No (Explicit)
Format_Settings_SBR/String   : No (Explicit)
Format_AdditionalFeatures    : LC
CodecID                      : mp4a-40-2
Duration                     : 5014027
Duration/String              : 1h 23mn
Duration/String1             : 1h 23mn 34s 27ms
Duration/String2             : 1h 23mn
Duration/String3             : 01:23:34.027
Duration/String5             : 01:23:34.027
Source_Duration              : 5014048
Source_Duration/String       : 1h 23mn
Source_Duration/String1      : 1h 23mn 34s 48ms
Source_Duration/String2      : 1h 23mn
Source_Duration/String3      : 01:23:34.048
Source_Duration/String5      : 01:23:34.048
BitRate_Mode                 : CBR
BitRate_Mode/String          : CBR
BitRate                      : 128352
BitRate/String               : 128 Kbps
Channel(s)                   : 2
Channel(s)/String            : 2 channel
ChannelPositions             : Front: L R
ChannelPositions/String2     : 2/0/0
ChannelLayout                : L R
SamplesPerFrame              : 1024
SamplingRate                 : 48000
SamplingRate/String          : 48.0 KHz
SamplingCount                : 240673296
FrameRate                    : 46.875
FrameRate/String             : 46.875 fps (1024 SPF)
FrameCount                   : 235033
Source_FrameCount            : 235034
Compression_Mode             : Lossy
Compression_Mode/String      : Lossy
StreamSize                   : 80445459
StreamSize/String            : 76.7 MiB (5%)
StreamSize/String1           : 77 MiB
StreamSize/String2           : 77 MiB
StreamSize/String3           : 76.7 MiB
StreamSize/String4           : 76.72 MiB
StreamSize/String5           : 76.7 MiB (5%)
StreamSize_Proportion        : 0.05385
Source_StreamSize            : 80445465
Source_StreamSize/String     : 76.7 MiB (5%)
Source_StreamSize/String1    : 77 MiB
Source_StreamSize/String2    : 77 MiB
Source_StreamSize/String3    : 76.7 MiB
Source_StreamSize/String4    : 76.72 MiB
Source_StreamSize/String5    : 76.7 MiB (5%)
Source_StreamSize_Proportion : 0.05385
Default                      : Yes
Default/String               : Yes
AlternateGroup               : 1
AlternateGroup/String        : 1
mdhd_Duration                : 5014027
So silly me, I figured once I got Movie renaming resolved, that all I'd have to do is copy my existing custom preset and make the same applicable tweaks to it that were made for Movies. This one is strange. It renames fine in using manual mode of FB, but does not rename in automated mode, it just moves the folder and/or files, with the folder name missing the year.

Original file: 24: Legacy - 1x01 - 12:00 Noon - 1:00 P.M..mkv
Manual results: 24: Legacy - 1x01 - 12:00 Noon - 1:00 P.M. ( 720p x264 DD 5.1 subs).mkv

Custom TV Show preset:

Code: Select all

TV Shows/{ny}/
{n.replaceTrailingBrackets()} s{S00}e{E00} - {t} ({source} {vf} 
{vc.replace(
	'AVC' : 'x264',
	'HEVC' : 'x265'
)} 
{
	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',
			'AAC LC' : 'AAC'
		),
		it.Channels.match(
			8: '7.1',
			7: '6.1', 
			6: '5.1',
			5: '5.0',
			3: '2.1',
			2: '2.0'
		)	
	] }.joining(' ').slash(' ')
}
{ textLanguages =~ /eng/ ? ' subs' : null }
{ menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })

Custom TV Show MediaInfo:

Code: Select all

[General]
Count                       : 359
StreamCount                 : 1
StreamKind                  : General
StreamKind/String           : General
StreamKindID                : 0
UniqueID                    : 193029676292730646162809956495978286687
UniqueID/String             : 193029676292730646162809956495978286687 (0x913829D2CBFD9481CA92C6FCB9564E5F)
VideoCount                  : 1
AudioCount                  : 1
TextCount                   : 1
Video_Format_List           : AVC
Video_Format_WithHint_List  : AVC
Video_Codec_List            : AVC
Video_Language_List         : en
Audio_Format_List           : AC-3
Audio_Format_WithHint_List  : AC-3
Audio_Codec_List            : AC-3
Audio_Language_List         : en
Audio_Channels_Total        : 6
Text_Format_List            : UTF-8
Text_Format_WithHint_List   : UTF-8
Text_Codec_List             : UTF-8
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                    : 690180093
FileSize/String             : 658 MiB
FileSize/String1            : 658 MiB
FileSize/String2            : 658 MiB
FileSize/String3            : 658 MiB
FileSize/String4            : 658.2 MiB
Duration                    : 2787264
Duration/String             : 46mn 27s
Duration/String1            : 46mn 27s 264ms
Duration/String2            : 46mn 27s
Duration/String3            : 00:46:27.264
Duration/String4            : 00:46:24:11
Duration/String5            : 00:46:27.264 (00:46:24:11)
OverallBitRate              : 1980954
OverallBitRate/String       : 1981 Kbps
FrameRate                   : 23.976
FrameRate/String            : 23.976 fps
FrameCount                  : 66827
StreamSize                  : 640961
StreamSize/String           : 626 KiB (0%)
StreamSize/String1          : 626 KiB
StreamSize/String2          : 626 KiB
StreamSize/String3          : 626 KiB
StreamSize/String4          : 625.9 KiB
StreamSize/String5          : 626 KiB (0%)
StreamSize_Proportion       : 0.00093
IsStreamable                : Yes
Encoded_Date                : 2019-02-11 02:28:16 UTC
Encoded_Application         : mkvmerge v30.0.0 ('Interstellar') 64-bit
Encoded_Application/String  : mkvmerge 30.0.0 ('Interstellar') 64-bit
Encoded_Application_Name    : mkvmerge
Encoded_Application_Version : 30.0.0 ('Interstellar') 64-bit
Encoded_Library             : libebml v1.3.6 + libmatroska v1.4.9
Encoded_Library/String      : libebml v1.3.6 + libmatroska v1.4.9

[Video]
Count                            : 398
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 1
UniqueID                         : 14196078089034333250
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                         : 2787243.000000
Duration/String                  : 46mn 27s
Duration/String1                 : 46mn 27s 243ms
Duration/String2                 : 46mn 27s
Duration/String3                 : 00:46:27.243
Duration/String4                 : 00:46:24:11
Duration/String5                 : 00:46:27.243 (00:46:24:11)
BitRate                          : 1595053
BitRate/String                   : 1595 Kbps
Width                            : 1280
Width/String                     : 1280 pixel
Height                           : 720
Height/String                    : 720 pixel
Sampled_Width                    : 1280
Sampled_Height                   : 720
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 1.778
DisplayAspectRatio/String        : 16:9
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 66827
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.072
Delay                            : 0
Delay/String3                    : 00:00:00.000
Delay/String4                    : 00:00:00:00
Delay/String5                    : 00:00:00.000 (00:00:00:00)
Delay_Source                     : Container
Delay_Source/String              : Container
StreamSize                       : 555725242
StreamSize/String                : 530 MiB (81%)
StreamSize/String1               : 530 MiB
StreamSize/String2               : 530 MiB
StreamSize/String3               : 530 MiB
StreamSize/String4               : 530.0 MiB
StreamSize/String5               : 530 MiB (81%)
StreamSize_Proportion            : 0.80519
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:-1:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=18 / lookahead_threads=3 / 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=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / 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                      : 327
StreamCount                : 1
StreamKind                 : Audio
StreamKind/String          : Audio
StreamKindID               : 0
StreamOrder                : 1
ID                         : 2
ID/String                  : 2
UniqueID                   : 8673474766793233314
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                    : A_AC3
Duration                   : 2787264.000000
Duration/String            : 46mn 27s
Duration/String1           : 46mn 27s 264ms
Duration/String2           : 46mn 27s
Duration/String3           : 00:46:27.264
Duration/String5           : 00:46:27.264
BitRate_Mode               : CBR
BitRate_Mode/String        : CBR
BitRate                    : 384000
BitRate/String             : 384 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              : L R C LFE Ls Rs
SamplesPerFrame            : 1536
SamplingRate               : 48000
SamplingRate/String        : 48.0 KHz
SamplingCount              : 133788672
FrameRate                  : 31.250
FrameRate/String           : 31.250 fps (1536 SPF)
FrameCount                 : 87102
Compression_Mode           : Lossy
Compression_Mode/String    : Lossy
Delay                      : 0
Delay/String3              : 00:00:00.000
Delay/String5              : 00:00:00.000
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                 : 133788672
StreamSize/String          : 128 MiB (19%)
StreamSize/String1         : 128 MiB
StreamSize/String2         : 128 MiB
StreamSize/String3         : 128 MiB
StreamSize/String4         : 127.6 MiB
StreamSize/String5         : 128 MiB (19%)
StreamSize_Proportion      : 0.19385
Title                      : Dolby Digital 5.1
Language                   : en
Language/String            : en
Language/String1           : en
Language/String2           : en
Language/String3           : eng
Language/String4           : en
ServiceKind                : CM
ServiceKind/String         : Complete Main
Default                    : Yes
Default/String             : Yes
Forced                     : No
Forced/String              : No
bsid                       : 6
dialnorm                   : -27 dB
compr                      : 0.53 dB
dynrng                     : 0.27 dB
acmod                      : 7
lfeon                      : 1
cmixlev                    : -3.0 dB
surmixlev                  : -3 dB
ltrtcmixlev                : -3.0 dB
ltrtsurmixlev              : -3.0 dB
lorocmixlev                : -3.0 dB
lorosurmixlev              : -3.0 dB
dialnorm_Average           : -27 dB
dialnorm_Minimum           : -27 dB
dialnorm_Maximum           : -27 dB
dialnorm_Count             : 867
compr_Average              : -2.78 dB
compr_Minimum              : -8.89 dB
compr_Maximum              : 3.88 dB
compr_Count                : 861
dynrng_Average             : -2.48 dB
dynrng_Minimum             : -5.00 dB
dynrng_Maximum             : 3.70 dB
dynrng_Count               : 865

[Text]
Count                 : 305
StreamCount           : 1
StreamKind            : Text
StreamKind/String     : Text
StreamKindID          : 0
StreamOrder           : 2
ID                    : 3
ID/String             : 3
UniqueID              : 2401415029144083622
Format                : UTF-8
Format/String         : UTF-8
Format_Commercial     : UTF-8
CodecID               : S_TEXT/UTF8
CodecID/Info          : UTF-8 Plain Text
Duration              : 2782112.000000
Duration/String       : 46mn 22s
Duration/String1      : 46mn 22s 112ms
Duration/String2      : 46mn 22s
Duration/String3      : 00:46:22.112
Duration/String5      : 00:46:22.112
BitRate               : 72
BitRate/String        : 72 bps
FrameRate             : 0.322
FrameRate/String      : 0.322 fps
FrameCount            : 897
ElementCount          : 897
StreamSize            : 25218
StreamSize/String     : 24.6 KiB (0%)
StreamSize/String1    : 25 KiB
StreamSize/String2    : 25 KiB
StreamSize/String3    : 24.6 KiB
StreamSize/String4    : 24.63 KiB
StreamSize/String5    : 24.6 KiB (0%)
StreamSize_Proportion : 0.00004
Title                 : English
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
TV Show log:

Code: Select all

text  error  warn  system  array  login  

[filebot-info] STORAGE: overlay [/] @ 14 GB | fuse.shfs [/storage] @ 79 TB | fuse.shfs [/watch] @ 79 TB | fuse.shfs [/output] @ 79 TB | fuse.shfs [/config] @ 2.0 TB
[filebot-info] UID/GID: uid=99(app) gid=100(app) groups=100(app)
[filebot-info] DATA: /config
[filebot-info] Package: DOCKER
[filebot-info] License: FileBot License PX67913137 (Valid-Until: 2074-12-19)
[filebot-info] Done ヾ(@⌒ー⌒@)ノ
[supervisor  ] service 'filebot-info' exited (with status 0).
[supervisor  ] starting service 'dbus'...
[supervisor  ] starting service 'xvnc'...
[xvnc        ] Xvnc TigerVNC 1.16.0 - built Feb 22 2026 16:30:20
[xvnc        ] Copyright (C) 1999-2026 TigerVNC team and many others (see README.rst)
[xvnc        ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc        ] Underlying X server release 12101021
[xvnc        ] Could not find any render nodes
[xvnc        ] Failed to initialize DRI3 extension
[xvnc        ] Sun Mar 15 14:28:32 2026
[xvnc        ]  vncext:      VNC extension running!
[xvnc        ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc        ]  vncext:      Listening for VNC connections on all interface(s), port 5900
[xvnc        ]  vncext:      Created VNC server for screen 0
[xvnc        ] [mi] mieq: warning: overriding existing handler 0 with 0x14cc92a840bd for event 2
[xvnc        ] [mi] mieq: warning: overriding existing handler 0 with 0x14cc92a840bd for event 3
[supervisor  ] starting service 'nginx'...
[nginx       ] Listening for HTTP connections on port 5800.
[supervisor  ] starting service 'openbox'...
[supervisor  ] starting service 'webservices'...
[supervisor  ] starting service 'xcompmgr'...
[supervisor  ] starting service 'xrdb'...
[supervisor  ] starting service 'app'...
[supervisor  ] starting service 'amc'...
[supervisor  ] all services started.
[supervisor  ] service 'xrdb' exited (with status 0).
[amc         ] Changes detected in input folder.
[amc         ] Waiting 10 seconds before proceeding...
[amc         ] Invoking AMC script...
[amc         ] Run script [fn:amc] at [Sun Mar 15 14:29:15 MST 2026]
[amc         ] Parameter: artwork = n
[amc         ] Parameter: music = y
[amc         ] Parameter: clean = y
[amc         ] Parameter: excludeList = /config/amc-exlude-list.txt
[amc         ] Parameter: movieFormat = Movies/{n} ({y})/
[amc         ] {n.replaceTrailingBrackets()} ({y} 
[amc         ] {fn.match(/REMUX|IMAX/)} {source} {vf} 
[amc         ] {vc.replace(
[amc         ] 'AVC' : 'x264',
[amc         ] 'HEVC' : 'x265'
[amc         ] )} 
[amc         ] {
[amc         ] audio.findAll{ it.language == /en/}.collect{ [
[amc         ] it.Format_Commercial.replace(
[amc         ] 'DTS 96/24' : 'DTS',
[amc         ] 'Dolby Digital Plus with Dolby Atmos' : 'DDP Atmos',
[amc         ] 'Dolby Digital Plus' : 'DDP',
[amc         ] 'Dolby Digital' : 'DD',
[amc         ] 'AC3' : 'DD',
[amc         ] 'DTS-HD Master Audio' : 'DTS-HD MA',
[amc         ] 'AAC LC' : 'AAC'
[amc         ] ),
[amc         ] it.Channels.match(
[amc         ] 8: '7.1',
[amc         ] 7: '6.1', 
[amc         ] 6: '5.1',
[amc         ] 5: '5.0',
[amc         ] 3: '2.1',
[amc         ] 2: '2.0'
[amc         ] )
[amc         ] ] }.joining(' ').slash(' ')
[amc         ] }
[amc         ] { textLanguages =~ /eng/ ? ' subs' : null }
[amc         ] { menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })
[amc         ] Parameter: musicFormat = {plex}
[amc         ] Parameter: seriesFormat = {plex}
[amc         ] Parameter: animeFormat = {plex}
[amc         ] Argument[0]: /watch
[amc         ] Use excludes: /config/amc-exlude-list.txt (0)
[amc         ] Input: /watch/24- Legacy s01e01 - 12.00 Noon - 1.00 P.M..mkv
[amc         ] Group files by movie or series
[amc         ] Group: {Series=24: Legacy (2017)} => [24- Legacy s01e01 - 12.00 Noon - 1.00 P.M..mkv]
[amc         ] Rename episodes using [TheMovieDB] with [Airdate Order]
[amc         ] Lookup via [24: Legacy, 24] [24: Legacy]
[amc         ] Fetching episode data for [24: Legacy]
[amc         ] * 24: Legacy [66789] | 12 episodes | 1x01-12
[amc         ] Fetching episode data for [24]
[amc         ] * 24: Legacy [66789] | 12 episodes | 1x01-12
[amc         ] * 24 [1973] | 204 episodes | 1x01-24 .. 2x01-24 .. 3x01-24 .. 4x01-24 .. 5x01-24 .. 6x01-24 .. 7x01-24 .. 8x01-24 .. 9x01-12
[amc         ] [MOVE] from [/watch/24- Legacy s01e01 - 12.00 Noon - 1.00 P.M..mkv] to [/output/TV Shows/24 - Legacy/Season 01/24 - Legacy - S01E01 - 12 00 PM - 1 00 PM.mkv]
[amc         ] Processed 1 file
[amc         ] Clean clutter files and empty folders
[amc         ] Keep /watch (root folder)
[amc         ] Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

1.
:idea: You are using {plex} as --def seriesFormat and not the format you say you are using:

Console Output: Select all

seriesFormat = {plex}
...
[MOVE] from [/watch/24- Legacy s01e01 - 12.00 Noon - 1.00 P.M..mkv] to [/output/TV Shows/24 - Legacy/Season 01/24 - Legacy - S01E01 - 12 00 PM - 1 00 PM.mkv]

If you want to use a custom series format, then you need to configure that via the configuration fields, just like for movies. One custom format for movies. One custom format for episodes. You seem to have prepared a custom series format already, but the console output shows that you're not actually using it.




2.
As for AAC, that will print AAC, unless you want to print something else, in which can you can just add another replacement to the list:

Properties: Select all

Format_Commercial            : AAC
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Thank you again. Sorry took so long to respond, life got in the way.

Got TV Shows custom preset working after creating and linking to it in the FB template as you pointed out.

However, still can't get AAC to be recognized whether or not I use "AAC" or "AAC LC".

Format: Select all

Movies/{n} ({y})/
{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(
			'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',
			'AAC LC' : 'AAC'
		),
		it.Channels.match(
			8: '7.1',
			7: '6.1', 
			6: '5.1',
			5: '5.0',
			3: '2.1',
			2: '2.0'
		)	
	] }.joining(' ').slash(' ')
}
{ textLanguages =~ /eng/ ? ' subs' : null }
{ menu.count{ it =~ /:/ } >= 6 ? ' cp ' : null })
MediaInfo:

Properties: Select all

[General]
Count                      : 359
StreamCount                : 1
StreamKind                 : General
StreamKind/String          : General
StreamKindID               : 0
VideoCount                 : 1
AudioCount                 : 1
MenuCount                  : 1
Video_Format_List          : AVC
Video_Format_WithHint_List : AVC
Video_Codec_List           : AVC
Audio_Format_List          : AAC LC
Audio_Format_WithHint_List : AAC LC
Audio_Codec_List           : AAC LC
Audio_Channels_Total       : 2
Format                     : MPEG-4
Format/String              : MPEG-4
Format/Extensions          : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Format_Commercial          : MPEG-4
Format_Profile             : Base Media
InternetMediaType          : video/mp4
CodecID                    : isom
CodecID/String             : isom (isom/iso2/avc1/mp41)
CodecID/Url                : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible         : isom/iso2/avc1/mp41
FileSize                   : 1354089190
FileSize/String            : 1.26 GiB
FileSize/String1           : 1 GiB
FileSize/String2           : 1.3 GiB
FileSize/String3           : 1.26 GiB
FileSize/String4           : 1.261 GiB
Duration                   : 8405152
Duration/String            : 2h 20mn
Duration/String1           : 2h 20mn 5s 152ms
Duration/String2           : 2h 20mn
Duration/String3           : 02:20:05.152
Duration/String4           : 02:19:56:18
Duration/String5           : 02:20:05.152 (02:19:56:18)
OverallBitRate             : 1288818
OverallBitRate/String      : 1289 Kbps
FrameRate                  : 23.976
FrameRate/String           : 23.976 fps
FrameCount                 : 201522
StreamSize                 : 8173246
StreamSize/String          : 7.79 MiB (1%)
StreamSize/String1         : 8 MiB
StreamSize/String2         : 7.8 MiB
StreamSize/String3         : 7.79 MiB
StreamSize/String4         : 7.795 MiB
StreamSize/String5         : 7.79 MiB (1%)
StreamSize_Proportion      : 0.00604
HeaderSize                 : 8173238
DataSize                   : 1345915952
FooterSize                 : 0
IsStreamable               : Yes
Encoded_Application        : Lavf59.33.100
Encoded_Application/String : Lavf59.33.100

[Video]
Count                            : 400
StreamCount                      : 1
StreamKind                       : Video
StreamKind/String                : Video
StreamKindID                     : 0
StreamOrder                      : 0
ID                               : 1
ID/String                        : 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                          : avc1
CodecID/Info                     : Advanced Video Coding
Duration                         : 8405147
Duration/String                  : 2h 20mn
Duration/String1                 : 2h 20mn 5s 147ms
Duration/String2                 : 2h 20mn
Duration/String3                 : 02:20:05.147
Duration/String4                 : 02:19:56:18
Duration/String5                 : 02:20:05.147 (02:19:56:18)
BitRate                          : 1150000
BitRate/String                   : 1150 Kbps
BitRate_Maximum                  : 31250000
BitRate_Maximum/String           : 31.2 Mbps
Width                            : 1280
Width/String                     : 1280 pixel
Height                           : 536
Height/String                    : 536 pixel
Stored_Height                    : 544
Sampled_Width                    : 1280
Sampled_Height                   : 536
PixelAspectRatio                 : 1.000
DisplayAspectRatio               : 2.388
DisplayAspectRatio/String        : 2.39:1
Rotation                         : 0.000
FrameRate_Mode                   : CFR
FrameRate_Mode/String            : CFR
FrameRate_Mode_Original          : VFR
FrameRate                        : 23.976
FrameRate/String                 : 23.976 (24000/1001) fps
FrameRate_Num                    : 24000
FrameRate_Den                    : 1001
FrameCount                       : 201522
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.070
StreamSize                       : 1208401936
StreamSize/String                : 1.13 GiB (89%)
StreamSize/String1               : 1 GiB
StreamSize/String2               : 1.1 GiB
StreamSize/String3               : 1.13 GiB
StreamSize/String4               : 1.125 GiB
StreamSize/String5               : 1.13 GiB (89%)
StreamSize_Proportion            : 0.89241
Encoded_Library                  : x264 - core 164 r52 e067ab0
Encoded_Library/String           : x264 core 164 r52 e067ab0
Encoded_Library_Name             : x264
Encoded_Library_Version          : core 164 r52 e067ab0
Encoded_Library_Settings         : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=17 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=1150 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=31250 / vbv_bufsize=31250 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Menus                            : 0
CodecConfigurationBox            : avcC

[Audio]
Count                        : 286
StreamCount                  : 1
StreamKind                   : Audio
StreamKind/String            : Audio
StreamKindID                 : 0
StreamOrder                  : 1
ID                           : 2
ID/String                    : 2
Format                       : AAC
Format/String                : AAC LC
Format/Info                  : Advanced Audio Codec Low Complexity
Format_Commercial            : AAC
Format_Settings_SBR          : No (Explicit)
Format_Settings_SBR/String   : No (Explicit)
Format_AdditionalFeatures    : LC
CodecID                      : mp4a-40-2
Duration                     : 8405152
Duration/String              : 2h 20mn
Duration/String1             : 2h 20mn 5s 152ms
Duration/String2             : 2h 20mn
Duration/String3             : 02:20:05.152
Duration/String5             : 02:20:05.152
Source_Duration              : 8405173
Source_Duration/String       : 2h 20mn
Source_Duration/String1      : 2h 20mn 5s 173ms
Source_Duration/String2      : 2h 20mn
Source_Duration/String3      : 02:20:05.173
Source_Duration/String5      : 02:20:05.173
BitRate_Mode                 : CBR
BitRate_Mode/String          : CBR
BitRate                      : 132300
BitRate/String               : 132 Kbps
Channel(s)                   : 2
Channel(s)/String            : 2 channel
ChannelPositions             : Front: L R
ChannelPositions/String2     : 2/0/0
ChannelLayout                : L R
SamplesPerFrame              : 1024
SamplingRate                 : 48000
SamplingRate/String          : 48.0 KHz
SamplingCount                : 403447296
FrameRate                    : 46.875
FrameRate/String             : 46.875 fps (1024 SPF)
FrameCount                   : 393992
Source_FrameCount            : 393993
Compression_Mode             : Lossy
Compression_Mode/String      : Lossy
StreamSize                   : 137513665
StreamSize/String            : 131 MiB (10%)
StreamSize/String1           : 131 MiB
StreamSize/String2           : 131 MiB
StreamSize/String3           : 131 MiB
StreamSize/String4           : 131.1 MiB
StreamSize/String5           : 131 MiB (10%)
StreamSize_Proportion        : 0.10155
Source_StreamSize            : 137514008
Source_StreamSize/String     : 131 MiB (10%)
Source_StreamSize/String1    : 131 MiB
Source_StreamSize/String2    : 131 MiB
Source_StreamSize/String3    : 131 MiB
Source_StreamSize/String4    : 131.1 MiB
Source_StreamSize/String5    : 131 MiB (10%)
Source_StreamSize_Proportion : 0.10155
Default                      : Yes
Default/String               : Yes
AlternateGroup               : 1
AlternateGroup/String        : 1
Menus                        : 0

[Menu]
Count              : 101
StreamCount        : 1
StreamKind         : Menu
StreamKind/String  : Menu
StreamKindID       : 0
Chapters_Pos_Begin : 101
Chapters_Pos_End   : 101
User avatar
rednoah
The Source
Posts: 24490
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by rednoah »

:idea: Your format explicitly only collects codec / channels information from audio streams marked as English language:

Groovy: Select all

audio.findAll{ it.language == /en/ }

:idea: The file you are testing with has only one audio stream with no language so that stream is correctly ignored according to your code. You can modify your format code to work with either English language or no language audio streams like so:

Groovy: Select all

audio.findAll{ it.language == /en/ || it.language == null }

:idea: If you want to work with no language audio streams, but only if that no language audio stream is the one and only audio stream, then the code for that could look like this:

Groovy: Select all

audio.findAll{ it.language == /en/ || (it.language == null && audio.size() == 1) }
:idea: Please read the FAQ and How to Request Help.
CaptainKen
Posts: 18
Joined: 19 Dec 2024, 22:10
Location: Gilbert, AZ
Contact:

Re: automatically rename and movie folder and movie file on Unraid

Post by CaptainKen »

Wonderful!! Thank you for all your help and patience. Have a great weekend.
Post Reply