Page 1 of 1

makemkvcon: Syntax for Spaces in File/Path Names

Posted: Sun Dec 26, 2021 5:47 am
by taylor85345
Sorry if this has been asked before, but I couldn't find any decent documentation or related forum posts.

I recently started using makemkvcon for all of my Blu-Ray ripping, since my Blu-Ray drive is now installed in a headless server, and I keep running into issues with file paths that have spaces in the folder or file name. Is there a special syntax for spaces in makemkvcon, or is the answer really to just use file and folder names without spaces in them?

Re: makemkvcon: Syntax for Spaces in File/Path Names

Posted: Sun Dec 26, 2021 3:32 pm
by Woodstock
Should just be able to enclose the paths in quotes, as in:

Code: Select all

"This is a path with spaces in it"
The alternative is to escape the spaces, another "popular" way for shells to parse things:

Code: Select all

This\ is\ a\ path\ with\ spaces\ in\ it
It's the shell that is breaking up the arguments.

Re: makemkvcon: Syntax for Spaces in File/Path Names

Posted: Sun Dec 26, 2021 10:01 pm
by taylor85345
[edit] posted twice because I didn't know each reply needed mod approval. Please see comment below.

Re: makemkvcon: Syntax for Spaces in File/Path Names

Posted: Sun Dec 26, 2021 10:04 pm
by taylor85345
I am familiar with shell syntax, and that doesn't seem to be the problem. Below is the output from makemkvcon ripping to a directory with a space in the folder name.

Code: Select all

❯ makemkvcon mkv disc:0 0 "/media/storage-2/Movies/The Hobbit"
MakeMKV v1.16.5 linux(x64-release) started
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
Running the same command but using

Code: Select all

"/media/storage-2/Movies"
rips successfully as expected, but ripping to

Code: Select all

"/media/storage-2/Movies/The Hobbit"
just returns the help text. I am using fish shell with syntax highlighting, so I can see that the formatting is correct (I have tested in bash as well as a sanity check).

For the record, I am using the current snap package of MakeMKV in Ubuntu Server 20.04.

Re: makemkvcon: Syntax for Spaces in File/Path Names

Posted: Mon Dec 27, 2021 6:36 pm
by taylor85345
I was able to resolve this by removing the snap package and compiling MakeMKV from source. I believe the problem is with the current package snap package, which I will report to the package maintainer.

Re: makemkvcon: Syntax for Spaces in File/Path Names

Posted: Mon Dec 27, 2021 6:59 pm
by Woodstock
I'd suggest letting the packager know. It's probably a restriction within the package (Mike does not maintain any packages other than what you can download from this site).

Re: makemkvcon: Syntax for Spaces in File/Path Names

Posted: Mon Dec 27, 2021 9:01 pm
by taylor85345