Telegram-FOSS-Team / Telegram-FOSS

Unofficial, FOSS-friendly fork of the original Telegram client for Android
GNU General Public License v2.0
2.9k stars 369 forks source link

Are video calls hardware accelerated? #663

Closed nazar-pc closed 1 year ago

nazar-pc commented 1 year ago

On Google Pixel 7 Pro (GrapheneOS, Android 13) Telegram FOSS consumed 11% of battery in under half an hour of video call, which is way too much!

According to battery monitoring a lot of it was spent by CPU, which makes me wondering if video is hardware accelerated on this phone or in general?

According to https://cpu-compare.com/cpu/google_tensor_g2 SoS is capable of both encoding and decoding everything that might be relevant on video side (H264/H265, VP8/VP9).

If it is not, are there plans to add hardware acceleration?

Younes-L commented 1 year ago

please try the official telegram app v9.3.3 and compare the performance. you can download it from here https://telegram.org/android or from here https://t.me/s/TAndroidAPK

telegram's developers are the ones responsible for adding new features such as hardware acceleration, as well as fixing any upstream bugs. the telegram-foss repo and issue tracker are only for the community-maintained FOSS fork of telegram (does not add features and does not fix upstream bugs).

the issue tracker for official telegram apps is here :

for instance , here are some issues reported on google pixel 7 pro https://bugs.telegram.org/?tag_ids=2&type=issues&sort=time&query=google%20pixel%207%20pro

nazar-pc commented 1 year ago

I see, makes sense, thanks!

nazar-pc commented 1 year ago

Hm... Telegram FOSS in contrast to recommendations uses the same ID as official app, so I can't even test them side by side. And it has backups support disabled too.

Younes-L commented 1 year ago

yes, telegram-foss has special permission to be replacement for official app. but that was before 2019 and since then official app is available in 2 different package names :

you can install telegram direct separately without uninstalling your telegram-foss.

since 9.4.0 has been released today, the telegram website now serves that version instead of 9.3.3 which is needed for comparison. of course you can also test 9.4.0 to see if the update makes things better

nazar-pc commented 1 year ago

No longer 100% sure it is video specifically, looks like something gets stuck and consumes CPU even when telegram isn't used and phone is locked with screen off. It might have been a coincidence. Commented on https://bugs.telegram.org/c/23348