Very poor video performance


I am trying to play back video in processing on OSX. I'm using Mavericks (if that makes a difference, I know it does for other software I use such as Autodesk Smoke)

Currently I've tried MP4 (h264) and MJPEG made from various applications FFMPEG, Compressor, Adobe Media -

By the looks of it - it manages around 18fps. This is low resolution media (720p or less) and all around 5000 Mbit/s.

What is more frustrating - is manually setting the framerate() property and putting the read() function in the draw area appears to do nothing. I'm just using the examples off to try and get something happening.

The performance of the playback is all related to the size of the window - at 1280,720 its 18fps, when I do 1280/2,720/2 its fine.

I have checked this all in an empty sketch - my current one has ControlP5, but that doesn't seem to make a difference.


  • What hardware are you running on? My first thought is that it sounds like the GPU can't keep up with the video. Does using one of the OpenGL renderers help (e.g. size(1280, 720, P2D);)?

    One note on setting frameRate() manually — that's essentially a target that you set. If your hardware can't run your program fast enough it won't hit that. Have you tried measuring the framerate, rather than judging by eye?

  • Hi - this is on a 2013 Mac Book Pro (2.4 i5, Intel Iris) and also on a 3.4 i7 late 2013 imac with nvidia gtx 780m.

    P2D seems to have done the trick (thank!) - it's still bad when I use, but I'm sure I can make it work for what I need.

    boolean sketchFullScreen() {
      return true;

    No noticeable CPU usage difference between using P2D and not (both around 15%).

    I still can't get framerate() to work. I'm setting it to 2 to see if it does anything.

  • You might also want to look at a different video format. H264 has a lot of compression, so it has to uncompress all.

  • Here is my code where framerate isn't working

    in draw()

      if(myMovie != null)
        image(myMovie, 0, 0);

    and movie called in another function

      myMovie = new Movie(this, "/Volumes/X_WORKING/images_incoming/" + runID + ".mp4");
  • I tested with the loop example coming with processing. For me the framerate is also not working. It keeps playing at it's default speed.

    processing 2.1.2 Mac book pro early 2013 geforce gt 650M OS X 10.9.2

  • what other video format would you suggest?

    i too am having video playback issues using processing 2.1.2 on a brand new mac OS 10.9.3 2.4 ghz intel core i5......the files are 1920x1080 h264 .mov with AAC audio....the video is artifacting and the audio is not playing at all......


Sign In or Register to comment.