简体   繁体   中英

Multiple instances of MediaCodec used as video encoder in Android

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM