HOW-TO: Fast h.264 decoding on your PC

The following guide will show you how to smoothly playback h.264 on almost any PC. With this method, I can playback CABAC “High Profile” full 1080p h.264 files without dropping a single frame on my 4+ years old Pentium 4 at 3Ghz! Where Quicktime or VLC are able to display about ~10 fps, the following solution goes the full 30.

1. Install the Mplayer Classic from here. Pick the latest version (not the “win9x” version).

2. Install the latest “generic build” of FFDshow at the “SVN builds by clsid” section. Make sure you’re downloading from clsid’s section.

3. Buy and install the CoreAVC Pro ($15) version from here (or try the 14-day trial first).

4. Let’s configure the Mplayer Classic application to use the CoreAVC decoder by default now, instructions as originally described here.
a. Open the “View/Options” window in media player classic (by pressing ‘o’, or through right click menu).
b. Go to the “External filters” option. Now in the right side of the window select “Add Filter”.
c. You will get an elaborate window with a plethora of options. Select there the “CoreAVC Video decoder” codec and press “Ok”, and then do the same once more for the “CoreAVC Audio decoder”.
d. Select the “CoreAVC Video Decoder” entry in the “External Filters” window and press the “Up” button to move the decoder to the top of the list. Do the same for the “CoreAVC Audio Decoder”, move it second in the list.

5. [Optional] If you are using a modern nVidia graphics card, CoreAVC will take advantage of it. This is a new feature (CoreAVC was the fastest decoder out there even without it). Open the “CoreAVC Configuration” panel (found on your Windows’ Start menu), and make sure Deinterlacing is set to “Hardware”, and “Preferred Decoder” & “CUDA Acceleration” are checked. If the CUDA option is disabled, it’s because your nVidia card doesn’t have that ability, tough luck. With CUDA acceleration I get just 6% of CPU utilization on a 1080p file from the Canon 5D-MarkII.

Now, throw at it any MP4 h.264 file, and do your tests against other players, like VLC or Quicktime, and enjoy the speedy and smooth decoding.

Note 1: To force CoreAVC to decode .MOV h.264 files on the Mplayer Classic player, you must rename these .mov files to to .hdmov (update: or, you can try this). To decode Matroska MKV h.264 files, you must install the Haali Media Splitter first.

Note 2: If you don’t have the money or expertise to do all of the above, you can use VLC to decode h.264 files fast-enough, with a small trick. Load the latest version of VLC, go to its Tools/Preferences, select the “All settings” radio button on the bottom/left of that window, click “Input/Codecs”, “Other Codecs”, “FFmpeg”, and change the “Skip the loop filter for h.264 decoding” from “None” to “All”. Save the preferences. This will make h.264 decoding with VLC almost as fast as CoreAVC’s non-GPU performance, but with lower visual quality.


Jara wrote on July 12th, 2009 at 12:20 AM PST:


Any idea how to force VLC to show videos in smaller window and in the center of the screen? I tried to switch most of the setting but it did not help..

This is the admin speaking...
Eugenia wrote on July 12th, 2009 at 12:25 AM PST:

VLC won’t remember such details after you restart itself of its video playback, don’t bother.

himanshu wrote on July 12th, 2009 at 6:11 AM PST:

wow…never knew that this commercial codec will boost video playback this much.

h.264 video playback is so much smoother on my slow laptop 🙂

great tip.

also, check out this software:

its a vegas plugin for gpu/cuda decoding of avc/h.264 files. but it costs around $100 🙁

Kurt wrote on July 13th, 2009 at 6:03 AM PST:

Regarding step 2. What is FFDShow for? Isn’t that a codec for mpeg-4 etc?

This is the admin speaking...
Eugenia wrote on July 13th, 2009 at 8:42 AM PST:

Yes, but we make sure MplayerClassic uses CoreAVC instead. We use ffdshow for the audio codecs it supports that might come with the h.264 video you try to decode. So while CoreAVC handles the video, ffdshow is needed to handle the audio.

JrezIN wrote on July 13th, 2009 at 5:56 PM PST:

I’m really curious why you’re using this MPC version instead of MPC Homecinema?
Also, how does CoreAVC compares to the MPC Homecinema using EVR in your system?

This is the admin speaking...
Eugenia wrote on July 13th, 2009 at 7:58 PM PST:

No idea, it doesn’t seem to be more actively developed than this version.

edogawaconan wrote on July 15th, 2009 at 9:11 AM PST:

EVR only handles the output. The decoding is still by either MPC internal decoder (with DXVA capabilities), FFDshow, CoreAVC or whatever the available decoder.

With compatible files (h264’s level, vga, etc), EVR + CoreAVC probably is the fastest way (and looks best).
EVR should be avoided on some vga cards though.

And for the VLC’s settings, it’s actually also doable with ffdshow. Just open the ffdshow video decoder configuration, in Codecs > H.264/AVC, there’s the skip deblocking options (when safe or always).

edogawaconan wrote on July 15th, 2009 at 9:13 AM PST:

>> With compatible files (h264’s level, vga, etc)…

I actually mean with compatible combination – the file (h264’s level), the vga, and probably some other factors

Comments are closed as this blog post is now archived.

Lines, paragraphs break automatically. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

The URI to TrackBack this blog entry is this. And here is the RSS 2.0 for comments on this post.