Can't play video on android 4.4.2 / imx6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't play video on android 4.4.2 / imx6

Jump to solution
51,070 Views
oussama
Contributor III

I'm not able to play video on android 4.4.2 on imx6q board, although I'm able to play video with the command line in h264 raw format  "mxc-vpu-test -D "-i /clip.raw.h264 -f2"

If I try to open a video with the android Video player (h264 or mpeg4 codec encapsulated in mp4), it says "can't play this video".

the logcat shows some errors. Here's the most relevant:

E/BufferQueue( 2230): [com.android.gallery3d/com.android.gallery3d.app.MovieActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2978): Displayed com.android.gallery3d/.app.MovieActivity: +226ms

E/MediaPlayer( 3731): error (1, -2147483648)

E/MediaPlayer( 3731): Error (1,-2147483648)

D/VideoView( 3731): Error: 1,-2147483648

D/dalvikvm( 3731): GC_FOR_ALLOC freed 832K, 23% free 3174K/4084K, paused 16ms, total 16ms

E/BufferQueue( 2230): [com.android.gallery3d/com.android.gallery3d.app.MovieActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

Installing the CactusPlayer by reverting the relevant patch does not help as well.

Labels (4)
0 Kudos
1 Solution
3,034 Views
oussama
Contributor III

I solved the issue. The files media_codecs.xml  and media_profiles.xml  were not installed.

View solution in original post

0 Kudos
9 Replies
3,035 Views
oussama
Contributor III

I solved the issue. The files media_codecs.xml  and media_profiles.xml  were not installed.

0 Kudos
3,034 Views
saurabh206
Senior Contributor III

Hi

Can you try to disable OMX framework and enable the stagefright?

setprop media.omxgm.enable-player 0

Thanks

Saurabh

3,034 Views
oussama
Contributor III

Hi,

It does not help. I still cannot play video.

Also the error in log does not seems to change.

Thanks

Oussama

0 Kudos
3,034 Views
oussama
Contributor III

In the imx6qd.mk I have the following include:

-include external/fsl_vpu_omx/codec_env.mk (Initialize HAVE_FSL_IMX_CODEC to false)

-include external/fsl_imx_omx/codec_env.mk (Does not exist!)

Is this is normal?

0 Kudos
3,034 Views
saurabh206
Senior Contributor III

Hi

Can you check Audio content of the video file?

Thanks

Saurabh

0 Kudos
3,034 Views
oussama
Contributor III

Hi,

What to check exactly? otherwise here's some info.

The audio coded is "MPEG-4 AAC audio" sampled at 44100 HZ.

For the moment i do not expect the audio to work properly. and here's full log that contains audio error:

I/ActivityManager( 2978): START u0 {act=android.intent.action.VIEW dat=file:///Wildlife_512kb.mp4 typ=video/mp4 flg=0x4000000 cmp=com.android.gallery3d/.app.MovieActivity (has extras)} from pid 3583

E/AudioCache( 2233): Error 1, -2147483648 occurred

E/SoundPool( 2978): Unable to load sample: (null)

W/AudioService( 2978): onLoadSoundEffects(), Error -22 while loading samples

E/AudioCache( 2233): Error 1, -2147483648 occurred

E/SoundPool( 2978): Unable to load sample: (null)

E/CacheManager( 3731): Cannot instantiate cache!

E/CacheManager( 3731): java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.android.gallery3d/cache/bookmark.idx: open failed: EACCES (Permission denied)

E/CacheManager( 3731): at libcore.io.IoBridge.open(IoBridge.java:409)

E/CacheManager( 3731): at java.io.RandomAccessFile.<init>(RandomAccessFile.java:118)

E/CacheManager( 3731): at java.io.RandomAccessFile.<init>(RandomAccessFile.java:150)

E/CacheManager( 3731): at com.android.gallery3d.common.BlobCache.<init>(BlobCache.java:140)

E/CacheManager( 3731): at com.android.gallery3d.util.CacheManager.getCache(CacheManager.java:51)

E/CacheManager( 3731): at com.android.gallery3d.app.Bookmarker.getBookmark(MoviePlayer.java:518)

E/CacheManager( 3731): at com.android.gallery3d.app.MoviePlayer.<init>(MoviePlayer.java:196)

E/CacheManager( 3731): at com.android.gallery3d.app.MovieActivity$1.<init>(MovieActivity.java:92)

E/CacheManager( 3731): at com.android.gallery3d.app.MovieActivity.onCreate(MovieActivity.java:91)

E/CacheManager( 3731): at android.app.Activity.performCreate(Activity.java:5231)

E/CacheManager( 3731): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)

E/CacheManager( 3731): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)

E/CacheManager( 3731): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)

E/CacheManager( 3731): at android.app.ActivityThread.access$800(ActivityThread.java:135)

E/CacheManager( 3731): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)

E/CacheManager( 3731): at android.os.Handler.dispatchMessage(Handler.java:102)

E/CacheManager( 3731): at android.os.Looper.loop(Looper.java:136)

E/CacheManager( 3731): at android.app.ActivityThread.main(ActivityThread.java:5017)

E/CacheManager( 3731): at java.lang.reflect.Method.invokeNative(Native Method)

E/CacheManager( 3731): at java.lang.reflect.Method.invoke(Method.java:515)

E/CacheManager( 3731): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)

E/CacheManager( 3731): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

E/CacheManager( 3731): at dalvik.system.NativeStart.main(Native Method)

E/CacheManager( 3731): Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)

E/CacheManager( 3731): at libcore.io.Posix.open(Native Method)

E/CacheManager( 3731): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)

E/CacheManager( 3731): at libcore.io.IoBridge.open(IoBridge.java:393)

E/CacheManager( 3731): ... 22 more

W/Bookmarker( 3731): getBookmark failed

W/Bookmarker( 3731): java.lang.NullPointerException

W/Bookmarker( 3731): at com.android.gallery3d.app.Bookmarker.getBookmark(MoviePlayer.java:522)

W/Bookmarker( 3731): at com.android.gallery3d.app.MoviePlayer.<init>(MoviePlayer.java:196)

W/Bookmarker( 3731): at com.android.gallery3d.app.MovieActivity$1.<init>(MovieActivity.java:92)

W/Bookmarker( 3731): at com.android.gallery3d.app.MovieActivity.onCreate(MovieActivity.java:91)

W/Bookmarker( 3731): at android.app.Activity.performCreate(Activity.java:5231)

W/Bookmarker( 3731): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)

W/Bookmarker( 3731): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)

W/Bookmarker( 3731): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)

W/Bookmarker( 3731): at android.app.ActivityThread.access$800(ActivityThread.java:135)

W/Bookmarker( 3731): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)

W/Bookmarker( 3731): at android.os.Handler.dispatchMessage(Handler.java:102)

W/Bookmarker( 3731): at android.os.Looper.loop(Looper.java:136)

W/Bookmarker( 3731): at android.app.ActivityThread.main(ActivityThread.java:5017)

W/Bookmarker( 3731): at java.lang.reflect.Method.invokeNative(Native Method)

W/Bookmarker( 3731): at java.lang.reflect.Method.invoke(Method.java:515)

W/Bookmarker( 3731): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)

W/Bookmarker( 3731): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

W/Bookmarker( 3731): at dalvik.system.NativeStart.main(Native Method)

I/MediaFocusControl( 2978):  AudioFocus  requestAudioFocus() from android.media.AudioManager@2c539358

