shiyinghan / UVCAndroid

Apache License 2.0
188 stars 51 forks source link

录像报错 #9

Closed liujie136918 closed 2 years ago

liujie136918 commented 2 years ago

我有三个usb摄像头,有一个录像的时候录不了,提示 The file has no video key frame,请帮忙看看是什么问题,谢谢 log.txt

shiyinghan commented 2 years ago

2022-08-24 15:12:01.710 357-16812/? E/MtkOmxVenc: [0xb17f5000] [ERROR] cannot support H.264 (1920x1080) encoder 2022-08-24 15:12:01.710 357-16812/? E/MtkOmxVenc: [0xb17f5000] [ERROR] cannot init encode driver 2022-08-24 15:12:01.711 16673-16800/com.herohan.uvcdemo E/ACodec: [OMX.MTK.VIDEO.ENCODER.AVC] ERROR(0x80001005) 2022-08-24 15:12:01.711 16673-16800/com.herohan.uvcdemo E/ACodec: signalError(omxError 0x80001005, internalError -2147483648) 2022-08-24 15:12:01.711 16673-16799/com.herohan.uvcdemo E/MediaCodec: Codec reported err 0x80001005, actionCode 0, while in state 6

根据日志来看,跟你用的设备有关系,你这个摄像头分辨率比较大(1920x1080),而你的设备上面的OMX框架实现不支持这么高的分辨率(录像会使用系统的MediaCodec,而MediaCodec实际是使用更底层的OMX框架来进行编码的)。

liujie136918 commented 2 years ago

嗯,刚刚已经解决了,我对设备录像时的分辨率做了限制,已经OK了,非常感谢!