Is hardware encoding of VP8/VP9 on Android with error resilience possible?

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I try to use the MediaCodec class to encode to VP8/VP9. Basically this works but transmitting the generated data using UDP results in many artifacts when decoding. This is because there is some packet loss.

I know vpxenc has an option to enable error resilience. Is there an option for this in MediaCodec? My hope is to reduce the artifacts. I have found the option KEY_INTRA_REFRESH_PERIOD but it seems not to be supported with VP8/VP9 on the device i tried.

My setup is: Sony Xperia XZ Premium (Qualcomm MSM8998 Snapdragon 835, Adreno 540). I use MediaCodec to encode VP8/VP9 and transfer the data as UDP packets to a PC running ffplay (ffplay udp://0.0.0.0:6000) or vlc. I put the data in ivf packets before sending.

I would also like to know if trying to use MediaCodec for encoding is a good idea at all. The app i would like to make is something like a Video Call app. My first impression of the encoding quality MediaCodec does output is not good. When encoding with 500kBit and 640x480 the result is not quite good. Especially when the cam is moved, the quality drops considerably (same for h264). Should I better use the vpx library directly?

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.