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

phobox

macrumors member
Original poster
Dec 25, 2007
78
0
Hi all

As some of you may have noticed, if you have installed Perian and have a folder full of mkv files, Finder and QTKitServer will go a bit crazy when you open this folder. This is because they are trying to create thumbnail images for the movies automatically and most of the time fail on mkv files or broken avi files, thus causing the high cpu/disk thrashing (often even after you've closed the folder).

There is a fix for this, but I must warn you not to do any of this if you arent comfortable modifying system files. I have tested it on my own system with good results however.

OSX has a sandbox layer in which almost all processes run, including system processes. This sandbox has rules and by modifying those rules, we can change how things work. In this case we are changing the rules so that QTKitServer will not be able to touch mkv files. Note that this may also have the side effect of you not being able to open mkv files in QuickTime anymore, in which case just use VLC or some other movie player instead.

If you are ready to proceed, do the following:

Open Terminal, type:

sudo nano /System/Library/Sandbox/Profiles/com.apple.qtkitserver.sb

This will open the nano editor with the rules file. Scroll right to the bottom of this file and enter:

(deny file-read* (regex #"^.*\.mkv$"))

After this do Ctrl-O and then Ctrl-X to save and exit the application.

The effect will be immediate and you should have no more issue with thumbnail generation going crazy in a folder with mkv's. It will not affect any other video or audio files.

Again if you arent comfortable in terminal or with modifying system files, I would suggest not doing this yourself. For everybody else, I hope this helps :)
 

gumblecosby

macrumors 6502
Jun 22, 2010
298
6
Absolutely brilliant. This fixed the problem immediately. I can see sandbox daemon run in Activity Monitor for a second and stop now when I open a folder with an MKV file so it works perfectly. Thank you.

Where did you discover the appropriate documentation on Sandbox profiles?

Edit:
FLV files were causing problems too. I entered this to fix it:

(deny file-read* (regex #"^.*\.flv$"))
 
Last edited:

mactoday

macrumors member
Dec 13, 2006
59
0
Moscow, Russia
Hi all

As some of you may have noticed, if you have installed Perian and have a folder full of mkv files, Finder and QTKitServer will go a bit crazy when you open this folder. This is because they are trying to create thumbnail images for the movies automatically and most of the time fail on mkv files or broken avi files, thus causing the high cpu/disk thrashing (often even after you've closed the folder).

There is a fix for this, but I must warn you not to do any of this if you arent comfortable modifying system files. I have tested it on my own system with good results however.

OSX has a sandbox layer in which almost all processes run, including system processes. This sandbox has rules and by modifying those rules, we can change how things work. In this case we are changing the rules so that QTKitServer will not be able to touch mkv files. Note that this may also have the side effect of you not being able to open mkv files in QuickTime anymore, in which case just use VLC or some other movie player instead.

If you are ready to proceed, do the following:

Open Terminal, type:

sudo nano /System/Library/Sandbox/Profiles/com.apple.qtkitserver.sb

This will open the nano editor with the rules file. Scroll right to the bottom of this file and enter:

(deny file-read* (regex #"^.*\.mkv$"))

After this do Ctrl-O and then Ctrl-X to save and exit the application.

The effect will be immediate and you should have no more issue with thumbnail generation going crazy in a folder with mkv's. It will not affect any other video or audio files.

Again if you arent comfortable in terminal or with modifying system files, I would suggest not doing this yourself. For everybody else, I hope this helps :)

Cool, I have done the same for avi and finally I could breath :) Thanks, dude!
but in general Apple is sucks with this preview.
 

mactoday

macrumors member
Dec 13, 2006
59
0
Moscow, Russia
Hi all

As some of you may have noticed, if you have installed Perian and have a folder full of mkv files, Finder and QTKitServer will go a bit crazy when you open this folder. This is because they are trying to create thumbnail images for the movies automatically and most of the time fail on mkv files or broken avi files, thus causing the high cpu/disk thrashing (often even after you've closed the folder).

There is a fix for this, but I must warn you not to do any of this if you arent comfortable modifying system files. I have tested it on my own system with good results however.

OSX has a sandbox layer in which almost all processes run, including system processes. This sandbox has rules and by modifying those rules, we can change how things work. In this case we are changing the rules so that QTKitServer will not be able to touch mkv files. Note that this may also have the side effect of you not being able to open mkv files in QuickTime anymore, in which case just use VLC or some other movie player instead.

If you are ready to proceed, do the following:

Open Terminal, type:

sudo nano /System/Library/Sandbox/Profiles/com.apple.qtkitserver.sb

This will open the nano editor with the rules file. Scroll right to the bottom of this file and enter:

(deny file-read* (regex #"^.*\.mkv$"))

After this do Ctrl-O and then Ctrl-X to save and exit the application.

The effect will be immediate and you should have no more issue with thumbnail generation going crazy in a folder with mkv's. It will not affect any other video or audio files.

Again if you arent comfortable in terminal or with modifying system files, I would suggest not doing this yourself. For everybody else, I hope this helps :)
I've done everything that you wrote but this solution didn't help. I run 10.7.5 with all last updates.
How to permanently disable this QTKitServer QuickLook Helper? Looks like folks in Apple don't see a huge problem because they reported that it's not a bug that mine CPU overloaded by their ****** software. Jobs was **** allover Flash but their own software overload CPU over 100%. I suppose folks in Apple feels like everyone only should use their mp4 with h.264.
 

svkrzn

macrumors regular
Dec 8, 2009
225
9
Australia
If you are ready to proceed, do the following:

Open Terminal, type:

sudo nano /System/Library/Sandbox/Profiles/com.apple.qtkitserver.sb

This will open the nano editor with the rules file. Scroll right to the bottom of this file and enter:

(deny file-read* (regex #"^.*\.mkv$"))

After this do Ctrl-O and then Ctrl-X to save and exit the application.

The effect will be immediate and you should have no more issue with thumbnail generation going crazy in a folder with mkv's. It will not affect any other video or audio files.

Again if you arent comfortable in terminal or with modifying system files, I would suggest not doing this yourself. For everybody else, I hope this helps :)

Nice tip, but from time to time seems that the file itself resets and the rows i add
(deny file-read* (regex #"^.*\.mkv$"))
(deny file-read* (regex #"^.*\.avi$"))

Can it be set as read only?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.