-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Story] EX: Resize media before sending #2543
Comments
Dumping the various Image/Video qualities I've found testing apps today. However this isn't quite as simple as these tables make it seem. Taking signal as an example, some of the apps seem to have a selection of image presents and the user setting maps to a default preset. However, when the default preset exceeds the target file size, resizing is attempted again with a slightly worse preset until the target size is achieved. This seems somewhat overkill without properly validating a bunch of size+quality combinations to me. Signal
iMessage
Slack
Discord
|
Instead of targeting a byte size, how about the way the older Element iOS app behaved? I believe it used a constant calculation (simpler) and offered Small, Medium, or Large choices to the user. Each size choice corresponded to a relatively static percentage reduction of the image's dimensions. I am not a developer, more like a guru, but I think this linked code is related. |
Yeah don't worry, this seems like an unpredictable "quality" setting to me. The post above is only illustrative of how other apps work as some background research. |
while i'm very happy to see that we may let users choose whether to optimise or not... i'm worried that particularly for video, we're giving the option of 480p (awful) and original (which could well be gigantic 4K@60fps on an iPhone 16). Can i make a plea to offer both "low", "high" and "original" or something? So 480p, 720p and original in the case of video (similar to what WhatsApp is doing)? Otherwise I can see us being drowned in a 50/50 mix of "why is Element's video quality so crap?" and "why are Element's videos so big?" bugs. |
Just to clarify, we don't upload 4K video, it has always been processed using Apple's |
I agree with this; I think these days most users value/expect high-quality more than their bandwidth. I would not add a 3rd option - just use 720 instead of 480. We can always add 3rd option later if this becomes necessary. @ara4n It is worth mentioning though that 480 was picked because this is what everybody else was doing. |
@pixlwave thanks for the comparrision to other messengers. What is the reason for EX having the optimization turned off by default although the others have it turned on by default? Personally i would like to have optimization turned ON by default. This saves a lot of storage/bandwidth and is what the users are used to from their personal messenger apps. |
A few questions if i may: Won't it be a bit deceiving to users that, with optimize OFF a video will still be tampered with ? (this is highly subjective to encoding settings and the actual media being encoded) Having this be a global setting isn't too limiting ? Perhaps a toggle before upload to Disable optimization (if it's enable globally) or Enable optimization (if disabled globally) would be preferable ? |
It's been decided to default this to on (the initial plan was mine as iMessage (and Slack iirc) defaults to off and it seemed undesirable for a user to be sending reduced quality images without knowing this, but as I was the only person who thinks this, we changed the plan 😢)
The TL;DR on this is that h.264 is essentially universally compatible, whereas h.265/VP9/AV1 don't have such ubiquitous support. So by always running the video through a 1080p encoding, we ensure reasonable file size (as compared to 4K), along with much wider device compatibility. So yes, we might end up with increased file sizes in some instances, but this comes with the benefit that everybody should be able to play the video. (We have been sending videos like this from EXI since we added media uploads and we've not had any complaints about it. As an aside, it is also an easy way to make sure that any GPS location data is removed from uploaded videos without having to handle all the individual video containers individually).
This is very much a first pass at supporting smaller file uploads and we've already discussed internally that we're likely to come back to it to look at such enhancements in the future as there are clearly various tradeoffs being made here. |
You aren't. I'm also not against compression/transcoding, just agains the silent type :)
Solid facts, h264 has become the jpeg of video. Yes there are better formats, but support is not so great. As for no complains in EXI, i assure you there were at least observations on EXA (i did notice that my screen recordings became... different). The removing of private info from EXIF and others is a must have so no arguments there.
I think i should say that i didn't feel that this was decided by the flip of a coin. Discussion must have been held, arguments on the pros and the cons must have been put forward and the best decision, at the time, with the info that was available, and the time available to decide was set in code. As a server owner, i should be preoccupied with the amount of space media will take, and as such compression/transcoding is a must have. The media upload (and download) screens are currently very bland and optionless, i hope in the future we get more info transmited to the user during the preview and before the upload, as well as some options regarding how media should be handled localside (oh please let me draw on images!!) before being uploaded :) |
It will also improve everyone bandwidth usage.
Acceptance criteria
480p720pSummary
Leads
Time sheeting
ER-97 EX: Persistent Event Cache & Upload Improvements
Size estimate
None
Dependencies
Out of scope
Open questions
Questions
Subtasks
Android
iOS
Rust
Other
Bugs
Sign-off
Android
iOS
The text was updated successfully, but these errors were encountered: