Skip to content

E/AndroidRuntime: FATAL EXCEPTION #10

@petered

Description

@petered

I get a fatal error when trying to run this:

        val encoder=MP4Encoder().apply{
            setFrameDelay(50)
            setOutputFilePath(getVideoFile(baseDir).path)  // Comes from File(baseDir.getExternalFilesDir(null) + "/XXXX.mp4")
            val firstbmp: Bitmap = ... // (A 68x68 bitmap)
            setOutputSize(firstbmp.width, firstbmp.height). // It's 68x68 pixels
        }
        encoder.startEncode()  // <--- This live throws error
E/AndroidRuntime: FATAL EXCEPTION: Thread-260
    Process: com.dji.videostreamdecodingsample, PID: 14942
    android.media.MediaCodec$CodecException: Error 0xfffffc0e
        at android.media.MediaCodec.native_configure(Native Method)
        at android.media.MediaCodec.configure(MediaCodec.java:2127)
        at android.media.MediaCodec.configure(MediaCodec.java:2043)
        at com.ctech.bitmp4.MP4Encoder.onStart(MP4Encoder.java:67)
        at com.ctech.bitmp4.Encoder.startEncode(Encoder.java:107)
        at com.dji.videostreamdecodingsample.DetectionRecord.saveVideoFile(DetectionRecord.kt:144)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions