remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.09k stars 294 forks source link

How to add a new encoder(h265) to redroid 11? #535

Open Funny-ppt opened 8 months ago

Funny-ppt commented 8 months ago

Is your feature request related to a problem? Please describe. with scrcpy --list-encoders i noticed only --video-codec=h264 --video-encoder='OMX.google.h264.encoder' is avaliable for redroid11, and based on many tests by scrcpy's community h265 outperforms h264 in almost every case, especially when using poor bandwidth.

Describe the solution you'd like a built in hardware-accelerate enabled h265 encoder

Describe alternatives you've considered provide some methods to import it accordingly if it is not generally supported

Additional context i run redroid 11 on Debian 12 Linux 6.1.38, with AMD Ryzen 7 5800H, which supports hardware-accelerate encode/decode h265

zhouziyang commented 8 months ago

Hardware media codecs are platform dependent. Take a look at https://android.googlesource.com/platform/frameworks/av/+/refs/tags/android-11.0.0_r48/media/libstagefright/codecs/ (OXM) and https://android.googlesource.com/platform/frameworks/av/+/refs/tags/android-11.0.0_r48/media/codec2/components/ (C2).

And it's possible to add hardware accelerated media codec (libva based) for your platform (AMD).