makemkvcon: Syntax for Spaces in File/Path Names

The place to discuss linux version of MakeMKV
Post Reply
taylor85345
Posts: 7
Joined: Sun Dec 26, 2021 5:37 am

makemkvcon: Syntax for Spaces in File/Path Names

Post 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?
Woodstock
Posts: 9914
Joined: Sun Jul 24, 2011 11:21 pm

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

Post 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.
MakeMKV Frequently Asked Questions
How to aid in finding the answer to your problem: Activating Debug Logging
taylor85345
Posts: 7
Joined: Sun Dec 26, 2021 5:37 am

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

Post by taylor85345 »

[edit] posted twice because I didn't know each reply needed mod approval. Please see comment below.
Last edited by taylor85345 on Mon Dec 27, 2021 12:10 am, edited 1 time in total.
taylor85345
Posts: 7
Joined: Sun Dec 26, 2021 5:37 am

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

Post 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.
taylor85345
Posts: 7
Joined: Sun Dec 26, 2021 5:37 am

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

Post 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.
Woodstock
Posts: 9914
Joined: Sun Jul 24, 2011 11:21 pm

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

Post 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).
MakeMKV Frequently Asked Questions
How to aid in finding the answer to your problem: Activating Debug Logging
Post Reply