QTKitServer/QuickLook hogging CPU!

Discussion in 'OS X Mountain Lion (10.8)' started by cloudyo, Aug 4, 2012.

  1. cloudyo, Aug 4, 2012
    Last edited: Aug 4, 2012

    cloudyo macrumors member

    Feb 25, 2012
    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?
  2. cloudyo thread starter macrumors member

    Feb 25, 2012
    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.
  3. wytwolf macrumors regular

    Apr 23, 2012
  4. haravikk macrumors 65816

    May 1, 2005
    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:
    This should restrict the Movie.qlgenerator plugin to only displaying content of those types.
  5. cloudyo, Aug 7, 2012
    Last edited: Aug 7, 2012

    cloudyo thread starter macrumors member

    Feb 25, 2012
    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.
  6. haravikk, Aug 8, 2012
    Last edited: Aug 8, 2012

    haravikk macrumors 65816

    May 1, 2005
    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?
  7. Menneisyys2 macrumors 603

    Jun 7, 2011
    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).
  8. rafaferrs macrumors newbie

    Oct 15, 2012

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

    Jun 22, 2010
  10. pjk89 macrumors newbie

    Oct 30, 2012
    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.
  11. mactoday macrumors member

    Dec 13, 2006
    Moscow, Russia
    It does the same thing if Perian is not installed, overload CPU.

Share This Page