Default output file name template

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
RealFezzik
Posts: 1
Joined: Wed Apr 13, 2022 1:50 pm

Re: Default output file name template

Post by RealFezzik »

I've searched this forum but I don't think this is currently possible, so maybe this is a feature request? Would it be possible to allow the output template variables to include the title's duration?

This would very useful for making it easier to identify extras post-copy. Without this, if you have the extras duration, you currently have to do this pre-copy (when the duration is visible in the GUI).
Ezatoka
Posts: 409
Joined: Fri Dec 06, 2019 6:55 pm

Re: Default output file name template

Post by Ezatoka »

If you select the Details view in Windows Explorer you can add the column Length to the details and Windows should load the length from the file itself.
wrldtvlr
Posts: 23
Joined: Mon Jan 13, 2020 10:52 pm

Re: Default output file name template

Post by wrldtvlr »

Woodstock wrote:
Tue Jan 22, 2019 2:29 am
Do you have Expert mode turned on? Preferences->General, make sure Expert mode is checked.

Then the Advanced tab will be available, and the template is the third text entry box.
I realize this is an older post, but somewhere in one of the more recent releases, my rip title format has changed. There doesn't seem to be an Expert checkbox on the Advance tab, so I see no way to change the template.
dcoke22
Posts: 3082
Joined: Wed Jul 22, 2020 11:25 pm

Re: Default output file name template

Post by dcoke22 »

wrldtvlr wrote:
Tue Aug 16, 2022 1:41 pm
I realize this is an older post, but somewhere in one of the more recent releases, my rip title format has changed. There doesn't seem to be an Expert checkbox on the Advance tab, so I see no way to change the template.
The Export Mode checkbox is on the General tab in Preferences.
wrldtvlr
Posts: 23
Joined: Mon Jan 13, 2020 10:52 pm

Re: Default output file name template

Post by wrldtvlr »

dcoke22 wrote:
Wed Aug 17, 2022 4:20 am
The Expert Mode checkbox is on the General tab in Preferences.
Yes, it is. I was just blind and missed it. Thank you.
multimax
Posts: 2
Joined: Tue Aug 23, 2022 10:07 pm

Re: Default output file name template

Post by multimax »

I'm trying to convert .iso movie titles with no metadata it would seem. Doing multiple converts to mkv would over-write the same output file generic name. I wish there was a parameter that could just put a timestamp in the output, or anything that would create something unique each time - or simply not over-write the previous .mkv creation.
dcoke22
Posts: 3082
Joined: Wed Jul 22, 2020 11:25 pm

Re: Default output file name template

Post by dcoke22 »

multimax wrote:
Thu Aug 25, 2022 6:52 pm
I'm trying to convert .iso movie titles with no metadata it would seem. Doing multiple converts to mkv would over-write the same output file generic name. I wish there was a parameter that could just put a timestamp in the output, or anything that would create something unique each time - or simply not over-write the previous .mkv creation.
Aren't there date & time name template variables? See the first post in this thread.
HshshDurujf
Posts: 1
Joined: Sat Apr 08, 2023 9:06 pm

Re: Default output file name template

Post by HshshDurujf »

Just to put it out there, i was struggling for a while with some of the Blu-rays I have giving me very unspecific file names with the default naming scheme, for example
"Arrow Season 3 Disc 4_t05.mkv"
There was no real pattern to the file names, and the files themselves had no metadata attached that could help me determine what episode it actually was.
I tried playing around with the expert mode settings for file naming, tried out all the {NAME} and {CMNT} variables with no success.
The only thing I found success with was the {SN} variable.
I added it as a prefix to my file names, and now the results I get is for example
00069_Arrow Season 3 Disc 4_t05.mkv
00070_Arrow Season 3 Disc 4_t04.mkv
00071_Arrow Season 3 Disc 4_t03.mkv
00072_Arrow Season 3 Disc 4_t02.mkv
00073_Arrow Season 3 Disc 4_t01.mkv
Still not amazing but at least I can sort them and know which episode is which.
Giraffaraptor
Posts: 5
Joined: Tue Apr 09, 2019 7:31 pm

Re: Default output file name template

Post by Giraffaraptor »

I am having two issues that I cannot resolve:

- The printing of special/template control characters, specifically the {braces}.
Plex has added reference notation to there filename structure: "Movie (1999) {imdb-tt1234567}.ext"
Is there a way to escape these characters?

- Nesting variable expansions:
The filename template syntax is very similar to brace expansion in many of the shell environments. I would like to use one of the field variables to trigger another. Something like: "${batchlist:-${batch_file:+No Batch Entries: }${batch_file:-No Batch File}}"

'...{_m:+T}{{SN3}:+T}' Should get "..._m023" if T and SN are set. However if T is set and SN is not, we would expect to see the prefix alone.
If implemented, '...{{_m:SN3}:+T}' would get the same result and is dependent on T and then SN.

thanks
WEZZEBE
Posts: 16
Joined: Wed Jun 07, 2023 8:49 pm

Re: Default output file name template

Post by WEZZEBE »

Is there a way to get the DV info in the title?

Video info:
Track information
Type: Video
Codec: MpegH HEVC Main10@L5.1 (dvhe.07.06 BL+FEL+RPU)

I would like to add the part behind Main10@L5.1 (To see if it has DV and what type) in the title if it is there. Is this possible? Or something like it-> DV profile if it's there
BD-BD-BD
Posts: 8
Joined: Sun Aug 26, 2018 7:14 am

Re: Default output file name template

Post by BD-BD-BD »

It has been asked twice: does makemkvcon have support for the output template and can it create folders (doesn't appear so, I used a non-existing sub-directory)?
Mr. Red
Posts: 20
Joined: Wed Nov 01, 2023 10:19 am

Re: Default output file name template

Post by Mr. Red »

I second the request for a SEGMAP variable or something similar to add the segment number to the file name.

When creating mkvs with linked chapters (for "seamless branching") it is necessary to know in which order they have to be linked.
At the moment I need to manually translate the segment maps to file names. If the segment number would be part of the file name I could skip this step and save a lot of time.

Edit: After experimenting with the variables I recognized that most times the {SN} variable matches the segment number (for my test disc).
But sadly it's not guaranteed. I found titles that were skipped because they were equal to another title and in these cases the {SN} variable differed from the shown segment number. So a specific variable for SEGMAP is preferred for a consistent and correct output.
MediaMogul
Posts: 1
Joined: Sun Dec 10, 2023 6:16 pm

Re: Default output file name template

Post by MediaMogul »

In the new age of AI generated code, ChatGPT and I cobbled together this powershell script that should work for windows users.

I'm still in the process of ripping, so have yet to actually test it, but it should prompt for the directory of the files to be renamed and a "S0#" value, sort the files by creation date and then rename them based on a manually created EpisodeTitles.txt, incrementing the "E0#" value with a counter file and
stopping once each file has been named EpisodeTitle has been used.

The aim being to rip entire seasons to one directory, say Season 01, create a EpisodeTitle.txt, run the script specify the location of the EpisodeTitles.txt, the "S##" value and (assuming you ripped your episodes in order) rename the files like "EpisodeTitle S##E##" using a counter to assign the value for "E##".

Jellyfin user here so trying to adhere to the recommended naming conventions outlined for that media server.

Code: Select all

# Prompt the user for a relative file path
$directoryPath = Read-Host "Enter the relative file path where the files are located (e.g., .\YourDirectory):"

# Set the working directory to the provided path
Set-Location -Path $directoryPath

# Specify the relative path to the file containing the episode titles
$episodeTitlesFilePath = ".\EpisodeTitles.txt"

# Specify the relative path to the file containing the episode counter
$counterFilePath = ".\CounterFile.txt"

# Read the array of episode titles from the file
$episodeTitles = Get-Content $episodeTitlesFilePath

# Read the current episode counter from the file or set it to 1 if the file doesn't exist
if (Test-Path $counterFilePath) {
    $episodeCounter = Get-Content $counterFilePath
} else {
    $episodeCounter = 1
}

# Prompt the user for input of the season number
$seasonNumber = Read-Host "Enter the season number (e.g., S01):"

# Get the list of files in the current directory, sorted by creation date
$files = Get-ChildItem | Sort-Object CreationTime

# Check if the episode counter exceeds the number of episode titles
if ($episodeCounter -le $episodeTitles.Count) {
    # Loop through each file and rename it based on episode title, season and episode numbering, and replace spaces with underscores
    foreach ($file in $files) {
        # Get the episode title from the array using the current episode counter and replace underscores with spaces
        $episodeTitle = $episodeTitles[$episodeCounter - 1] -replace '_',' '

        # Generate the new name with episode title, season and episode numbering, and replace spaces with underscores
        $newName = "${episodeTitle}_${seasonNumber}E$($episodeCounter.ToString('00'))" + $file.Extension

        # Rename the file
        Rename-Item -Path $file.FullName -NewName $newName

        # Increment the episode counter
        $episodeCounter++
    }

    # Save the updated episode counter back to the file
    $episodeCounter | Set-Content -Path $counterFilePath
}

Hope it helps someone, I'll update with my success rate once ripping is complete.
meket
Posts: 9
Joined: Sat Oct 07, 2023 7:09 pm

Re: Default output file name template

Post by meket »

Why does the {_t:N2} depend on the minimum title length (seconds) setting?

If I change that setting and allow shorter tracks, the indexing is different, and thus produces other file names, meaning if I am not careful this will produce duplicate files.

It seems the counter is only incrementing for titles that are not skipped, why?
I think it makes more sense to just skip the skipped titles and have indices which are missing, opposed to generating other file names and maybe creating duplicate files with another name.

My Template is this: {NAME1}{_:CMNT0}{_:DT}{_orig-:SN}{title:+DFLT}{_t:N2}
So I do get unique file names, but not independent of the minimum track length setting, which is annoying and if I hadn't noticed now, I would have copied the two 30GB files again wasting time, instead of copying additional smaller files, which I actually wanted to do after shortening the minimum title length to get all bonuses.
BlackMesa
Posts: 5
Joined: Wed Dec 27, 2023 2:14 am
Location: UK

Re: Default output file name template

Post by BlackMesa »

Hi, when extracting files from multiple discs, the output filenames are often identical (accross discs) and I'm prompted if I wish overwrite the existing file; which I do not.

Is there a field I can add to the output filename string to always get a unique name? I tried adding {DT} assuming this would give me the current date/time/seconds appended to the filename, which doesn't work. Any advice would be appreciated. Thank you.
Post Reply