-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoder init failed #291
Comments
Instead of using videos in my server , I tried to play a random mp4 and its working. Here is my vid capturing parameters: mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
if(currentCameraId== Camera.CameraInfo.CAMERA_FACING_BACK){
mMediaRecorder.setOrientationHint(90);}
else{
mMediaRecorder.setOrientationHint(270);
}
mMediaRecorder.setVideoSize(list.get(sizex).width, list.get(sizex).height);
mMediaRecorder.setVideoEncodingBitRate(1500000);
mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mMediaRecorder.setVideoFrameRate(30);
mMediaRecorder.setOutputFile(getVidFile().getAbsolutePath()); Is there anything wrong with these? |
Are you attempting to play multiple items simultaneously? (see google/ExoPlayer#1286) |
No Brian im not attempting to play multiple videos simultaneously . Just one emvideoview and one video url at once. Again , i didnt provide the code because its very simple , getting an instance of your videoview , setting the uri and listener and start() |
The problem is the particular format that is being generated by the MediaRecorder. I don't know too much about that class but I know that others have played videos recorded with the camera before. If you look in to the VideoDecoder Exception it will probably tell you which specific part of the format you have specified it doesn't like (it may be the bitrate?). |
I had already played around with those methods and parameters . none works . I guess the issue is with my device |
Brian is it possible that the videos are encoded in H264 Main Profile? Maybe that is the reason they can't be played on mobile devices. How can I check if it's encoded in main or baseline profile? |
I encountered the same problem, I used
Here is my stack trace: 08-15 16:17:54.966 15730-24925/com.machipopo.swag I/ACodec: [] Now uninitialized
08-15 16:17:54.971 15730-24949/com.machipopo.swag I/OMXClient: Using client-side OMX mux.
08-15 16:17:54.971 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Loaded
08-15 16:17:54.971 15730-24949/com.machipopo.swag E/ACodec: [OMX.SEC.avc.dec] storeMetaDataInBuffers failed w/ err -2147483648
08-15 16:17:54.976 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Loaded->Idle
08-15 16:17:54.976 15730-24949/com.machipopo.swag E/ACodec: ## 3d, eNativeColorFormat 0x15
08-15 16:17:54.976 15730-24949/com.machipopo.swag E/ACodec: ## 3d, eNativeColorFormat 0x105
08-15 16:17:54.976 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Allocating 6 buffers from a native window of size 1392640 on output port
08-15 16:17:55.031 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Idle->Executing
08-15 16:17:55.031 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Executing
08-15 16:17:58.806 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Executing->Idle
08-15 16:17:58.826 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Idle->Loaded
08-15 16:17:58.826 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Loaded
08-15 16:17:58.836 15730-24949/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now uninitialized
08-15 16:17:58.841 15730-24934/com.machipopo.swag I/ACodec: [OMX.SEC.aac.dec] Now Executing->Idle
08-15 16:17:58.846 15730-24934/com.machipopo.swag I/ACodec: [OMX.SEC.aac.dec] Now Idle->Loaded
08-15 16:17:58.851 15730-24934/com.machipopo.swag I/ACodec: [OMX.SEC.aac.dec] Now Loaded
08-15 16:17:58.851 15730-24934/com.machipopo.swag I/ACodec: [OMX.SEC.aac.dec] Now uninitialized
08-15 16:17:58.921 15730-24925/com.machipopo.swag I/ACodec: [] Now uninitialized
08-15 16:17:58.926 15730-25015/com.machipopo.swag I/OMXClient: Using client-side OMX mux.
08-15 16:17:58.941 15730-25014/com.machipopo.swag E/BufferQueue: [unnamed-15730-1] connect: already connected (cur=1, req=3)
08-15 16:17:58.941 15730-25014/com.machipopo.swag E/MediaCodec: native_window_api_connect returned an error: Invalid argument (-22)
08-15 16:17:58.946 15730-25015/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now Loaded
08-15 16:17:58.951 15730-24925/com.machipopo.swag E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.MediaCodecTrackRenderer$DecoderInitializationException: Decoder init failed: OMX.SEC.avc.dec, MediaFormat(1, video/avc, -1, 19118, 1280, 720, 90, 1.0, -1, -1, null, 3702000, false, -1, -1, -1, -1, -1)
at com.google.android.exoplayer.MediaCodecTrackRenderer.notifyAndThrowDecoderInitError(MediaCodecTrackRenderer.java:427)
at com.google.android.exoplayer.MediaCodecTrackRenderer.maybeInitCodec(MediaCodecTrackRenderer.java:413)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onInputFormatChanged(MediaCodecTrackRenderer.java:797)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onInputFormatChanged(MediaCodecVideoTrackRenderer.java:333)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:540)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:128)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:432)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by: com.google.android.exoplayer.MediaCodecTrackRenderer$DecoderInitializationException: Decoder init failed: OMX.SEC.avc.dec, MediaFormat(1, video/avc, -1, 19118, 1280, 720, 90, 1.0, -1, -1, null, 3702000, false, -1, -1, -1, -1, -1)
at com.google.android.exoplayer.MediaCodecTrackRenderer.maybeInitCodec(MediaCodecTrackRenderer.java:413)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onInputFormatChanged(MediaCodecTrackRenderer.java:797)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onInputFormatChanged(MediaCodecVideoTrackRenderer.java:333)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:540)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:128)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:432)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by: java.lang.IllegalStateException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:262)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.configureCodec(MediaCodecVideoTrackRenderer.java:328)
at com.google.android.exoplayer.MediaCodecTrackRenderer.maybeInitCodec(MediaCodecTrackRenderer.java:402)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onInputFormatChanged(MediaCodecTrackRenderer.java:797)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onInputFormatChanged(MediaCodecVideoTrackRenderer.java:333)
at com.google.android.exoplayer.MediaCodecTrackRenderer.readFormat(MediaCodecTrackRenderer.java:540)
at com.google.android.exoplayer.MediaCodecTrackRenderer.doSomeWork(MediaCodecTrackRenderer.java:523)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:128)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:432)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
08-15 16:17:58.956 15730-25015/com.machipopo.swag I/ACodec: [OMX.SEC.avc.dec] Now uninitialized |
Hmm, I wonder if the newest ExoPlayer fixes this (I meant to update to it this weekend) |
Would both of you mind testing with |
OK, I'll update to |
It seems not work for |
The same issue with @enginebai, it failed to restart the video on device randomly. ExoMedia version: 3.0.2 && 3.1.0 (both of them have been tried.) log file attached. |
For the case When the progress of playing video (0 ~ 1) is greater or equal to 0.995, I will call |
Because this looks like an ExoPlayer (v1) issue I'm going to close it as ExoMedia v4 will be using ExoPlayer v2 |
Include the following:
3.0.1
5.0
Asus
Zenfone2
Reproduction Steps
Dunno what this means , poor english x(. I think this library is exactly what I am looking for. So any help is appreciated
Expected Result
Play videos in my app which are stored in my server , sent there using the same app ( custom camera)
btw I'm not coding some hardcore stuff , just a simple video play. Like shown in main page of this library.
Actual Result
Actual result is I get this long-4ss error:
The text was updated successfully, but these errors were encountered: