Add extra brightness feature #2416
Open
+4,128
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was inspired by the extra loudness feature activated with a gesture and wanted something similar, but for video brightness/ gamma correction. It is useful when watching in direct sunlight on the not bright enough screen or when watching very dark movies in general. The color math heavy lifting is done with the code originally from https://github.com/MasayukiSuda/GPUVideo-android library that is MIT licensed. I forked it https://github.com/Pawloland/GPUVideo-android to make it up to date enough to run it's demo sample app on modern Android (in my fork there is only the movie player filter functionality, I removed camera and media file editing option, because I didn't feel like fixing scoped storage and camera API, and the thing that I needed in cloudstream was just the exoplayer part, which I upgraded to Media3). I copied the source code from my fork into cloudstream codbase with minimal changes, mainly paths in packages and imports, plus relying on PlayerResize enum for scaling types used in cloudstream. There are a lot more effects inside, which I didn't remove. Maybe someone would be intrigued by this and build nice UI for changing contrast, exposure, hue, saturation, vibrance or white balance to name a few.
Bellow is a demo of it in action when playing Big Buck Bunny video file. From my quick empirical tests it behaves as expected on rotations, changes of the scaling to fit, fill and zoom, and it seams to works fine on TV layout.
output.mp4