caydey / ffshare

An android app to compress image, video and audio files through ffmpeg before sharing them
GNU General Public License v3.0
615 stars 30 forks source link

Shave 19MiB off APK size by removing audio (mp3/wav/aac) conversion support? #24

Closed caydey closed 1 year ago

caydey commented 1 year ago

I have been doing some testing and have realized that I can reduce the APK build size from 57.0MiB to 38.0MiB by removing audio (mp3/wav/aac) conversion support.

However I'm not sure if I should remove such a feature from the app only for a 33% size reduction without first getting the app users opinion.

Borph commented 1 year ago

Do you mean audio files like mp3, not audio inside video files? Really personal opinion here: As I never used such conversion, I could live without it and I feel 57.0MiB is a lot for an app. But it's 33% and storage is cheap... so no deal breaker in any way.

caydey commented 1 year ago

yes, removing mp3 file conversion, video audio is kept

G2G2G2G commented 1 year ago

all audio should be converted to aac or opus, not mp3. aac has massive adoption and is far more efficient than mp3. Opus has less adoption but is even more efficient.. I'd go with aac since it is a good middle ground

But you can remove mp3/wav for 100% sure, no reason to have them

original audio on phones is usually low bitrate too so prob doesn't matter if you had no audio conversion at all, I'd be using aac though if it was available. 64kbps is pretty much all that is needed for non-music

gianni-rosato commented 1 year ago

I think removing audio support is totally fine. just doing -c:a copy in most cases is enough, as reencoding audio when the audio streams are relatively small anyway is fine

825i commented 1 year ago

all audio should be converted to aac or opus, not mp3. aac has massive adoption and is far more efficient than mp3. Opus has less adoption but is even more efficient.. I'd go with aac since it is a good middle ground

But you can remove mp3/wav for 100% sure, no reason to have them

original audio on phones is usually low bitrate too so prob doesn't matter if you had no audio conversion at all, I'd be using aac though if it was available. 64kbps is pretty much all that is needed for non-music

What this guy said. It's not needed. aac audio is preferred, or leave audio basically untouched. Basically no smartphones are recording audio above 196k anyway.

ciarancourtney commented 1 year ago

Can I suggest keeping it since the current version almost fulfils my use case described here https://github.com/Automattic/pocket-casts-android/issues/820

It would just require letting the user set custom ffmpeg params, in which case I'd use -acodec libopus -application voip -b:a 32K -f opus as a podcast preset.

caydey commented 1 year ago

marking as closed since I now build split APK's to GitHub's releases page; #36