makemkvcon: Syntax for Spaces in File/Path Names

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

makemkvcon: Syntax for Spaces in File/Path Names

#1 Post by taylor85345 » Sun Dec 26, 2021 5:47 am

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: 10332
Joined: Sun Jul 24, 2011 11:21 pm

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

#2 Post by Woodstock » Sun Dec 26, 2021 3:32 pm

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.

taylor85345
Posts: 7
Joined: Sun Dec 26, 2021 5:37 am

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

#3 Post by taylor85345 » Sun Dec 26, 2021 10:01 pm

[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

#4 Post by taylor85345 » Sun Dec 26, 2021 10:04 pm

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

#5 Post by taylor85345 » Mon Dec 27, 2021 6:36 pm

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: 10332
Joined: Sun Jul 24, 2011 11:21 pm

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

#6 Post by Woodstock » Mon Dec 27, 2021 6:59 pm

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).


Post Reply