element-x-android icon indicating copy to clipboard operation
element-x-android copied to clipboard

Videos uploaded in the app are significantly degraded in quality compared to native uploads

Open Valenthyne opened this issue 1 year ago • 2 comments

Steps to reproduce

  1. Where are you starting? What can you see?

I begin in a chat in which I would like to upload a video file, specifically one to which I have already uploaded the video.

  1. What do you click?

First, I download the video that was uploaded by tapping the video, tapping the "Information" icon in the top right, and tapping "Save".

Then, I tap the "+" to go to upload a video file by selecting "Photo & Video Library" and then the video in question. It is a .webm file of approximately 4.2 MB in size.

  1. More steps…

I submit the video by clicking the green "Send" button. I go to check the video and notice that it is not only in much inferior video quality, but the size has also been crunched by around a third.

I also try uploading the video with "Optimize media quality" enabled, and the result is the same, leading me to believe the toggle is perhaps broken and optimization is forced regardless.

Outcome

What did you expect?

I expected the video quality to be the same as it was when uploaded through the native Element desktop application (Linux) which appears to be the same as the file's original quality.

What happened instead?

The video quality is considerably degraded despite the fact that "Optimize media quality" is NOT enabled under "Advanced settings".

It would appear that optimization is taking place regardless of the option selected in the app. There doesn't seem to be any good reason why the app would force optimization despite native applications uploading them as normal.

I do see that the original Element app also forces compression (though in this case it creates a file three times the size, defeating the purpose).

If this forced optimization is intended behavior, I suppose this is less of a bug report and more of a suggestion to make optimization a choice instead. Further clarification may be necessary on the toggle as well.

Your phone model

No response

Operating system version

Android 16

Application version and app store

Element X v2025.08.3 (GitHub Release APK)

Homeserver

No response

Will you send logs?

No

Are you willing to provide a PR?

No

Valenthyne avatar Aug 21 '25 18:08 Valenthyne

The video quality is considerably degraded despite the fact that "Optimize media quality" is NOT enabled under "Advanced settings".

I believe this was fixed in https://github.com/element-hq/element-x-android/pull/5183 but hasn't made it to a release yet. Sorry for the uncaught regression!

If this forced optimization is intended behavior, I suppose this is less of a bug report and more of a suggestion to make optimization a choice instead. Further clarification may be necessary on the toggle as well.

It's the intended behaviour for compatibility - I won't enter into details much here since I already did in other issues, but it's done for compatibility between platforms -, although we want to change how it works to add several presets the user can choose.

jmartinesp avatar Aug 22 '25 06:08 jmartinesp

Hi there! Thank you for the response, and no worries. These things can very easily fall through the cracks. I'll be looking out for this to be fixed in a future release then.

As for the mandatory compression, that's fine, just so long as the video doesn't end up forced to be as crunchy as it is now. 😉

Valenthyne avatar Aug 22 '25 18:08 Valenthyne