Error using command line to extract SUB/IDX files from a dvdsub track in MacOS

I tried to run the attached CLI code to get the sub and idx files from a mkv movie file in MacOS 26, and it gave me the error message “Error: Unrecognized command line option ‘0:2’.”

Does anyone know how to fix this so I can extract the sub and idx files?

Thanks, Nick

Welcome!

As mkvextract can extract multiple types of content (attachments, chapters, tracks…), you need to tell it what type to extract before the what (the IDs). Correct would be:

mkvextract "source file name.mkv" tracks 2 destination.idx

Thanks for the help. Am I doing it correctly, I get this error message now:

See the documentation, please. In short: no file ID necessary, only track IDs, as mkvextract cannot handle multiple source files at once (this is what differs from mkvmerge & why mkvmerge needs file IDs before track IDs).