Comments (9)
I'm not sure which one but it crashed in the MediaEncoder class in the drain()
encoderStatus = mMediaCodec.dequeueOutputBuffer(mBufferInfo, TIMEOUT_USEC);
It was recording around 2 minutes when it crashed.
from audiovideorecordingsample.
Could you confirm which MediaCodec crash, for audio or for video?
Did you see other errors before above log? Tag may be ACodec
.
MediaCodec usually throws IllegalStateException
when the instance did not correctly initialize/prepare or is not in Executing state or configured in asynchronous mode.
But your log shows the state is state 6
(=STARTED), so MediaCodec is started.
from audiovideorecordingsample.
Observed the same crash trace at my end. As per the trace it happens on doing drain() after signalEndOfInputStream(). This is not OS specific. @saki4510t Any help/pointers would be highly appreciated.
Thanks
from audiovideorecordingsample.
Thanks for this great lib! We got this from crashlytics.
from audiovideorecordingsample.
same problem
from audiovideorecordingsample.
Recording fails to start on KitKat 4.4 (Samsuns GT-9070), some audio error
09-20 22:02:17.636 16238-16238/com.testaudiovideosample E/dalvikvm: Could not find class 'android.support.v4.app.ActivityCompat$SharedElementCallback21Impl', referenced from method android.support.v4.app.ActivityCompat.setExitSharedElementCallback
09-20 22:02:29.788 16238-16238/com.testaudiovideosample E/VideoRecorder-VideoRecorder: startEncoder:begin
09-20 22:02:29.798 16238-16331/com.testaudiovideosample E/VideoRecorder-VideoRecorder: startEncoder:begin
09-20 22:02:29.938 16238-16331/com.testaudiovideosample E/VideoRecorder-VideoRecorder: supportedType:OMX.ST.VFM.MPEG4Enc,MIME=video/3gpp
supportedType:OMX.ST.VFM.MPEG4Enc,MIME=video/mp4v-es
supportedType:OMX.ST.VFM.H264Enc,MIME=video/avc
supportedType:OMX.google.amrnb.encoder,MIME=audio/3gpp
supportedType:OMX.google.amrwb.encoder,MIME=audio/amr-wb
supportedType:OMX.google.aac.encoder,MIME=audio/mp4a-latm
selected codec: OMX.google.aac.encoder
format: {bitrate=64000, channel-count=1, aac-profile=2, mime=audio/mp4a-latm, sample-rate=44100, channel-mask=16}
09-20 22:02:30.729 16238-16339/com.testaudiovideosample E/BellagioCore: ST Static Component Loader : Cannot open OpenMAX registry file /tmp/.omxregister
09-20 22:02:30.739 16238-16339/com.testaudiovideosample E/BellagioCore: Component loader 1 constructor fails. Error= 0x80001000
09-20 22:02:30.769 16238-16331/com.testaudiovideosample E/VideoRecorder-VideoRecorder: prepare finishing
09-20 22:02:31.640 16238-16337/com.testaudiovideosample E/ACodec: OMX/mediaserver died, signalling error!
09-20 22:02:31.640 16238-16336/com.testaudiovideosample E/MediaCodec: Codec reported an error. (omx error 0x8000100d, internalError -32)
09-20 22:02:31.640 16238-16339/com.testaudiovideosample E/ACodec: OMX/mediaserver died, signalling error!
09-20 22:02:31.640 16238-16339/com.testaudiovideosample E/MediaCodec: Codec reported an error. (omx error 0x8000100d, internalError -32)
09-20 22:02:31.640 16238-16259/com.testaudiovideosample E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -32
09-20 22:02:31.640 16238-16259/com.testaudiovideosample E/[EGL-ERROR]: void __egl_platform_queue_buffer(mali_base_ctx_handle, egl_buffer*):1122: unable to queue buffer (0x52ac32ac)
09-20 22:02:31.650 16238-16258/com.testaudiovideosample E/Camera: Error 100
09-20 22:02:37.495 16238-16343/com.testaudiovideosample E/VideoRecorder: AudioThread#run
java.lang.IllegalStateException
at android.media.MediaCodec.getBuffers(Native Method)
at android.media.MediaCodec.getInputBuffers(MediaCodec.java:542)
at com.erlei.videorecorder.encoder.MediaEncoder.encode(MediaEncoder.java:249)
at com.erlei.videorecorder.encoder.MediaAudioEncoder$AudioThread.run(MediaAudioEncoder.java:154)
from audiovideorecordingsample.
I also have the same Issue on android 5.1
08-08 16:11:15.598 20736-20736/com.w3saver.typography E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.w3saver.typography, PID: 20736
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
at com.w3saver.typography.RenderEngine.RenderEngine.drainEncoder(RenderEngine.java:161)
at com.w3saver.typography.RenderEngine.Renderer$2.run(Renderer.java:136)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
from audiovideorecordingsample.
I see the same issue in various Android versions and devices:
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2406)
at com.serenegiant.d.b.k(SourceFile:334)
at com.serenegiant.d.b.run(SourceFile:160)
at java.lang.Thread.run(Thread.java:833)
This appears to come from this line of code in MediaEncoder drain() method:
// get encoded data with maximum timeout duration of TIMEOUT_USEC(=10[msec])
encoderStatus = mMediaCodec.dequeueOutputBuffer(mBufferInfo, TIMEOUT_USEC);
Hope someone can help resolve this issue.
from audiovideorecordingsample.
getting the same issue, Any solution?
from audiovideorecordingsample.
Related Issues (20)
- Fatal Exception: java.lang.NullPointerException
- Fatal Exception: java.lang.IllegalStateException HOT 1
- java.util.concurrent.TimeoutException: android.media.MediaMuxer.finalize() timed out after 10 seconds
- How can I switch the camera? HOT 5
- Output video blemished
- The information of the recorded video is not correct .
- How can I change the video width and height.
- Is it possible to record byte[] frames or bitmaps?
- I am getting a lag in few phone HOT 1
- Camera is very Dark and sometimes bink white and normal
- The image in the file recorded with the front camera is mirrored.
- Modified code to switch camera, but when using back camera saved video is flipped
- Recording Audio Video data separately HOT 2
- How to add watermark image
- A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x66006600750042 in tid 22055 (MediaVideoEncod) HOT 1
- Why the bbp is 0.25f in MediaVideoEncoder
- How to achieve slow motion and time-lapse photography
- Audio is unsync recording in high resolution in slow devices
- if i have a call
- How can we save video file into multiple video's( .mp4 files) without stoping video encoder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audiovideorecordingsample.