makemkvcon and removing the subtitles [RESOLVED]

The place to discuss linux version of MakeMKV
Post Reply
mw007
Posts: 5
Joined: Wed Sep 26, 2012 12:39 pm

makemkvcon and removing the subtitles [RESOLVED]

Post by mw007 »

I am attempting to convert my DVD library (currently in ISO format) to mkv using the makemkvcon tool. I would like to preserve only the movie content (usually title 0) and just the english audio (seems to be title 1). All of my efforts have resulted in keeping the subtitles and other languages. I have tried various combinations of the makemkvcon command; here are a couple.

Code: Select all

makemkvcon mkv iso:/path/to/movie.iso all .

Code: Select all

makemkvcon mkv iso:/path/to/movie.iso 0 .
Any thoughts?

Thanks!
Last edited by mw007 on Fri Sep 28, 2012 11:10 am, edited 1 time in total.
Chetwood
Posts: 982
Joined: Mon Aug 30, 2010 9:16 am

Re: makemkvcon and removing the subtitles

Post by Chetwood »

Subs are usually small and turned off so why not keep them?
MultiMakeMKV: MakeMKV batch processing (Win)
MultiShrink: DVD Shrink batch processing
Offizieller Uebersetzer von DVD Shrink deutsch
mw007
Posts: 5
Joined: Wed Sep 26, 2012 12:39 pm

Re: makemkvcon and removing the subtitles

Post by mw007 »

Because of something like this.

Code: Select all

[mw007@localhost movies]$ ls -lh mult*
-rw-r--r-- 1 mw007 users 4.0G Aug 16 19:27 multiplicity.iso
-rw-r--r-- 1 mw007 users 3.6G Sep 23 10:19 multiplicity.mkv
Going from ISO to MKV only brought the filesize down by about 400 MB. Ideally, I'd like to get each movie to 1 GB or less.
CoderJoe
Posts: 8
Joined: Thu Sep 13, 2012 7:17 pm

Re: makemkvcon and removing the subtitles

Post by CoderJoe »

mw007 wrote:Going from ISO to MKV only brought the filesize down by about 400 MB. Ideally, I'd like to get each movie to 1 GB or less.
MakeMKV generally builds lossless MKVs, i.e. preserving the original quality. To significantly reduce the filesize, you need to transcode at least one of the streams, especially the video stream. You might want to try ffmpeg (or libav), something like this:

ffmpeg -i input.mkv -acodec copy -scodec copy -vcodec libx264 -crf 18 -vpre libx264-slow output.mkv

The above command transcodes only the video stream, keeping the original audio and subtitle streams. It's is a very high quality encode and may even be perceptually lossless, but the file size will probably be larger than 1GB, depending on the type and length of movie. You can further reduce the file size by increasing the CRF value (maybe 22 or even higher), at the expense of reduced video quality. And you can also further reduce the filesize by also transcoding the audio.
Chetwood
Posts: 982
Joined: Mon Aug 30, 2010 9:16 am

Re: makemkvcon and removing the subtitles

Post by Chetwood »

No need to fiddle with command-lines when you can use Handbrake & Co. Also, VobSubs on DVDs are usually < 10 MB so it wouldn't make much of a difference keeping them.
MultiMakeMKV: MakeMKV batch processing (Win)
MultiShrink: DVD Shrink batch processing
Offizieller Uebersetzer von DVD Shrink deutsch
mw007
Posts: 5
Joined: Wed Sep 26, 2012 12:39 pm

Re: makemkvcon and removing the subtitles

Post by mw007 »

Thank you everyone!
MakeMKV generally builds lossless MKVs, i.e. preserving the original quality. To significantly reduce the filesize, you need to transcode at least one of the streams, especially the video stream. You might want to try ffmpeg (or libav), something like this:

ffmpeg -i input.mkv -acodec copy -scodec copy -vcodec libx264 -crf 18 -vpre libx264-slow output.mkv
I haven't done a visual check just yet, but this definitely brought the file size down. I did have to search around for the libx264-slow.ffpreset file. It was deprecated back in April 2011: videolan.org commit.
No need to fiddle with command-lines when you can use Handbrake & Co. Also, VobSubs on DVDs are usually < 10 MB so it wouldn't make much of a difference keeping them.
I'm running this on a server that has no gui. It's a mythtv server, with multiple clients around the house.
Romansh
Posts: 873
Joined: Sat Jan 22, 2011 7:09 pm

Re: makemkvcon and removing the subtitles [RESOLVED]

Post by Romansh »

It's still present in Libav (so you can use it via avconv).

But really, you should use -preset slow instead.
mw007
Posts: 5
Joined: Wed Sep 26, 2012 12:39 pm

Re: makemkvcon and removing the subtitles [RESOLVED]

Post by mw007 »

Thank you! I was searching for the new functionality, as listed in the commit message.

I was searching the man pages for "preset" and was coming up empty-handed.
CoderJoe
Posts: 8
Joined: Thu Sep 13, 2012 7:17 pm

Re: makemkvcon and removing the subtitles

Post by CoderJoe »

mw007 wrote:I did have to search around for the libx264-slow.ffpreset file. It was deprecated back in April 2011: videolan.org commit.
Sorry about that. It's hard to keep up with ffmpeg development. The constantly changing options are always changing constantly. :)

You can usually find all the built-in presets in /usr/share:

find /usr/share/ -name '*preset' -print
mw007
Posts: 5
Joined: Wed Sep 26, 2012 12:39 pm

Re: makemkvcon and removing the subtitles [RESOLVED]

Post by mw007 »

No worries! At least the command technically worked. I'm not above searching for things that my distro doesn't have, old or not :D
Post Reply