VLC Mac Stutter – the fix

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…

vlc_fix_mac

  1. First, with VLC running, click VLC/Preferences in the top menu bar.
  2. Next, Click the “All” button in the bottom left. The screen will then change to look like it does in the picture above.
  3. Go to Input Codecs, Access Modules, File
  4. 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.
  5. Click “Save”.
  6. 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.