Current state of video library support

Anyone have any knowledge on video support for Android mode?

This library seems to be the thing:

But it hasn't been maintained since 2015. Attempted to use it and having difficulty getting Processing IDE to see it as a library. (so maybe someone knows how to do that? I'm a newbie to Android mode).

Also, confusingly, in Android mode (4.x pre-release) when adding libraries via the "Sketch" dropdown menu there are two "native" options the "vr" lib, which is for Cardboard support (and works great!) and the other is "video" suggesting there is now a native video lib for Android mode.

Any help would be greatly appreciated.



  • Can you try running the video example from the ketai library and see if it is working?


  • Ok, NM on getting the lib installed. Just dropped the unzipped folder downloaded from here:

    Into the libraries folder as usual.

    Still having trouble getting it to playback media though.

  • I'll take a look at Ketai next. Hoping to get the Processing Video Android working first as it has a similar syntax to the native Video lib. Might be that it doesn't like WebM format...

  • edited May 2017

    @kfrajer Just gave the Ketai lib a spin and the Camera example it comes with fails on my setup with:

    FATAL EXCEPTION: main Process: processing.test.cameragettingstarted, PID: 15824 java.lang.RuntimeException: Unable to start activity ComponentInfo{processing.test.cameragettingstarted/processing.test.cameragettingstarted.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at at at$800( at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke( at$ at Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at at at at at processing.test.cameragettingstarted.MainActivity.onCreate( at at at ... 10 more

  • I am sure if you use Android mode version 3.0.2, ketai will work. Ketai needs to be fixed for the latest Android mode and at this point I am not sure if the library is being maintained or if anybody has filed an issue. I can try to figure out what is going on but unfortunately it looks more like Friday or this weekend. On the other hand, you can explore previous posts and try getting the camera API using Native Android code as described by the Android Developer's website. I believe there was a recent post were a couple of people were showing some code using the Camera2 library.


  • @kfrajer Thanks so much for the info.

    Might be helpful if I described what my end goal is. Basically trying to create a 360 video player for Cardboard (VR). To that end I've got the most current pre-release Android Mode which supports VR out of the box.

    So far I've been able to create a sphere with proper UV coordinates etc. and can load a still image that has equirectangular distortion and it looks great inside the Cardboard headset running on a Moto X.

    Trouble comes when trying to play a Movie as a texture, as described above. You're probably correct that these video libraries require 3.x to run, however 4.x is required for Cardboard.

    All that said what would be ideal is for Android mode to have a "native" video library that mimics the API of the video lib that ships with Processing 3.

    While attempting to get this to work in Processing I've also been attempting the same thing using Unity3D. As it turns out videos can't be used as textures in either Android or iOS. Guessing the logic behind this is similar to why you can't autoplay a video in web apps on mobile OSs (battery life, data charges etc.).

  • @grauwald===

    the error code you put is for changing your theme app in the manifest. Easy to do.

    then i think that the best solution for video is android Camera API...

Sign In or Register to comment.