K-Lite Codec in OF not working with downsampled videos?

Hi All,

I’ve been working on some video player software with OF and am currently porting from my dev PC to a user PC. I’m working with large GoPro (12min = 4GB, 2704x1538 Res) .mp4 videos that work fine on my PC but are very laggy / jumpy on the user PC (pausing on one frame for some time, then jumping ahead several frames during playback). This may be due to the user machine having a 1GB Graphics card while the dev PC has a 4GB card. I’ve tried downsampling the videos in Windows Movie Maker to 864x482 .mp4, but then OF fails to play them. I get this error:

Error occured while playing or pausing or opening the file
[ error ] ofDirectShowPlayer: Cannot load video of this file type. Make sure you have codecs installed on your system. OF recommends the free K-lite Codec pack.

I already have the K-lite pack installed.

My video loading code is very simple:

    ofVideoPlayer loadedMovie;
    loadedMovie.setUseTexture(false); // I've also tried true

A strange thing is that the original large video files are also laggy / jumpy on the user PC when played with VLC player, but fine if played with the ‘MPC-HC’ video player that was installed with the k-lite codec pack. I also tried downsampling to a .wmv, but then got a different error and the video still does not load:

ERROR: SampleCB() - buffer sizes do not match 1230720 1229760

Both machines are running the same visual studio and OF versions.

Any suggestions are very welcome, I’ve been stuck on this for some time. :confounded:

1 Like


What are the specs of both machines?
Are they both using dedicated graphics or does the user machine have an Intel card?

If so it might be worth updating the Intel graphics driver that can fix a lot of performance issues.

Did you install the k-lite pack for both machines.
Maybe trying uninstalling on the user machine and reinstalling from the link in the visual studio setup page on the OF site.

Also do you have any sample video you could share for either the original or down sampled

We’re debugging video playback issues at the moment on Windows so footage that we can use to reproduce bugs is really helpful.


Hi Theo,

Thanks for the fast response.

Regarding specs, the machines are both pretty high performance and have dedicated NVIDIA graphics cards.
Dev machine - Intel i7-490 3.6Ghz, 8GB RAM, NVIDIA GeForce GT 720 (4GB dedicated graphics), Win 8.1 64bit.
User Machine - Intel Xeon 3.7Ghz, 8GB RAM, NVIDIA Quadro K600 (1GB dedicated graphics), Windows 7 64bit

Yes, I installed the K-lite pack on both machines using the link from the OF visual studio ‘getting started’ page. I also restarted the user machine after install.

I’m afraid that due to other considerations of compatibility with other applications I’m probably unable to update graphics drivers on the user machine. That machine was built and configured by a supplier as part of an extensive motion capture studio and affecting compatibility with the mocap would be a disaster for us. I can check with them to see if they think updating drivers will be problematic.

I can’t provide the original videos due to patient confidentiality (I’m a disability researcher), but I can record some new sample videos with the same original resolution and down sampling. Would you like me to post a download link on this thread or send a private message?

Many Thanks,


Thanks for the info.
It does seem strange that the User machine has playback issues based on those specs.

A public link would be fine for posting the test videos.
I appreciate you doing that - can totally understand about patient confidentiality issues!

All the best,


Not a specialist, but I have two ideas :

  • When you play the big video on the user PC, do you see the k-lite icons in the trail ?
    It isn’t perfectly clear to me, but I believe you can configure the system to use or not to use the codecs installed with the k-lite codec pack. There are configuration options in the k-lite folder, in the windows start menu.
    When I play a video with MPC, I see theses icons in the trail. They tell me that I’m using the k-lite codecs. When I play a video with OF I see theses icons again. If you don’t see them, it can be a clue that your configuration is wrong, and that you don’t use theses codecs in OF.

  • Are you sure that the downsampled video generated by Windows Movie Maker has the same properties than the big one (except the size, of course) ? Perhaps the video codec used for encoding is not the same ? I think you can check that using the MediaInfo tool installed with the k-lite pack (I usualy do that using ffprobe, that’s why I’m not sure about MediaInfo)

About to write an in-depth update / response, but for now here is a short sample videos direct from a GoPro (Hero 3 Black) and after downsampling in Movie Maker using the ‘For Computer’ setting:


As we are talking about a Windows problem, I made a video of some Windows :slight_smile:
I kept the videos short as GoPro files get big fast.

Hey lilive,

That was a good call trying the MediaInfo tool. It seems that the the Movie Maker downsampled version has a different format profile than the original file, despite both being .mp4

This is the raw GoPro file
Format : MPEG-4
Format profile : JVT
Codec ID : avc1 (avc1/isom)

This is after being process (with the ‘for computer setting’) in MovieMaker
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp41/isom)

It seems that the converted file also does not want to play through OF on my dev machine (though it plays in VLC fine). It seems that k-lite + OF does not like the format after conversion.

However, what is really weird is that I also tried downsampling the video as an .mp4 on Adobe Premiere Pro - this led to a file that does play in my application, but has the exact same output in MediaInfo as the video that wouldn’t play! :-/

Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/mp41)

So, I’m more confused than ever, but at least can play a downsampled video!

Also, I noticed that the videoPlayerExample solution that is bundled with OF uses a .mov file so I tried converting the original .MP4 to .mov via Adobe Media Encoder and that played much better, but the resolution is pretty terrible with limited options.

Btw, I did see the icons in the taskbar when the video is attempting to play.

I made some tries.
At first your original big video wasn’t playing smoothly in OF. Some frames were missing.
I’ve got an intel i5-4210M CPU, with no dedicated video card.
I have tried differents codecs and video size. Thinks have became better at 1920x1080 with h264 or mpeg4.
But all of this was before I dig in the k-lite codecs pack configuration ! I have discovered that my harware decoder setting wasn’t set. Now I can play your big video smootly. Perhaps you’re facing the same kind of misconfiguration with your user machine ? Because the k-lite code pack configuration menus are big, here is where I found the missing setting :

@theo, perhaps you are probably already aware about that, but just in case :
I can play the video smootly, but there is a problem with the vertical sync, and I’ve got frame tearing.

  • This doesn’t happpens in fullscreen mode. Perhaps vertical sync is only intended to works in fullscreen, but I haven’t found any information about that anywhere.
  • No tearing problems when I play the video in Media Player Classic.
1 Like

Thanks so much for looking into this - I was away for a few days then got given other jobs so am picking things up on this now.

I ended up finding a temporary workaround by down sampling the videos in Premiere Pro instead of Movie maker, with 1280x720 .mp4 seeming to work best. I will check your solution asap, as it will save time in the long run. I did also find the menu options for k-lite quite extensive.