-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add setting to compress image and video #3744
Conversation
Compress media regarding the settings. Image compression change quality to 78% Video compression change size to 720 x 48
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
...upload/impl/src/main/kotlin/io/element/android/libraries/mediaupload/impl/ImageCompressor.kt
Show resolved
Hide resolved
@@ -29,7 +29,7 @@ class VideoCompressor @Inject constructor( | |||
val future = Transcoder.into(tmpFile.path) | |||
.setVideoTrackStrategy( | |||
DefaultVideoStrategy.Builder() | |||
.addResizer(AtMostResizer(1920, 1080)) | |||
.addResizer(AtMostResizer(720, 480)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the commit messages incorrectly says 720x48
, at least that's what I see on GH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, that's a typo
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3744 +/- ##
========================================
Coverage 83.05% 83.06%
========================================
Files 1754 1754
Lines 43994 44022 +28
Branches 5142 5144 +2
========================================
+ Hits 36539 36565 +26
- Misses 5632 5635 +3
+ Partials 1823 1822 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this is a "product decision" but both "Media" and "Optimise for upload" are pretty vague terms. "Media" might be better clarified as "Images and videos"? The thing I have more beef with is "Optimise for upload". It really depends on your perspective and what it is you're optimising for. It'd be more accurate to say "Compress for upload". If you're optimising for transfer speed, then maybe it should say that. My take is that it'd be more optimised for my eyes if it wasn't compressed, making this option actually inverted.
One final remark is the use of simplified English here. Is it time that we added English
and Simplified English
to localazy, because depending on your disposition, you may consider this word misspelt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @mxandreas
Content
Add a new setting in the advanced section to compress image and video. Setting is disabled by default. When enabled, the image and the video will be compressed.
Motivation and context
Closes #3651
Screenshots / GIFs
See recorded ones.
Tests
Tested devices
Checklist