Open matrixbot opened 8 years ago
I have had a play with https://github.com/lalongooo/VideoCompressor https://github.com/hoolrory/AndroidVideoSamples
It seems that only the video can resized (not the sound). It is good but i've one device (on my 5 devices set) which did not work properly while trying to resize the same video. The compression is an hardware one so it will depends in the mobile phone.
Im wondering how telegram does this. Is it on the phone or in the server
But this is indeed a needed feature
It's only reasonable to do on the client because you'll most likely send the video via mobile network and need to care about the size. There are two options, basically:
The first option is probably better as it doesn't increase the build size, is kinda standard and doesn't require native libs. However, if it doesn't work on at least one device out of 5, it's bad already (maybe the library is poorly written, who knows). The second option might work on every device but could be harder to support. I'd say, if you don't write a game or a very specific software it's better not to use native libs.
I'd love to have this feature as my native cam app produces huge files like 126 Mb for 1 minute (17 Mbit/s) and in Riot I have no video settings if using the native cam, the resulting file is compact but of low quality and blurry.
Created by @ matthew:matrix.org.
Surely Android gives us APIs for this these days?