Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cloudyo

macrumors regular
Original poster
Feb 25, 2012
151
299
Whenever i use Finder to go to a folder with an MKV file in it, the QTKitServer Process starts up hogging the CPU with 50-100%. As long as the folder is open this doesn't change. Even after i close Finder or navigate to another folder the CPU usage remains high for about a minute or two.

This is especially a problem when I'm on battery power. The estimated time remaining goes down to about 3 hours on my rMBP.

I have found out that this process is in charge of creating the thumbnails that are displayed in Finder. It just seems to choke on (some?) MKV files. At first i tried "CMD+J" to uncheck "show icon preview". Unfortunately this didn't do anything.

A Google search led me to this thread, where a corrupted avi file created the same issue. There it is suggested to delete the video file that is causing the problem. In my case this is not an option because the file isn't corrupt and works perfectly in VLC.

As a quick fix i renamed the "Movie.qlgenerator" file in the /System/Library/QuickLook/ folder. This, however, disables thumbnail creation for all movie files, not just MKVs!

Is there any way to configure the creation of thumbnails in Mountain Lion to just exclude MKV files? Or maybe exclude a folder?
 
Last edited:

cloudyo

macrumors regular
Original poster
Feb 25, 2012
151
299
I figured out that Quicklook is only trying to create thumbnails for MKV files because Perian is installed. Without Perian Quicktime/Quicklook wouldn't be able to open MKV files at all.

Now, one Solution would be to uninstall Perian of course. I can't do that however because I need it for "Subler" to work correctly.

And since Perian will soon no longer be supported, I guess I will have to live with this.
 

haravikk

macrumors 65832
May 1, 2005
1,501
21
If you right-click on Movie.qlgenerator you should be able to open its Contents folder and see an Info.plist file. You could try modifying this to exclude .mkv files; unfortunately there's no way to do this directly, but you could modify the LSItemContentTypes part to only include types that aren't .mkv.

You absolutely must backup Movie.qlgenerator before doing this. Anyway, once you've backed it up, open Info.plist in the original plugin within the Quicklook framework; you'll probably need to use XCode, or you could try using plutil on the command-line if you're comfortable with that ("plutil -convert xml1 <path_to_Info.plist>"), since the .plist seems to be in binary format by default.

Find LSItemContentTypes (in XCode look for Document types then Document Content Type UTIs). This is an array of items, with one entry of "public.movie", which basically means "any movie that Quicktime can open".

Remove this and instead add entries for the following UTIs:
Code:
com.apple.quicktime-movie
public.avi
public.mpeg
public.mpeg-4
public.3gpp
public.3ggp2

This should restrict the Movie.qlgenerator plugin to only displaying content of those types.
 

cloudyo

macrumors regular
Original poster
Feb 25, 2012
151
299
Find LSItemContentTypes (in XCode look for Document types then Document Content Type UTIs). This is an array of items, with one entry of "public.movie", which basically means "any movie that Quicktime can open".

Remove this and instead add entries for the following UTIs:
Code:
com.apple.quicktime-movie
public.avi
public.mpeg
public.mpeg-4
public.3gpp
public.3ggp2

This should restrict the Movie.qlgenerator plugin to only displaying content of those types.
Thank you so much! Is there a list of valid content types that i can enter there?

edit: found it: https://developer.apple.com/library...fiers.html#//apple_ref/doc/uid/TP40009259-SW1

edit2: Which UTI would include MKVs, other than "public.movie"?

edit3: It looks like public.mpeg-4 is the one that also includes MKVs if their content is MPEG4. BUT the original problem seems to remain even if i remove the mpeg-4 from the List of UTIs. I guess that Quicklook still has to scan the MKVs to find out if their content conforms to any of the other UTIs. I come to this conclusion because without the mpeg-4 UTI the thumbnails of the MKVs remain unchanged, but the CPU usage is still way too high for the "QuickLookSatellite" Process if i open a folder with only MKVs in it.
 
Last edited:

haravikk

macrumors 65832
May 1, 2005
1,501
21
Ack, I thought it was working for me when I posted, but when I reversed the change Quicklook just doesn't seem to want to generate previews for some .mkv files but not others.


Actually, have you tried associating the .mkv file type with another program? Most of mine are associated with QuickTime Player 7 rather than X, since X still doesn't always open them properly. A side effect of this is that it causes them to display as plain documents, and seems to stop Quicklook from showing a preview. Hopefully it also means it won't try to generate the preview either.

Anyway, it might be worth trying the Open with option in get info to see if it will help; just choose QuickTime Player 7 and hit Change All…
That is of course assuming you have QuickTime 7, which I think is on the Snow Leopard install CD; you might be able to download it from somewhere if you need it. I haven't left my system without it since Quicktime X came out since it actually works on multiple monitors properly, has more options and opens more files properly.

Associating with VLC instead might achieve the same thing?


I really need to brush up on UTIs, maybe there's a way to somehow handle exclusions using UTI features, since Quicklook seems to be devoid of any settings.

EDIT: using the mdls utility it seems the content type for .mkv is "org.perian.matroska", which inherits from public.movie, and so is why Quicklook tries to process it. I can't seem to figure out if there is a way to change or somehow invalidate the org.perian.matroska UTI so that Quicklook will no longer see .mkv files as movies, I don't suppose anyone knows how/where Perian defines its custom UTIs?
 
Last edited:

Menneisyys2

macrumors 603
Jun 7, 2011
6,003
1,106
I've just disabled QuickLook entirely as content-dependent icons have never meant anything for me (I've been using Finder in the Detail view with very small icons).
 

rafaferrs

macrumors newbie
Oct 15, 2012
1
0
Solution

Hey guys!
After uninstalling QuickTime Player 7, the process stopped hogging the CPU. But I disabled Perian along with it.
 

pjk89

macrumors newbie
Oct 30, 2012
1
0
I just came across this problem when using MakeMKV to package my DVD backups. I also have Perian installed but I tend to use VLC these days, I managed to regain the CPU by opening the info window on one of the files and setting VLC as the default application. The QTKitServer/QuickLook services are still running but occupy considerably less CPU.
 

mactoday

macrumors member
Dec 13, 2006
59
0
Moscow, Russia
I figured out that Quicklook is only trying to create thumbnails for MKV files because Perian is installed. Without Perian Quicktime/Quicklook wouldn't be able to open MKV files at all.

Now, one Solution would be to uninstall Perian of course. I can't do that however because I need it for "Subler" to work correctly.

And since Perian will soon no longer be supported, I guess I will have to live with this.
It does the same thing if Perian is not installed, overload CPU.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.