Open Murph-Dev opened 5 years ago
On further examination I found that the video texture hits the onVideoFailed function. The error string reads as follows:
Decoder init failed: OMX.qcom.video.decoder.mpeg4, Format(1, null, video/mp4v-es, -1, null, [320, 180, -1.0], [-1, -1])
The video file I am trying to load is of .3gp format. Any help is appreciated.
These are the video formats Viro supports -> 'm4v', 'mov', 'mp4', 'mpeg', 'mpg', 'webm'
Can you try converting your .3gp video into something like mp4 and try to see if that works? Here is a link to some online video converter that might help -> https://www.lifewire.com/free-video-converter-programs-and-online-services-2622867
I converted the videos to mp4 and I am getting the same behavior.
2019-02-25 12:00:55.504 9646-9683/com.trekk.burpeemuseum I/ExoPlayerImpl: Init 4184eeb [ExoPlayerLib/2.7.1] [sailfish, Pixel, Google, 28]
2019-02-25 12:00:55.515 9646-9737/com.trekk.burpeemuseum W/GLConsumer: [SurfaceTexture--1-9646-0] bindTextureImage: clearing GL error: 0x501
2019-02-25 12:00:55.526 9646-9737/com.trekk.burpeemuseum I/Viro: AVPlayer reset
2019-02-25 12:00:55.532 9646-9737/com.trekk.burpeemuseum I/Viro: AVPlayer setting URL to [file:///android_asset/HOMER.mp4]
2019-02-25 12:00:55.533 9646-9737/com.trekk.burpeemuseum I/Viro: AVPlayer prepared for playback
2019-02-25 12:00:55.549 9646-9737/com.trekk.burpeemuseum W/GLConsumer: [SurfaceTexture--1-9646-0] bindTextureImage: clearing GL error: 0x501
2019-02-25 12:00:55.581 9646-10110/com.trekk.burpeemuseum I/OMXClient: IOmx service obtained
2019-02-25 12:00:55.583 9646-10110/com.trekk.burpeemuseum E/ACodec: Unable to instantiate codec 'OMX.qcom.video.decoder.avc' with err 0xfffffff4.
2019-02-25 12:00:55.583 9646-10110/com.trekk.burpeemuseum E/ACodec: signalError(omxError 0xfffffff4, internalError -12)
2019-02-25 12:00:55.583 9646-10109/com.trekk.burpeemuseum E/MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 1
2019-02-25 12:00:55.585 9646-9737/com.trekk.burpeemuseum W/GLConsumer: [SurfaceTexture--1-9646-0] bindTextureImage: clearing GL error: 0x501
2019-02-25 12:00:55.588 9646-10107/com.trekk.burpeemuseum W/MediaCodec-JNI: try to release MediaCodec from JMediaCodec::~JMediaCodec()...
2019-02-25 12:00:55.588 9646-10107/com.trekk.burpeemuseum W/MediaCodec-JNI: done releasing MediaCodec from JMediaCodec::~JMediaCodec().
2019-02-25 12:00:55.592 9646-10107/com.trekk.burpeemuseum E/ExoPlayerImplInternal: Playback error.
com.google.android.exoplayer2.ExoPlaybackException
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:420)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:407)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:898)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:468)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:551)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(1, null, video/avc, -1, null, [640, 360, -1.0], [-1, -1])
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:407)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:898)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:468)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:551)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1811)
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1792)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:394)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:898)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:468)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:551)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2019-02-25 12:00:55.597 9646-9646/com.trekk.burpeemuseum W/Viro: AVPlayer encountered error [com.google.android.exoplayer2.ExoPlaybackException]
com.google.android.exoplayer2.ExoPlaybackException
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:420)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:407)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:898)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:468)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:551)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(1, null, video/avc, -1, null, [640, 360, -1.0], [-1, -1])
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:407)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:898)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:468)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:551)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1811)
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1792)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:394)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:898)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:468)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:551)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Its the same few video textures that are failing to load video. Also your documentation states you support .3gp for video textures: Here
Environment
Please provide the following information about your environment:
Description
I am getting these errors in my Logcat when trying to create multiple Video Textures:
I have about 25 image targets that are supposed to play a video when found. (Note: I am only tracking 1 target at a time so there aren't multiple videos playing simultaneously) When the target is found, the video does not play. (Note: Only some of them fail to play. Not all of them.) Does anyone know how I can fix this problem?
Reproducible Demo
Here is what I am doing: In my onRenderCreate() function I am calling this function:
Here is the AugmentedVideo Class: