snikket-im / snikket-android

Snikket Android client
https://snikket.org/app/
GNU General Public License v3.0
97 stars 18 forks source link

Please use/offer more compressed voice clip format #32

Open rrthomas opened 2 years ago

rrthomas commented 2 years ago

I was impressed to see Snikket supports voice clips, but 2 seconds comes out at 419KB! That implies something like stereo CD-quality WAV. That's not practical for many uses. It would be great to see a better default, like mono Opus, where one would get a good minute or so for a similar quantity of data.

Thanks very much for Snikket, I'm greatly enjoying trying it.

mwild1 commented 2 years ago

Hi, thanks for the feature request. I just sent myself a 5s audio clip, and it is only 72KB. Are you able to share a sample of the file that is overly large? Also some details about the device you are recording on, Android version, etc.

Thanks!

rrthomas commented 2 years ago

I just did some experiments, and something odd appears to be happening: a 10s clip is 513KB, a 5s clip is 466KB, and a 2s clip is 429KB. I've uploaded examples. So, the total size is fine, but the minimal size seems a bit big (and I regularly record smaller files).

Device is Sony Xperia XZ1 running Android 9.

https://user-images.githubusercontent.com/17382/180668801-fb03d2e8-a0c6-4270-af9f-86591f82c803.mp4 https://user-images.githubusercontent.com/17382/180668804-426efa5d-f27a-440e-a6cd-3c3024a3232d.mp4 https://user-images.githubusercontent.com/17382/180668805-9113bb88-3996-4887-8a18-715db50f85ca.mp4

rrthomas commented 2 years ago

A couple more data points: a minute of audio from Snikket on my device is about 1.1MB. However, a minute of MP3 at 44.1kHZ is only 600KB, while a minute of Opus audio at 16kHz is only 150KB. A minute of audio recorded on my phone in WhatsApp is 134KB. So it seems there are two questions here:

  1. Why are the M4A files so big for small clips?
  2. Would it in any case be a good idea to adjust default quality (and maybe have a user setting as for video)?