Giter VIP home page Giter VIP logo

Comments (9)

ToysoftInc avatar ToysoftInc commented on June 20, 2024 1

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.

saki4510t avatar saki4510t commented on June 20, 2024

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.

atul-bsb avatar atul-bsb commented on June 20, 2024

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.

RockyLin avatar RockyLin commented on June 20, 2024

@saki4510t

Thanks for this great lib! We got this from crashlytics.

Device:SM-G386T1,
OS:4.4.2
screen shot 2017-01-04 at 9 39 18 pm

screen shot 2017-01-04 at 9 41 50 pm

from audiovideorecordingsample.

ashishvirani avatar ashishvirani commented on June 20, 2024

same problem

from audiovideorecordingsample.

anonym24 avatar anonym24 commented on June 20, 2024

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.

kartik1225 avatar kartik1225 commented on June 20, 2024

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.

aruproy avatar aruproy commented on June 20, 2024

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.

shivangbtech avatar shivangbtech commented on June 20, 2024

getting the same issue, Any solution?

from audiovideorecordingsample.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.