Telegram use MeidaCodec
to encode video from Android API 16. It works fine from API 18. But there are an error in API 16, 17. Video encoded and sent from Android cannot be played in iOS.
I think the problem is in process converting color between output of decoder codec and input of encoder codec.
https://github.com/DrKLO/Telegram/blob/2114024ab1d9cf209916bcdb3a4a7d44e51a3b0c/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java#L3223
My application currently uses ffmpeg
to encode video. But it's too slow. MediaCodec
is much faster than ffmpeg
. But it only works well from API 18.
Can anyone solve the problem video cannot be played in iOS? Thanks.