Advice/Assistance on Automating MakeMkv

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Post Reply
Message
Author
smogsy
Posts: 1
Joined: Sat Jul 20, 2019 6:54 am

Advice/Assistance on Automating MakeMkv

#1 Post by smogsy » Sat Jul 20, 2019 7:02 am

hey all,

trying to get my collection of media digitized, have around 1000 DVD's and few hundred blurays

my plan is to automate the process in python, but started in batch for the quick win.

My quick Win is below

My questions are:

1. how can i pull the DVD title into my command line variable?, i saw templates but not sure how to use them in this context.

2. is their a way to detect the largest file and rip that only? (i just want the films) / largest x files for Series
i know it wont work perfectly but found 99% of my films the largest file is the film.

my plan
once automated this i want to pull the full name from imdb. which i have a plan for.

this way the process is stream lined and if i want to add extra discs i could :)

many thanks!

Code: Select all

SET inputname=100
:top
#SET /P inputname= Please enter the DVD title


ECHO

if not exist "F:\Video\%inputname%" mkdir "F:\Video\%inputname%"

"C:\Program Files (x86)\MakeMKV\makemkvcon64.exe" mkv disc:0 all "F:/Video/%inputname%"



ECHO
ECHO

ECHO #########################################################
ECHO #########################################################
ECHO #########################################################
ECHO #########################################################

set /A inputname=%inputname%+1

set /P c=is the next disk ready[Y/N]?

ECHO #########################################################
ECHO #########################################################
ECHO #########################################################
if /I "%c%" EQU "Y" goto :top
if /I "%c%" EQU "y" goto :top

mgutt
Posts: 141
Joined: Sun May 05, 2019 6:38 pm

Re: Advice/Assistance on Automating MakeMkv

#2 Post by mgutt » Sat Jul 27, 2019 10:12 pm

Do not use the largest file. By that you will get randomly non-english movies f.e. for Disney Movies as they add the synchronisation credits at the end of the movie. Another problems are different movie logos / titles at the beginning. It would be totally random getting the wanted movie version. I think 20% of all movies have multiple movie tracks where you need to decide manually.

Instead you should select all tracks that are larger than f.e. 1 GB for DVDs and 10 GB for BRs and if you find more than one track or find nothing you skip these discs totally until you find a better method for them or finding the time to check them manually. By that you are should be able to create mkvs for 80% off all movies. A huge first step for your digital collection.

Regarding the naming you could try to use the disc name, but i think 50% of all discs will fail. And some disc names are totally wrong returning wrong movie names. I do not think you will solve that without manual work.

This is my plan for the future:
1.) Buying as much BR drives as possible
2.) Manually creating decrypted backups with MakeMKV (1:1 copy of the BR incl all mlps files) and name their folders manually like "The Godfather (1972) imdb_tt0068646" (By that you have the correct title, year and the imdb id for later API access)
3.) I use a NAS supporting Docker and create automatically through the MakeMKV container MKVs for all movies containing only one huge track.
4.) I use a ffmpeg and mkvtoolnix container to convert the main german audio track from DTS to DD (as my TV and audio setup does not support DTS) and remux it again
5.) I use a mkvtoolnix container to extract all german subtitles, send them to the Google translate API and create SRT files out of them. Finally I automatically name them if they are small (=Forced), if they contain many brackets (=SDH) or if they contain phrases like "I'm the director/actor" (=Comment)

Everytime a movie contains multiple huge video tracks or the script did not find one it will be moved to an other folder that will be checked manually. By that I will load the folder into MakeMKV (Windows), check the names of the different used segment files, view the corresponding mpls files to determine the correct track and create text file to the folder like "choose.track2" and move it back to the automatic folder.

Regarding tv series it would be similar. The first steps are the same: Creating decrypted backups and name the folders manually like "Game of Thrones s01e01-05 imdb_tt0944947". By that the automatic process knows how much tracks the disc should contain and if it does not fit it would move this disc backup to the manual folder as well so I can create the text file.

I suggest you to buy 5 or more optical drives. By that you are able to create 5+ decrypted backups every 20 minutes (BR). If you use a batch you wouldn't need to manually eject the discs after creation or manually start the process.

mgutt
Posts: 141
Joined: Sun May 05, 2019 6:38 pm

Re: Advice/Assistance on Automating MakeMkv

#3 Post by mgutt » Sun Jul 28, 2019 10:52 am

Regarding your question to obtain the size. You need to use "-r" in combination with "info". By that it will return a huge amount of disc data. For example it will return this info for the video track:
SINFO:0,10,31,6121,"<b>Track information</b><br>"
SINFO:0,10,33,0,"90"
SINFO:0,10,38,0,""
SINFO:0,10,42,5088,"( Lossless conversion )"
TINFO:1,8,0,"24"
TINFO:1,9,0,"1:41:55"
TINFO:1,10,0,"17.3 GB"
TINFO:1,11,0,"18659420160"
TINFO:1,16,0,"00003.mpls"
TINFO:1,25,0,"1"
TINFO:1,26,0,"3"
TINFO:1,27,0,"title_t01.mkv"
TINFO:1,28,0,"eng"
TINFO:1,29,0,"English"
TINFO:1,30,0,"24 chapter(s) , 17.3 GB"
TINFO:1,31,6120,"<b>Title information</b><br>"
TINFO:1,33,0,"0"
SINFO:1,0,1,6201,"Video"
SINFO:1,0,5,0,"V_VC1"
SINFO:1,0,6,0,"VC-1"
SINFO:1,0,7,0,"VC-1"
SINFO:1,0,19,0,"1920x1080"
SINFO:1,0,20,0,"16:9"
SINFO:1,0,21,0,"23.976 (24000/1001)"
SINFO:1,0,22,0,"0"
SINFO:1,0,28,0,"eng"
SINFO:1,0,29,0,"English"
SINFO:1,0,30,0,"VC-1"
Beware: If you compare with the GUI the command line returns the titles in a different order.

Post Reply