Matching file rename based on MediaInfo data

All about user-defined episode / movie / file name format expressions
Post Reply
SljivovitzDino
Posts: 2
Joined: Today, 06:06

Matching file rename based on MediaInfo data

Post by SljivovitzDino »

Hi all

I'm a new to Filebot, and have been looking at movie renaming for my collection.

I was wanting some feedback and advice on my file renaming expression I have set. I have taken the majority of this from the Radarr example and other posts in the forum.
My use case is mainly ripping my own physical media and making it available to Jellyfin, therefore, I am interested in pulling information from the meta-data mediainfo gathers, rather than stripping information from the filename itself.

I do want to have these rips renamed as close as possible to the Profilarr/Radarr filename standard, as I do want Radarr to keep tabs on the collection I have.

My Radarr has the following for filenames:
{Movie CleanTitle} {(Release Year)} [imdbid-{ImdbId}] [tmdbid-{TmdbId}] {[Edition Tags]} {[Custom Formats]}{[Quality Full]}{[MediaInfo 3D]}{[MediaInfo VideoDynamicRangeType]}[{MediaInfo VideoBitDepth}bit]{[Mediainfo AudioCodec}{ Mediainfo AudioChannels]}{[Mediainfo VideoCodec]}{-Release Group}

Movie: The Movie Title (2010) [imdbid-tt0066921] [tmdbid-345691] [Ultimate Extended Edition] [Surround Sound x264][Bluray-1080p Proper][3D][10bit][DTS 5.1][AVC]-EVOLVE


The filebot expression to rename movies:
{drive}/Video/{ny}/{ny} [imdbid-{imdbid}] [tmdbid-{tmdbid}] {"$edition"} {" [${video[0].Original_source_medium}-$hpi]"} {" [$s3d]"} { video.HDR_Format =~ /Dolby Vision/ ? video.HDR_Format_Compatibility =~ /HDR10/ ? 'DV+HDR10' : 'DV' : [hdr] } {" [${bitdepth}bit]"} {" [$ac $channels]" } {" [$vcf]"}.{ext}

I have added the IMDB ID in addition to TMDB ID.

[${video[0].Original_source_medium}-$hpi] - get the meta-data from mediainfo
$vcf also from mediainfo.

So my questions:
  • 1. I would like to know how I can use $edition to add theatrical cut, directors cut, etc. to the filename. Is it a drop down, or how does it get set?
  • 2. How do I get ${video[0].Original_source_medium} - to remove the '-' so Blu-ray becomes Bluray, and DVD-Video becomes DVD?

Original source medium: DVD-Video
So for example you'll get DVD-Video-576i, instead I would prefer DVD-576i

-and-

Original source medium: Blu-ray
So instead of Blu-ray-1080p, you get Bluray-1080p
  • 3. Is there an equivalent of {[Custom Format]} - if not I don't really think it matters. I guess it could be considered a 'remux.'


I dropped release group as there is none.

Thank you.
User avatar
rednoah
The Source
Posts: 24329
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Matching file rename based on MediaInfo data

Post by rednoah »

:idea: The {edition} is based on the filename, so it'll work / not work depending on whether or not there's keywords such as Directors Cut in the current filename. Please read [DOCS] The movie {tags} and movie {edition} bindings for details.



:idea: I've never seen Original_source_medium in the MediaInfo table. I guess this is something that you / your ripping tool set manually? {source} is solely based on the filename because that's just what we have in most cases.

e.g. [SNIPPET] Replace Characters, Words or Patterns

Format: Select all

{ video[0].Original_source_medium.replace('Blu-ray':'Bluray', 'DVD-Video':'DVD') }


:idea: I don't know what Radarr / Sonarr {[Custom Format]} does exactly. That said, you can always [SNIPPET] Match information from the file path in any way, form or shape you see fit:

Format: Select all

{ '.' + f.path.match(/PROPER|REPACK|REMUX/) }
:idea: Please read the FAQ and How to Request Help.
SljivovitzDino
Posts: 2
Joined: Today, 06:06

Re: Matching file rename based on MediaInfo data

Post by SljivovitzDino »

Thanks, I'll give that a go.

Re this:
I've never seen Original_source_medium in the MediaInfo table.
Not set manually, Filebot just picks it up.
If you run the MediaInfo tool you'll see under the video section the Original Source Medium:
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main [email protected]@High
HDR format : Dolby Vision, Version 1.0, Profile 7.6, dvhe.07.06, BL+EL+RPU, no metadata compression, Blu-ray compatible / SMPTE ST 2086, Version HDR10, HDR10 compatible
.
.
Original source medium : Blu-ray
Having "video[0].Original_source_medium" will result in "Blu-ray" (and likewise DVD-Video if it's a DVD.)
User avatar
rednoah
The Source
Posts: 24329
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Matching file rename based on MediaInfo data

Post by rednoah »

SljivovitzDino wrote: Today, 13:02
Original source medium : Blu-ray
Having "video[0].Original_source_medium" will result in "Blu-ray" (and likewise DVD-Video if it's a DVD.)
That's pretty cool. If this tag becomes more common we'll see about updating {vs} and {source} to check for this as well.
:idea: Please read the FAQ and How to Request Help.
Post Reply