Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voice notes are extremely high bitrate since version 0.26.11.1733 #733

Open
Ciancy28 opened this issue Aug 17, 2024 · 1 comment
Open

Voice notes are extremely high bitrate since version 0.26.11.1733 #733

Ciancy28 opened this issue Aug 17, 2024 · 1 comment
Labels
bug Issues describing that something went wrong

Comments

@Ciancy28
Copy link

This almost two year old issue, which still affects to this day the regular android client of telegram, was for some reason also introduced in telegram x starting with this update
see: https://bugs.telegram.org/c/20785
voice notes are now approximately 163 kbps CBR instead of the previous 32 kbps VBR, which is overkill, inefficient and pretty much defeats the point of using the Opus codec in the first place (mp3, which telegram moved away from in 2013, would perform just as good at such bitrates).
this results in waste of bandwidth, and longer voice note upload/download times (which can be especially problematic for users on limited connectivity, a voice message of 5 minutes is now 6 megabytes instead of 1).
whatever caused this change should be reverted, if a (needless in my opinion) quality upgrade was the intent, switching to 48 kbps VBR would suffice.
Keep in mind that the makers of the Opus codec suggest 128 kbps vbr as "pretty much transparent" for fullband stereo music.

@vkryl vkryl added the bug Issues describing that something went wrong label Aug 17, 2024
@AntoninoScordino
Copy link

AntoninoScordino commented Aug 17, 2024

const opus_int32 bitrate = OPUS_BITRATE_MAX;

The change to OPUS_BITRATE_MAX from the proveious configuration should be the reason why voice messages are now encoded at ~163Kbps (although doesn't sound like the maximun bitrate should be ~163Kbps, but higher). This breaking change was introduced on commit 2e40364.

Telegram-X/app/jni/voice.c

Lines 251 to 252 in 63ab962

const opus_int32 bitrate = 32000;
const opus_int32 rate = 48000;

If there was indeed a will to improve quality, developers should adapt this change to 48Kbps as proposed by the issue author, rather than fallbacking to OPUS_BITRATE_MAX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing that something went wrong
Projects
None yet
Development

No branches or pull requests

3 participants