Showing posts with label MKV. Show all posts
Showing posts with label MKV. Show all posts

Tuesday, December 13, 2011

MKVmerge Batch Commands, Remove Tracks

To remove a particular track from an MKV file, the following notation should work:

mkvmerge -o output.mkv -atrack !2 input.mkv 

But I wasn't able to get the exclamation mart (meaning DON'T copy this track) to work. For some reason I kept getting "track not found" message. This should work with --vtrack or --strack (subtitle) or whatever.

Fortunately, I wanted to remove all the subtitles from my files, so I used the following instead:

mkvmerge -o output.mkv --no-subtitles input.mkv

If you only want to do this on one file, the mkvmergeGUI is fast and easy, but if you want to do it on a whole directory of files, you want to use this at the command line in a "For Loop," like so:

for i in *mkv; do mkvmerge -o ./newfiles/`basename "$i" mkv`.mkv --no-subtitles "$i" ; done

This will remove all subtitle tracks from all MKV files in the current folder, then put the new files in a previously-created sub-folder named "newfiles".

Wednesday, October 5, 2011

Removing Subtitles With MKVMerge

If you have subtitles in an MKV file that you want gone, you don't have to re-encode the whole thing. Simply open in MKVMerge, choose the track you want to remove (the text track if you want to remove subtitles), uncheck it, and remux. It'll take a few seconds and won't re-encode everything else. While there, you may want to make sure Compression is set to "none" explicitly on the extra options tab for each track to ensure maximum compatibility with things such as PS3, etc.

Making Compatible MKVs with MKVMerge

The following tip is from StephenB on the netgear forums. It helped me a lot. Thanks, Stephen.

Original Thread Title: Re: No sound on .MKV files , increasing in frequency.

It is the Muxing mode : Header stripping. This is also called "header compression". Though it doesn't save enough space to matter.

For some reason the Matroska developers made this mode the default earlier this summer. It doesn't work with most hardware players (including the EVA and also the WD Live).

You have to re-process the files to remove the header compression. This doesn't hurt the quality at all, and is a pretty fast operation. If you are comfortable running command line tools, you can either use mkWDclean.exe (found at https://sourceforge.net/projects/mat...7.zip/download) or MKVMerge (found at http://www.videohelp.com/tools/mkvtoolnix)

The command line strings are:

mkWDclean input.mkv output.mkv
mkvmerge -o output.mkv --compression -1:none input.mkv

There are two other ways that don't require opening a command line shell:

(a) You can use MKVMerge GUI, but it is tedious. You select every track (from the middle pane), select the "extra options" tab, and set user defined options to "--compression -1:none". (blank is not good enough).

(b) You can download VID2EVA from http://vid2eva.lefti.net. This is a freeware video conversion tool that I've put together. After installation you right click on the MKV and select "VID2EVA" then "transcode audio". For this particular file, it won't transcode since the audio is already AC3. But it will remove the header compression.

Friday, December 31, 2010

PS3 Media Server on 64-bit Linux

I was having the darnedest time getting MKV files to play from PS3 Media Server from fresh Ubuntu 10.04 Lucid Lynx. They worked fine from Windows and from an old 32-bit 9.04 Jaunty Jackalope system. Turns out Warriorcookie found the problem. 64-bit Linux systems need to install 32-bit libraries (ia32-libs for Ubuntu) for some packages, including Tsmuxer, apparently. So I simply:

sudo aptitude install ia32-libs

Then I rebooted and all was well. WOOHOO!!