electricfarm

Matroska Video

What is Matroska? Matroska is a relatively new compression scheme for video allowing a standard 8+gb DVD to be compressed to less than 1gb or a BlueRay disc can be compressed to less than 8gb.  These files can only be played on a computer so if you like watching movies on your computer fine.  Where this technology provides a significant advantage is when your computer is attached to your HDTV media center.     The playback quality is surprisingly good considering the compression.  I still use DVD Fab to rip my DVD's as it does a very effective job of removing copy protection, previews, FBI warnings leaving only the main movie.  I encode to the DVD5 format as these disks are now less that 20 cents each and I use this media for archival.  For movies that I feel I want easy access to on my media center I process the DVD5 files to a Matroska (.mkv) file for transfer to my media machine.  

The software I use to do this is called XviD4PSP 5.0.  I have found this software to be quite good and it is free.

Download XviD4PSP.exe

The documentation is very poor but I have been able to figure it out without too much of a problem.  There is batch processing capability so I usually set up 4-5 movies for processing at night when I am sleeping as it takes 2-3 hours to process each movie.






I have now added the playback of Matroska files to my media players MHplayer, MIplayTV, and MHplay providing the proper codec is installed. 


I have found this codec package to be quite good for both .mts and .mkv files.


I have installed this package many times and all you have to do is say yes at all prompts.

Update 2009.06.01 - DVD to Matroska


I have recently been converting my movies to Matroska files. Matroska files are a relatively new advancement in technology that allows for significant compression of video. I am presently using the following system to reduce a movie to about one gigabyte.


First the copy protection must be removed. This can usually be done with DVDshrink but I find DVDfab to be a more reliable solution. There is a free ware version of DVD fab which has many of the feature disabled. One of the main features you might desire is the ability to compress a movie to a DVD5 disc. In order to do this you will need the registered version. Fortunately this is not necessary to reduce a file to Matroska.


Just start up DVDfab select main movie. You will then have to set the target to a drive with at least 10gb of space to send the decoded files to otherwise the program will try to burn the files to a disk. Click the “Next” button. The program will create a folder called “Main Movie” and decode to that folder.


Okay you now have the movie with copy protection removed. We are now going to use Xvid4PSP to encode these files to Matrosk. Xvid4PSP is a very interesting program which is actually a front end for numerous other programs providing a single user interface so that it appears as a single program.



In this paragraph I will describe some of the inner workings of Xvid4PSP but you need not understand all this if all you want to do is convert some files. The main power of Xvid4PSP is derived from the use of AVIsynth. AVIsynth is a very powerfull scripting language for editing video files. It allows for editing and conversion of video in many ways. What is really interesting about AVIsysnth is that once it is installed on your system the text files it creates with the extension .avs can be played by any media player just as if they are video files. This is a big advantage as the script can be reviewed prior to encoding to see if the changes and settings to the origional video is what you desire. The actual conversion of file types MPEG and VOB is accomplished by other freeware programs FFMPEG and Dgmpegdec (Formerly DVD2AVI). In Xvid4PSP all these programs and several I have not mentioned are masterfully orchestrated into what appears to be a single program but is actually a large group of open source programs.

Okay you have your movie residing on the drive you selected and it is in the folder “Main Movie” start up Xvid4PSP and select the button “DVD” and navigate to your movie and select the parent folder for your movie. I like to rename the parent folder to the filename that I want the Matroska file to have as the output file will be this name with the extension “.mkv” added. You must now make sure the the output format is set to “MKV”.


In order to produce output files averaging 1gb in size I go to the options for “Video Encoding” and set the output Encoding mode: “2-Pass Bitrate”, and Bitrate: (kbs) to “1000” and the select “OK” to close the window. You could at this point just select “Encode” to start the encoding process but I suggest previewing your resulting file to make sure all the settings are correct. This is where the power of AVIsysnth reveals itself because there is now an .avs file that controls the encoding process but this file is playable in any media player so that your encoding which will take several hours can be previewed by going to the menu item “AVIsynth” and selecting a play option. Media Player Classic is with out a doubt the best media player for this purpose and the Windows media player I cannot recommend. The WPF player is the packaged player with Xvid4PSP and seems to work. After checking your output you can select “Encode” to create your Matroska file however I usually run the encoding process at night when I am not using my computer and I set up several movies for encoding as on my machine each movie requires about 3 hours to complete. In order to do this select “Save” and navigate to where you want the output saved and select “Save”. You can then add additional movies for encoding. To start the encoding process for multiple files select “Encode”. After the encoding process is started you can add additional movies while the encoding process is working.


Update 2009.06.03: Matroska – Media Player Classic


The playing of Matroska files with the various MS players is problematic at best. The position slider does not work so it is impossible to skip forward or back. Fortunately there is a solution. Media Player Classic is a very good player which is superior to all the Windows media players. The interface is made to mimic the original media player. It does not contain all the annoying connect to the Internet options and in my experience it has been able to play anything I have given to it.


In order to facilitate use of MPC (Media Player Classic) on my entertainment center I have written a small program to act as a file server with an interface using large fonts so that it can be seen from normal viewing distances on a TV.



Initially I have made this program so that it only recognizes .mkv (Matroska) files. In order to use the program (MImpcTV.exe) it must be in the same folder as the .mkv files and a copy of MPC must be there also. When MImpcTV is executed a list of all the .mkv files is prestented in a 24 point font and upon selecting one of the files a call is passed to MPC with the filename as a command line argument. MPC is initiated with the /play /close and /fillscreen command line options so that the player displays full screen, starts play immediately and closes at the end of play. I have added a simple search to the program and I will probably add more features as time goes on but I have been using the program as is and have found it to be a considerable improvement over Media Player 11 and the axmediaplayer.