Multiple instances of MediaCodec used as video encoder in Android

佐手、 提交于 2019-12-18 04:24:17

问题


Is it possible to use two Android MediaCodec instances as video encoder to encode two videos simultaneously?

I know that MediaCodec itself can have multiple instances, for video/audio encoding/decoding. But is there any restriction on hardware/Android version on encoding multiple videos, besides the impact of performance?

More specifically, if considering only Android version 4.3 or higher, is multiple instances of video encoder valid or still be device-dependent?


回答1:


From my experience it completely depends on a device. And there are devices that are able to support only one instance of video encoder in one time




回答2:


Yes, like what @Marlon said, it totally depends on what device you used. For example, I use OPPO A39 which can only create 8 mediacodec instance at the same time.



来源:https://stackoverflow.com/questions/24602662/multiple-instances-of-mediacodec-used-as-video-encoder-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!