Page 1 of 1

complete documentation for makemkvcon?

Posted: Sat Jun 04, 2011 2:19 pm
by kirby
<apology>
I feel like this post is the classic new guy coming in and crapping on everything. I'm sorry if it feels that way. I'm very happy now that I've found makemkv, but I'm a bit confused.
</apology>

I'm a new makemkv user and so far I love it. I used to run SlySoft in a Windows VM, this is so much better. When I found out about the command line option, I was sold. It is my impression that makemkvcon should be able to do everything the GUI can do. Is that true? If so, http://www.makemkv.com/developers/usage.txt isn't complete. It doesn't actually list the complete set of parameters, to figure out usage, you need to look at this page plus the help text output when running the app with no params. The help text lists the commands but not the options, the online usage.txt file lists the options but not the commands. It seems that usage.txt and the in-program help text should both be complete, just copies of each other. Also, the options themselves need more explanation. What's the complete syntax possible for selecting single title(s)? I can do one or all, how about 3? Finally, what about selecting individual tracks? I can't find a way to do this.

Re: complete documentation for makemkvcon?

Posted: Thu Jun 09, 2011 12:43 am
by kirby
Ok, maybe I'll narrow it down.

I would really really like two features added to makemkvcon

1) With the 'info' command, I want to see running time for each chosen title. Bonus points for telling me how many GB of space the title takes. I'll use this to figure out which title is most likely the main movie.

2) I'd like to be able to specify (or exclude) which tracks I want in the mkv. I typically only want to keep a single video track with a single audio track and single subtitle track.

Re: complete documentation for makemkvcon?

Posted: Thu Jun 09, 2011 2:00 am
by crowfax
I do not believe any of the features you are looking for are available yet. I recall reading that they are being worked on however.

Re: complete documentation for makemkvcon?

Posted: Fri Jun 10, 2011 2:27 pm
by mike admin
kirby wrote:1) With the 'info' command, I want to see running time for each chosen title. Bonus points for telling me how many GB of space the title takes. I'll use this to figure out which title is most likely the main movie.
It's displayed today when you use "robot" mode
kirby wrote: 2) I'd like to be able to specify (or exclude) which tracks I want in the mkv. I typically only want to keep a single video track with a single audio track and single subtitle track.
This is being worked on.

Re: complete documentation for makemkvcon?

Posted: Mon Jun 27, 2016 1:56 am
by smprather
Hi--

I am very interested in #2. I assume since this thread is from 2011 that this has been finished?

Thanks!
--Myles

Re: complete documentation for makemkvcon?

Posted: Wed Feb 02, 2022 8:33 pm
by MickM
Came here also looking for the very basic capability of #2 and couldn't find it anywhere, which I find amazing in 2022! I wanted to do a bunch of stuff in a script and need to use the command line version i.e. makemkvcon.

Can somebody please confirm if makemkvcon is officially abandoned. Is there a different command line tool I should be using instead?

Note that I'm basing my questions on the capability described when you enter an invalid command i.e.

makemkvcon -help
makemkvcon: invalid option -- h
Use: makemkvcon [switches] Command [Parameters]

Commands:
info <source>
prints info about disc
mkv <source> <title id> <destination folder>
saves a single title to mkv file
backup <source> <destination folder>
backs up disc to a hard drive
f <args>
run universal firmware tool
reg <key string or file name>
enter registration key into program

Source specification:
iso:<FileName> - open iso image <FileName>
file:<FolderName> - open files in folder <FolderName>
disc:<DiscId> - open disc with id <DiscId> (see list Command)
dev:<DeviceName> - open disc with OS device name <DeviceName>

Switches:
-r --robot - turn on "robot" mode, see http://www.makemkv.com/developers

Re: complete documentation for makemkvcon?

Posted: Fri Mar 11, 2022 9:08 pm
by PriamX
I use makemkvcon extensively (on Linux). I use it standalone, and as part of ARM.

Is there a CLI option in makemkvcon to print the executable version?

If not, I'd like to lightly make that request.

tnx!

Re: complete documentation for makemkvcon?

Posted: Sat Mar 12, 2022 5:38 am
by beandog
I wrote a man page for makemkvcon if that helps - https://bluray.beandog.org/makemkv/man/makemkvcon.html

If you guys want more examples, let me know and I could add them in there.

Re: complete documentation for makemkvcon?

Posted: Tue May 31, 2022 7:14 pm
by RazorBag69
beandog wrote:
Sat Mar 12, 2022 5:38 am
I wrote a man page for makemkvcon if that helps - https://bluray.beandog.org/makemkv/man/makemkvcon.html

If you guys want more examples, let me know and I could add them in there.
Hello @beandog and all!

I hope this is the right place, apologies if not and feel free to signpost me to the best place.

I'd love some help understanding the syntax of the command line, i'm trying to use it (MakeMKV) in a script and it has worked really well, the difficulty I have is that I've only ever had one optical drive and now have two. My standard use of makemkv is the following command.
makemkvcon backup --decrypt --messages=messages.log" --progress="messages_progress.log" -r drive:0 /home/me/Videos/Rips/MY_OPTICAL_BLUERAY_DISC
Up until now what I would do is take the linux dev source of say
/dev/sr0
strip out the characters to leave the 0 and combine with
disc:
to give makemkv its source drive. I've noticed now that with two drives makemkv drive number doesn't always match with the /dev drive number.

For example:
makemkv -r info
gives:
MSG:1005,0,1,"MakeMKV v1.16.7 linux(x64-release) started","%1 started","MakeMKV v1.16.7 linux(x64-release)"
DRV:0,0,999,0,"DVD+R-DL HL-DT-ST DVD+-RW GT32N A102 KY5A7904700","","/dev/sr1"
DRV:1,2,999,12,"BD-ROM MATSHITA BD-CMB UJ160 1.00 WN63 138789","MY_OPTICAL_BLUERAY_DISC","/dev/sr0"
So makemkv drive 0 is /dev/sr1 and drive 1 is /dev/sr0.

Looking at the command line help...
Source specification:
iso:<FileName> - open iso image <FileName>
file:<FolderName> - open files in folder <FolderName>
disc:<DiscId> - open disc with id <DiscId> (see list Command)
dev:<DeviceName> - open disc with OS device name <DeviceName>
...it looks like I can use the dev option to specify the drive using
/dev/sr0
looking at the command structure of:
makemkvcon [switches] Command [Parameters]
I tried:
makemkvcon -r backup --messages=messages.log" --progress="messages_progress.log" --decrypt <source> <destination folder>
but no matter how I seem to construct the command I just can't seem to get dev: to work with backup. I get the error message:
Backup source must start with "disc:"
What I'm trying to achieve is to decrypt and backup the disc to a directory, divert messages to one file and progress updates to another file using the dev drive as the source

Can anyone help me?

Re: complete documentation for makemkvcon?

Posted: Tue May 31, 2022 10:02 pm
by beandog
Backup source must start with "disc:"
I just tried dev: as well, and it doesn't work, looks like maybe support got dropped for it. I'd open another topic and ask about it.

Why are your drive numbers changing, though, that is odd. Are they both internal or what?

Re: complete documentation for makemkvcon?

Posted: Wed Jun 01, 2022 5:50 pm
by RazorBag69
Hello

Thanks for the rapid reply, glad someone else has tried using dev:

Drives aren't changing per se. One is internal (mini sata) and one is external USB. Once plugged in and system booted the drives don't change number but /dev/sr1 gets mapped by makemkv to disc:0 and /dev/sr0 gets mapped to disc:1.

My issue I guess is I assumed sr0 would equal disc:0, assumption on my part I know. For now i've built in a check to export messages to a file and grep the line that the drive I want is in, works ok just means using
makemkvcon info
command and doing some jiggery pokery with stdout/stderr to silence the error about syntax.

I'll take your advice and repost as new thread... Ta!

Re: complete documentation for makemkvcon?

Posted: Wed Jun 01, 2022 8:25 pm
by beandog
There's a simpler way than grepping makemkv output to see which disc to pick. You could just have a shell script that checks to see if the second sr device exists or not.

Here's some basic pseudo code thrown together

Code: Select all

#!/bin/bash

disc=0
if [[ -e /dev/sr1 && $1 == "/dev/sr1" ]]; then disc=0; fi
if [[ -e /dev/sr1 && $1 == "/dev/sr0" ]]; then disc=1; fi

makemkvcon --noscan --minlength=0 -r backup --decrypt disc:${disc} .
then just run "foo /dev/sr0" or "foo /dev/sr1" and it'll select the right disc. Something like that code should work.

Re: complete documentation for makemkvcon?

Posted: Thu Jun 02, 2022 5:13 pm
by RazorBag69
Cheers for this, love the thinking to try to make process simpler, I'll have a look at it as what I'm trying to do is following:

Disc inserted -> UDEV rule triggers -> UDEV calls Systemd service -> Systemd service runs the script.

Ultimately I want the script to inherit the drive dev location from UDEV and be used in the script. The script should be drive agnostic as it won't know the dev location until called, but that's for another day.

So far UDEV works differentiating between CD, DVD, BD and calls the appropriate .service. just need to figure out matching /dev/discname to makemkvcon disc:#

Ta for input and advice, much appreciated

Re: complete documentation for makemkvcon?

Posted: Thu Jun 02, 2022 8:12 pm
by beandog
You can have udev set a specific device name for each drive. That's what I do on mine so they are always the same.

Here's how I do mine: https://dvds.beandog.org/doku.php?id=udev

In this one, I have udev run a script as well once the device has a disc in it. That's how I automate ripping mine. Put in the disc, close the tray, and everything runs automatically. https://dvds.beandog.org/doku.php?id=udevadm

Re: complete documentation for makemkvcon?

Posted: Fri Jun 03, 2022 1:41 pm
by RazorBag69
Cheers for this, thanks again for the response.

I do love that, with Linux, people can come at a problem and create very different solutions. Your page has got me thinking about my own implementation and how I collect drive information...i'm off to play with some ideas.

...now if only i could solve the dev: command syntax in makemkvcon I'd be winning. I have been able to use it with the other commands that makemkvcon allows:

eg.
makemkvcon -r info dev:/dev/sr0
works, so it must be a specific requirement of backup that you use disc:# syntax.

Perhaps if that gets confirmation we could update the help output. Was it you that wrote?http://www.makemkv.com/developers/usage.txt