Processing New GStreamer Error


It’s been a while since I’ve used Processing, but I just fired back up some old sketches that are no longer working. It appears the issue is with objects, and in particular the underlying GStreamer library. Using just the basic code in the Processing reference page here (with my own movie file replacing the example), I get the error java.lang.IllegalArgumentException: No such GStreamer factory: playbin. I’ve also tested this with a few different .mov and .mp4 files to make sure it’s not a file issue.

If it’s helpful, the full error message from the console is the below:

Processing video library using GStreamer 1.16.1
java.lang.IllegalArgumentException: No such Gstreamer factory: playbin
	at org.freedesktop.gstreamer.ElementFactory.makeRawElement(
	at org.freedesktop.gstreamer.Element.makeRawElement(
	at org.freedesktop.gstreamer.elements.PlayBin.<init>(
	at Source)
	at<init>(Unknown Source)
	at sketch_211206a.setup(
	at processing.core.PApplet.handleDraw(
	at processing.awt.PSurfaceAWT$10.callDraw(
	at processing.core.PSurfaceNone$
RuntimeException: Could not load movie file
RuntimeException: Could not load movie file
RuntimeException: Could not load movie file

I uninstalled Processing 2.0 and reinstalled the new Processing 3, but still getting the same error. Unfortunately I haven’t been able to find anyone having similar issues, but not sure if there are any additional steps I need to take to get GStreamer up and running.

Apologies if I’m missing anything obvious here, but any help would be greatly appreciated. Please let me know if there’s any other information I can provide, and thank you very much for your help!

We have to assume that your code looked similar to this:-

myMovie = new Movie(this, "");

If so did you put your movie in a data folder adjacent to sketch? If not you should use an absolute path to your movie eg on linux

myMovie = new Movie(this, "/home/tux/Videos/");

Adjust for your OS, folder arrangement.

Hi @monkstone,

Thanks for your reply here. I have loaded the file into the data folder adjacent to the sketch, and also tried testing with the full path to the original document just in case. The error that would appear if the file is missing is RuntimeException: Could not load movie file It appears in my case that something a little more complex is going on under the hood.

As a follow up - I tried running this same script with the same video on my Windows desktop and it worked fine (should have mentioned in IP that I’m trying to run this on macOS Monterey 12.0.1). The only difference I noticed is that Windows Processing says it is using GStreamer 1.16.2 whereas Mac says it’s using GStreamer 1.16.1. Probably worth me exploring, but any additional insight in the meantime would be great!

You definitely should have mentioned OS, it is almost certainly the cause of the problem, and Apple does not care, given their appalling attitude to Open Source (like deprecating OpenGL, I don’t think anyone else should care either…).

@monkstone that is probably a safe bet given that I’ve recently updated to the new macOS Monterey software and Processing video seemed to work fine before then. However, I’m having a hard time finding any evidence of this online, and I would have thought that others would have similar issues given that a rather basic functionality of Processing might be deprecated in a pretty common new software update for Mac users.

I will probably attempt to downgrade back to my old version of macOS that is able to run GStreamer as this is pretty vital to a project I’m working on, but just want to make sure that is the safest/best way forward on this one.

Thanks for all of your input so far!

That’s definitely not a file issue, but GStreamer not being able to find / load its own plugins. Curious! You could try downloading the latest macOS GStreamer from Download GStreamer and seeing if the command line functions to play back work. And if so, have fun trying to hack the newer binaries into the library. Actually, on macOS this is difficult due to linking paths - probably easier to hack the library to load from the framework location.

The Video library shipping with the GStreamer binaries like it does is a real pain! Tried to make the point that we don’t recommend doing this for using the bindings in these sort of applications, but that fell on deaf ears (or locked issues!) :wink:

Hi @neilcsmith - thanks so much for the insight here! I downloaded and installed GStreamer through your link and tried running gst-launch-1.0 commands per the reference but am getting a command not found error.

This one is probably a bit above my paygrade so I’ll likely look for some other workarounds or use other video editing tools to merge my MOV files with Processing sketches until (hopefully) this is resolved elsewhere.

Appreciate all the help on this!

1 Like

OK, apologies for the probably silly/obvious suggestion, but when “installing” Processing 3, have you tried creating a new, fresh sketch folder (ie. not Documents/Processing where all your old libraries are contained), say Documents/Processing3? Upon setting the new sketch folder, quit and reopen Processing to be safe, check in preferences its indeed pointing to the new sketch folder and then proceed to download a fresh copy of the Video library (and any other libraries your sketch may need) through the “Import Library / Add Library” menu.