Matroska (MKV) video thumbnails in Windows 7 64bit (and 32 bit)

Some time has gone since my previous tips for making video thumbnails work in Windows 7. For some reason these tricks doesn’t seem to work in Windows 7 (not at least in 64 bit). Here’s a guide to fix the thumbnails in Windows 7 (probably works in older versions too!)

Fortunately, there is an easy way to make mkv files show the thumbnails, just install the latest MKV on Windows 7 from divx. Now you are probably thinking that you don’t want to install divx — it’s so 90’s. Fortunately, you don’t have to install anything extra just install the parts you need (meaning that you don’t need any codecs).

The following picture shows the necessary parts you need to have mkv video thumbnails in 64bit Windows 7. This probably works for 32bit too.

Just install these components in DivX

You will also have to install 64 bit video codecs. I prefer ffdshow since it basically contains video codecs for every possible video, in addition it supports hardware accerelated video decoding. You can install ffdshow from here. Just select the 64 bit version under SVN Builds. Notice that the 64 bit ffdshow codecs are still experimental so they might prove to be unstable…I think choosing the ”H.264 Decoder” and DivX codec in DivX installer might work just as well for some people. To me it really doesn’t matter so much since the 64 bit codecs are used only for thumbnail generation. The video player I use  (media player classic home cinema, available here) is 32bit and therefore it uses 32 bit codecs. Actually, the media player home cinema is bundled with internal h.264 decoder.

EDIT:Installing the direct show filters is no longer possible. One must install DivX Plus. Only the codec pack is mandatory for thumbnails.

Powershell script, executing commands to lots of files

Following powershell script goes recursively the folder ”J:\pictures” and converts all avi file to mp4 files. It uses ffmpeg (remember to download newest binary)

I couldn’t get invoke-expression to work (it gave some error about ”-” operator), so I just sticked all the commands to a text file d:\commands.txt and run it as a normal batch script.

I used this script to convert lots of videos shot with my camera to more compatible format.

"" > d:\commands.txt
foreach ($file in get-childitem "j:\pictures" -recurse -include "*.avi"){
$ffmpegprog = "`"C:\Program Files (x86)\WinFF\ffmpeg.exe`"";
$ffmpegparams = " -threads 2 -f mp4 -vcodec libx264 -b 1500k -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1500k -maxrate 2000k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec aac -ab 256k -ac 2 -ar 44100";
$command = ($ffmpegprog + " -i `"" + $file.FullName + "`"" + $ffmpegparams + " `"" + [System.IO.Path]::ChangeExtension($file.FullName, ".mp4") + "`"");
$("$command") >> D:\commands.txt
}

You can just copy-paste the file to a powershell window.

For some reason direct execution of the commands.txt batch file didn’t work so you can just run it throught type

type d:\commands.txt > d:\commands.bat

Vista 64bit video preview thumbnailit explorerissa

Update: These instructions does not seem to work in Windows 7, see this newer post for Windows 7.

Lataa guliverkli2:lta (SourceForge) 64bittiset versiot mediasplittereistä MatroskaSplitter.ax MP4Splitter.ax MPegSplitter.ax OggSplitter.ax. Sen lisäksi lataa ffdshow-tryouts 64bit versio ja aseta se purkamaan haluamasi formaatit. Tämän jälkeen rekisteröi .ax-splitterit seuraavalla command line skriptillä:

@echo off
echo copying files to system32…
d:
cd D:\Apps\Video Splitters for 64bit (thumb gen)
copy /Y *.ax c:\windows\system32
c:
cd c:\windows\system32

regsvr32 MatroskaSplitter.ax
regsvr32 MpegSplitter.ax
regsvr32 MP4Splitter.ax
regsvr32 OggSplitter.ax

echo filters registered

pause

Uninstall proseduuri:

@echo off
c:
cd c:\windows\system32

regsvr32 /u MatroskaSplitter.ax
regsvr32 /u MpegSplitter.ax
regsvr32 /u MP4Splitter.ax
regsvr32 /u OggSplitter.ax

echo removing filters from system32

del MatroskaSplitter.ax
del MpegSplitter.ax
del MP4Splitter.ax
del OggSplitter.ax

echo filters UNregistered
pause