Current state of video library support

Anyone have any knowledge on video support for Android mode?

This library seems to be the thing:

https://github.com/omerjerk/processing-video-android

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.

Tagged:

Answers

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

    Kf

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

    https://github.com/omerjerk/processing-video-android/releases

    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 17

    @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 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:355) at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:324) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:294) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:150) at processing.test.cameragettingstarted.MainActivity.onCreate(MainActivity.java:20) at android.app.Activity.performCreate(Activity.java:6010) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292) ... 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.

    Kf

  • @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.