Loading video not working

I’m trying to load a simple movie in my Android app.
Yesterday I did it easily, but today I cannot reproduce it. No way.
I’ve tried with default video example, and tried too adding my own video.

Stored in “bin/data/example.mp4”

Code:
player.loadMovie(“example.mp4”);
player.play();

Error:
12-18 14:56:49.560: E/Adreno-ES11(22785): <qglDrvAPI_glGetString:619>: GL_INVALID_ENUM
12-18 14:56:49.560: I/ofAppAndroidWindow(22785): setup
12-18 14:56:49.570: E/MediaPlayer(22785): error (1, -2147483648)
12-18 14:56:49.570: E/OF(22785): couldn’t load /storage/emulated/0/Android/data/cc.openframeworks.androidVideoExample/example.mp4
12-18 14:56:49.570: E/OF(22785): java.io.IOException: Prepare failed.: status=0x1
12-18 14:56:49.570: E/OF(22785): at android.media.MediaPlayer.prepare(Native Method)
12-18 14:56:49.570: E/OF(22785): at cc.openframeworks.OFAndroidVideoPlayer.loadMovie(OFAndroidVideoPlayer.java:102)
12-18 14:56:49.570: E/OF(22785): at cc.openframeworks.OFAndroid.setup(Native Method)
12-18 14:56:49.570: E/OF(22785): at cc.openframeworks.OFAndroidWindow.setup(OFAndroidWindow.java:290)
12-18 14:56:49.570: E/OF(22785): at cc.openframeworks.OFAndroidWindow.onSurfaceChanged(OFAndroidWindow.java:282)
12-18 14:56:49.570: E/OF(22785): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1512)
12-18 14:56:49.570: E/OF(22785): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
12-18 14:56:49.580: E/OF(22785): ofxAndroidVideo::play - movie not loaded!
12-18 14:56:49.580: E/ofTexture(22785): release(): something’s wrong here, releasing unknown texture id 1

It should be really simple… but stills not working.
The other examples are working too.

from the path of the video it seems like you are using cyanogen mod? some times the sdcard path gets broken and you need to restart the phone

Nop, Nexus 5, Kitkat.
And after reset still not working.

And in other device HTC Desire X, it crashes without executing:

Failed to install androidVideoExample.apk on device 'HT2B8LY01300!
[2013-12-18 16:00:06 - androidVideoExample] (null)
[2013-12-18 16:00:06 - androidVideoExample] Launch canceled!

i’ve done some changes to how resources are uncompressed in github, there’s still somethings that i haven’t uploaded but if you can try with the github version or a nightly build?

also if you can post the log before that? there should show if the resources were copied to the sdcard succesfully

Hi, I’m GarethSadow from a team mate account.

We have downloaded the latest version in github, master branch.
And we are getting the same error.

I’m attaching the whole trace, but we have looked at mobile SD, and no files are copied there.

To be sure we are doing it well…
We are adding the video file to /bin/data/example.mp4.
It creates a file named /res/raw/androidvideoexamplesource.zip.
Is it correct right?

UPDATED

Sorry, but the error trace was wrongly shown.
By the way, we have copied an static video directly to SD, and it works.
So the problem is that is not copying the video to SD.

12-19 10:21:05.532: E/Trace(7395): error opening trace file: No such file or directory (2)
12-19 10:21:06.302: I/OF(7395): static init
12-19 10:21:06.302: D/dalvikvm(7395): Trying to load lib /mnt/asec/cc.openframeworks.androidVideoExample-1/lib/libneondetection.so 0x410480f0
12-19 10:21:06.312: D/dalvikvm(7395): Added shared lib /mnt/asec/cc.openframeworks.androidVideoExample-1/lib/libneondetection.so 0x410480f0
12-19 10:21:06.312: D/dalvikvm(7395): No JNI_OnLoad found in /mnt/asec/cc.openframeworks.androidVideoExample-1/lib/libneondetection.so 0x410480f0, skipping init
12-19 10:21:06.312: I/OF(7395): loading neon optimized library
12-19 10:21:06.312: D/dalvikvm(7395): Trying to load lib /mnt/asec/cc.openframeworks.androidVideoExample-1/lib/libOFAndroidApp_neon.so 0x410480f0
12-19 10:21:09.997: D/dalvikvm(7395): Added shared lib /mnt/asec/cc.openframeworks.androidVideoExample-1/lib/libOFAndroidApp_neon.so 0x410480f0
12-19 10:21:09.997: I/(7395): JNI_OnLoad called
12-19 10:21:09.997: I/OF(7395): initializing app
12-19 10:21:09.997: I/OF(7395): OFAndorid init…
12-19 10:21:10.007: I/OF(7395): starting resources extractor
12-19 10:21:10.022: I/OF(7395): joining
12-19 10:21:10.152: D/dalvikvm(7395): GC_CONCURRENT freed 102K, 12% free 2556K/2900K, paused 52ms+30ms, total 96ms
12-19 10:21:11.232: D/dalvikvm(7395): GC_FOR_ALLOC freed 101K, 12% free 2742K/3088K, paused 213ms, total 217ms
12-19 10:21:11.232: I/dalvikvm-heap(7395): Grow heap (frag case) to 3.905MB for 1048592-byte allocation
12-19 10:21:11.262: D/dalvikvm(7395): GC_FOR_ALLOC freed 3K, 9% free 3762K/4116K, paused 26ms, total 26ms
12-19 10:21:11.607: D/dalvikvm(7395): GC_CONCURRENT freed < 1K, 9% free 3770K/4116K, paused 3ms+322ms, total 348ms
12-19 10:21:11.632: V/OF(7395): trying to find class: cc.openframeworks.androidVideoExample.R$layout
12-19 10:21:11.687: I/OF(7395): onResume
12-19 10:21:11.962: D/libEGL(7395): loaded /system/lib/egl/libEGL_mali.so
12-19 10:21:12.402: D/libEGL(7395): loaded /system/lib/egl/libGLESv1_CM_mali.so
12-19 10:21:12.407: D/libEGL(7395): loaded /system/lib/egl/libGLESv2_mali.so
12-19 10:21:12.417: E/(7395): Device driver API match
12-19 10:21:12.417: E/(7395): Device driver API version: 17
12-19 10:21:12.417: E/(7395): User space API version: 17
12-19 10:21:12.427: E/(7395): mali: REVISION=Linux-r3p1-01rel1 BUILD_DATE=Tue Jul 2 15:06:24 KST 2013
12-19 10:21:12.627: D/OpenGLRenderer(7395): Enabling debug mode 0
12-19 10:21:12.697: I/Choreographer(7395): Skipped 58 frames! The application may be doing too much work on its main thread.
12-19 10:21:13.067: I/OF(7395): onSurfaceCreated
12-19 10:21:13.067: I/ofAppAndroidWindow(7395): resize 480x690
12-19 10:21:17.517: I/OF(7395): sd mounted: true
12-19 10:21:17.522: I/OF(7395): creating app directory: /storage/sdcard0/Android/data/cc.openframeworks.androidVideoExample
12-19 10:21:17.562: I/ofAppAndroidWindow(7395): setting app dir name to: “/storage/sdcard0/Android/data/cc.openframeworks.androidVideoExample”
12-19 10:21:17.562: I/OF(7395): app name: androidVideoExample
12-19 10:21:17.562: I/OF(7395): checking /androidvideoexampleresources.zip
12-19 10:21:17.562: I/OF(7395): joined
12-19 10:21:17.577: I/ofAppAndroidWindow(7395): setup
12-19 10:21:17.962: E/MediaPlayer(7395): error (1, -2147483648)
12-19 10:21:17.977: E/OF(7395): couldn’t load /storage/sdcard0/Android/data/cc.openframeworks.androidVideoExample/solvia.mp4
12-19 10:21:17.977: E/OF(7395): java.io.IOException: Prepare failed.: status=0x1
12-19 10:21:17.977: E/OF(7395): at android.media.MediaPlayer.prepare(Native Method)
12-19 10:21:17.977: E/OF(7395): at cc.openframeworks.OFAndroidVideoPlayer.loadMovie(OFAndroidVideoPlayer.java:102)
12-19 10:21:17.977: E/OF(7395): at cc.openframeworks.OFAndroid.setup(Native Method)
12-19 10:21:17.977: E/OF(7395): at cc.openframeworks.OFAndroidWindow.setup(OFAndroidWindow.java:290)
12-19 10:21:17.977: E/OF(7395): at cc.openframeworks.OFAndroidWindow.onDrawFrame(OFAndroidWindow.java:307)
12-19 10:21:17.977: E/OF(7395): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
12-19 10:21:17.977: E/OF(7395): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
12-19 10:21:17.982: E/OF(7395): ofxAndroidVideo::play - movie not loaded!
12-19 10:21:43.292: I/OF(7395): onPause
12-19 10:21:43.312: E/MediaPlayer(7395): stop called in state 0
12-19 10:21:43.312: E/MediaPlayer(7395): error (-38, 0)
12-19 10:21:43.362: W/MediaPlayer(7395): mediaplayer went away with unhandled events
12-19 10:21:43.602: I/ofAppAndroidWindow(7395): onSurfaceDestroyed

i’ve uploaded to github the latest changes that i had for uncompressing resources, if you can try that?