E/BufferQueue( 2230): [com.android.gallery3d/com.android.gallery3d.app.MovieActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I/ActivityManager( 2978): Displayed com.android.gallery3d/.app.MovieActivity: +226ms

E/MediaPlayer( 3731): error (1, -2147483648)

E/MediaPlayer( 3731): Error (1,-2147483648)

D/VideoView( 3731): Error: 1,-2147483648

D/dalvikvm( 3731): GC_FOR_ALLOC freed 832K, 23% free 3174K/4084K, paused 16ms, total 16ms

E/BufferQueue( 2230): [com.android.gallery3d/com.android.gallery3d.app.MovieActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

Thanks,

Oussama

0 Kudos
3,034 Views
saurabh206
Senior Contributor III

If audio failed than video playback is also failed in OMXFrameworks.

I suggest please try  video only file.

0 Kudos
3,034 Views
oussama
Contributor III

Video only file does not work too. however I'm still getting the audio error even there is no audio in the file

0 Kudos
3,034 Views
oussama
Contributor III

I get permission error from android when I try to open a file from the browser.

W/ServiceManager( 2348): Permission failure: android.permission.INTERNET from uid=10034 pid=3809

E/MediaPlayerService( 2348): Request requires android.permission.INTERNET

E/MediaPlayer( 3809): Unable to create media player

W/Cactus  ( 3809): Unable to open content: http://192.168.1.10:8000/video_only.mp4

I fixed  the permission error by adding the requested permission in AndroidManifest.xml file and recompile the app.

But then I got the following error:

D/Cactus  (14747): VideoPlayer: onCreate

D/Cactus  (14747): VideoPlayer: parseIntent

D/Cactus  (14747): VideoPlayer: onStart

D/Cactus  (14747): VideoPlayer: onResume

D/CactusPlayer(14747): onMeasure mVideoW 0 mVideoH 0 widthMesaureSpec 1073742582 heightMeasureSpec 1073742239

D/libEGL  (14747): loaded /system/lib/egl/libEGL_VIVANTE.so

D/libEGL  (14747): loaded /system/lib/egl/libGLESv1_CM_VIVANTE.so

D/libEGL  (14747): loaded /system/lib/egl/libGLESv2_VIVANTE.so

E/BufferQueue(12622): [com.freescale.cactusplayer/com.freescale.cactusplayer.VideoPlayer] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

D/OpenGLRenderer(14747): Enabling debug mode 0

D/Cactus  (14747): surfaceCreated

I/AwesomePlayer(12626): setDataSource_l(URL suppressed)

W/Cactus  (14747): Url is http://192.168.1.10:8000/video_only.mp4

D/AndroidRuntime(14747): Shutting down VM

W/dalvikvm(14747): threadid=1: thread exiting with uncaught exception (group=0x2caf2ba8)

E/AndroidRuntime(14747): FATAL EXCEPTION: main

E/AndroidRuntime(14747): Process: com.freescale.cactusplayer, PID: 14747

E/AndroidRuntime(14747): java.lang.NullPointerException

E/AndroidRuntime(14747): at com.freescale.cactusplayer.VideoPlayer.play(VideoPlayer.java:697)

E/AndroidRuntime(14747): at com.freescale.cactusplayer.VideoPlayer.surfaceCreated(VideoPlayer.java:1061)

E/AndroidRuntime(14747): at android.view.SurfaceView.updateWindow(SurfaceView.java:572)

E/AndroidRuntime(14747): at android.view.SurfaceView.access$000(SurfaceView.java:86)

E/AndroidRuntime(14747): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:175)

E/AndroidRuntime(14747): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847)

E/AndroidRuntime(14747): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1871)

E/AndroidRuntime(14747): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)

E/AndroidRuntime(14747): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)

E/AndroidRuntime(14747): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)

E/AndroidRuntime(14747): at android.view.Choreographer.doCallbacks(Choreographer.java:574)

E/AndroidRuntime(14747): at android.view.Choreographer.doFrame(Choreographer.java:544)

E/AndroidRuntime(14747): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)

E/AndroidRuntime(14747): at android.os.Handler.handleCallback(Handler.java:733)

E/AndroidRuntime(14747): at android.os.Handler.dispatchMessage(Handler.java:95)

E/AndroidRuntime(14747): at android.os.Looper.loop(Looper.java:136)

E/AndroidRuntime(14747): at android.app.ActivityThread.main(ActivityThread.java:5017)

E/AndroidRuntime(14747): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime(14747): at java.lang.reflect.Method.invoke(Method.java:515)

E/AndroidRuntime(14747): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)

E/AndroidRuntime(14747): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

E/AndroidRuntime(14747): at dalvik.system.NativeStart.main(Native Method)

W/ActivityManager(13337):   Force finishing activity com.freescale.cactusplayer/.VideoPlayer

D/dalvikvm(14747): GC_CONCURRENT freed 110K, 6% free 3007K/3192K, paused 2ms+2ms, total 19ms

W/ActivityManager(13337): Activity pause timeout for ActivityRecord{2d0c27f8 u0 com.freescale.cactusplayer/.VideoPlayer t2 f}

D/WebViewTimersControl(14027): onBrowserActivityResume

D/WebViewTimersControl(14027): Resuming webview timers, view=com.android.browser.BrowserWebView{2cddc878 VFEDHVCL .F...... 0,0-758,403}

E/BufferQueue(12622): [com.android.browser/com.android.browser.BrowserActivity] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

D/dalvikvm(14027): GC_CONCURRENT freed 391K, 11% free 4248K/4768K, paused 3ms+4ms, total 25ms

I do not see VPU log... I'm not sure if this normal?

0 Kudos