How can I facilitate smoother video playback?

edited April 2018 in Library Questions

I am working on a project that involves playing simple 1080p video in processing with the standard video library- however I am having difficult time with stability of the videos themselves in FullScreen.

On my 2015 MacBook- the frameRate is rather consistent (close to the set frameRate), but audio cuts off 5-10seconds into playback sometimes depending on the format and video size. On a fairly decent PC Laptop (Which i'm primarily using for this project), the frameRate is extremely low and stutters with audio cutting out 5 seconds into playback.

I have already tried setting the frameRate, using P2D/P3D renders, changing resizing, allocating more RAM to Processing in settings, etc- but only the frameRate helped with one specific file on Mac. I also tried different file formats/codecs and so far a twice over exported h.264 .mp4 has lead to the smoothest playback yet (which isn't very smooth at all on windows).

Are there any libraries or any techniques that could help with video playback- more so on Windows? I mean if I can play 30 minute long 1080p video on loop on a little Raspberry Pi perfectly fine (with GL Video through Processing of course), there has to be some way to play it fine on a MacBook and Windows Laptop.



  • @KMat - if you haven't already, have a look at the beta version of Processing Video v2 as that is also using GStreamer 1.x like the Pi library and might improve matters.

    Also, I'd be interested if you get better performance in Praxis LIVE - I'm using a different, and potentially better performing, way to get the GStreamer video data into P2D/P3D. If it is any smoother then there may be some stuff I can contribute.

    Finally note that one of the reasons the Pi is so smooth is that the GL Video library is doing direct transfer of GPU decoded video to OpenGL. Support is not there yet in the underlying GStreamer Java bindings for this to work across platforms, but it is something I'm looking into.

  • @neilcsmith_net Thanks so much, the v2 beta did the trick on both platforms I needed it for. The Praxis Live application was unable to launch though, but I'll look into it later on.

    Once again, thanks for the tip!

  • @KMat - cool, glad you're sorted. GStreamer 0.10 is a little on its last legs and hasn't been updated in years, so not entirely surprised! The Java bindings have also had a lot of fixes since then.

    Yes, if you are interested in trying with Praxis LIVE too, that error is probably because you haven't got a Java 8 JDK installed. Unlike Processing, it doesn't ship with an included JDK ... yet - inbound v4 will.

Sign In or Register to comment.