Update: This is for VLC 1.x – if you’re using the newer VLC 2.x see the updated post at https://mattgadient.com/vlc-2-x-mac-stutter-the-fix/
If you’re using VLC for Mac OS X and playing files over the network, you might be noticing some stutter, lag, delay, freezing, etc every so often. Basically your video’s happily playing along, and the screen will freeze for 2 or 4 seconds, then play again. You may also find that Quicktime DOESN’T stutter or freeze. Of course it doesn’t help if Quicktime won’t play your video and VLC will.
Sound like the issue you’re having? Here’s the fix…
- First, with VLC running, click VLC/Preferences in the top menu bar.
- Next, Click the “All” button in the bottom left. The screen will then change to look like it does in the picture above.
- Go to Input Codecs, Access Modules, File
- Now change this value from the default of 300. This determines how many seconds of video VLC will cache. I had lag spikes of up to 4 seconds at a time on the Macbook here, so I set it to 5000ms (5 seconds). If your lag spikes are longer, you can try going even higher.
- Click “Save”.
- Now RESTART VLC. Easiest way is to Right-Click the icon on the dock and choose “Quit”, then start it again.
You should be good to go! If you still get periodic spikes, you can go into the preferences and increase the cache a bit more.
The boring stuff you didn’t want to know:
From what I read/gathered, the cause seems to have something to do with the Mac OS having high latency when accessing Samba-shares (shares from Windows), and the Mac OS doing particularly poorly when it does many small reads from these shares.
What you’re basically doing with the above cache setting is caching this data well ahead of time. So when there’s a “stutter” while VLC copies in the background, you’ll never see it because you’ve cached enough that VLC recovered and grabbed the new data before the video even got to your screen. The default cache of 300ms isn’t enough, because any stutters of longer than 0.3 seconds will be very evident. By using 5000ms, VLC has 5 seconds to “catch up” from a stutter which should catch just about all of them.
Credit:
As much as I’d like to say I was successful the first time I looked through the zoo of options trying to find where the caching was (I assumed VLC must have some sort of caching option since most everything else does), I was unsuccessful. Credit to:
-techmonkey of the macrumors forum for linking to the thread with the fix
-cellplex of the VideoLAN forums for stating where in the preferences to look
-SumoPaint (http://www.sumopaint.com/home/) for having a nice web-based paint program since the Macbook just had a fresh install of Snow Leopard and I didn’t have another painting program installed to do my lovely screenshot circles/numbering with.
SmOOOOOOOth video at last!!!! :) ty
Hah, I had the exact same problem. :D
my vlc got freezes automatically....
then i've to force quite it..
i ve macbook pro with kion os in it
Thanks for the help!
However, I just downloaded VLC and the preferences seem to have changed around a bit. To find the correct field to change follow the same steps above except click on "Input / codecs" and then scroll down towards the bottom until you find "Network caching(ms)" I set this to 5000 and the jitters stopped. Hope that helps.
Anthony's comment above sums up the new location quite well, but I'll try to break it down a little.
-Head to preferences
-Click "Show All" in the bottom left
-With "Input/Codecs" selected at the left, scroll way down on the right.
-When you've scrolled down far enough you should see sliders near "File caching (ms)", "Live capture caching (ms)", "Disc caching (ms)", "Network caching (ms)".
Adjust those settings. Network caching is the important one if you're watching a video that's located somewhere else on your network. Something like 9000 would work out to 9 seconds of caching.
Beyond that, it can help to bump up File caching and Disc caching if your hard drive is being kept busy when you're playing videos locally (if you're doing something disc-intensive in the background for instance).
What version are you using? This writeup was for 1.x, and there's an updated one for 2.x at https://mattgadient.com/vlc-2-x-mac-stutter-the-fix/ (which also applies to at least v3.0.4 which I'm currently using).
If on one of the newer versions the link provided shows some screenshots, but the process is essentially... from within Preferences: