Audio and subtitle track selection using CLI

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Post Reply
dagor
Posts: 3
Joined: Sat Dec 14, 2024 6:00 pm

Audio and subtitle track selection using CLI

Post by dagor »

Hi,

I've looked at usage.txt and several forum threads, but I can't figure out how I form a commandline argument that rips a bluray with specific audio tracks and specific subtitle tracks. I've made an application that already figured out all audio track and subtitle track ids.

I just can't find a good example of how a more advanced ripping CLI is used.

Code: Select all

makemkvcon.exe mkv disc:0 0 "file_path"


The above is clear, but it rips everything, I want a subset of audiotracks and subtitle tracks. Can more clear examples of this be given?

Much appreciated!
dagor
Posts: 3
Joined: Sat Dec 14, 2024 6:00 pm

Re: Audio and subtitle track selection using CLI

Post by dagor »

If the mentioned above is not implemented, it would be a great feature. A proposed API would be:

Code: Select all

makemkvcon.exe mkv disc:0 0 "file_path" --audio-track=0,1 --subtitle-track=1,4
So a comma separated list of the track ids that were retrieved via

Code: Select all

makemkvcon.exe info
I currently need to rip everything, that means it results in a file that is 7GB larger than it should be (with a recent Bluray I bought) and after that use mkvmerge to strip the unwanted audio tracks. This then again results in roughly 60GB required diskspace to rip a single 1080p bluray. It's doable, but very ineffecient.

In any case, I do want to thank Mike for creating this amazing tool!
Ezatoka
Posts: 411
Joined: Fri Dec 06, 2019 6:55 pm

Re: Audio and subtitle track selection using CLI

Post by Ezatoka »

As much as I remember makemkvcon on Windows uses the language selection from the GUI, which you can set up in the advanced options.

I don't think there is a way (yet!) to make a selection via CLI.
dagor
Posts: 3
Joined: Sat Dec 14, 2024 6:00 pm

Re: Audio and subtitle track selection using CLI

Post by dagor »

Ezatoka wrote:
Wed Dec 18, 2024 2:44 pm
As much as I remember makemkvcon on Windows uses the language selection from the GUI, which you can set up in the advanced options.

I don't think there is a way (yet!) to make a selection via CLI.
Thanks! Another idea is to make the Default Track Selection available as a CLI input:

Code: Select all

makemkvcon.exe mkv disc:0 0 "file_path" --profile=-sel:all,+sel:(eng|nld|nolang),-sel:mvcvideo,=100:all,-10:favlang,-sel:(attachment)
If this is possible, I can write logic that will automatically select the wanted languages. That would be amazing!
Post Reply