Skip to content
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

Voice-Message Size: Encoding, Bitrate, Samplerate #643

Open
Tracked by #548
MathJud opened this issue Jul 15, 2024 · 0 comments
Open
Tracked by #548

Voice-Message Size: Encoding, Bitrate, Samplerate #643

MathJud opened this issue Jul 15, 2024 · 0 comments
Labels
Discussion Flutter Flutter UI related Testing Codebase testing in general

Comments

@MathJud
Copy link
Member

MathJud commented Jul 15, 2024

The chat voice message is currently very big and it's size should be considerably reduced.

Current Message Size & Encoding

The message size was tested with voice messages of 1 minute (60 seconds) length.

qaul: 1min = 1M

  • file: .m4a (MPEG-4 Audio only default file)
  • Container: Quicktime
  • Audio Codec: MPEG-4 AAC
  • Audio Bit Rate: 128 kbps
  • Sample Rate: 44,10 kHz
  • Channels: Stereo

Other Messengers Message Size & Encoding

Signal: 1min = 250 kB

  • file: .aac
  • Container: MPEG-4 AAC
  • Audio Codec: MPEG-4 AAC
  • Sample Rate: 44,10 kHz
  • Channels: Mono

Whatsapp: 1min = 140 kB

  • file: .ogg
  • Container: Ogg
  • Audio Codec: Opus
  • Sample Rate: 16 kHz
  • Channels: Mono

Optimization

We currently use the flutter record plugin, for which the AAC-LC codec seems to be the best encoding which is supported on all platforms.

We currently use it's default configuration which has the following values:

  const RecordConfig({
    this.encoder = AudioEncoder.aacLc,
    this.bitRate = 128000,
    this.sampleRate = 44100,
    this.numChannels = 2,
    this.device,
    this.autoGain = false,
    this.echoCancel = false,
    this.noiseSuppress = false,
  });

I suggest to change the following values:

  • numChannels = 1 for mono recording
  • bitRate: 64000

And to test and document the following values for 60 seconds:

In order to compare the test results, the tests should contain the following results:

  • Voice message of 1 minute (60 seconds) length
  • Message size in KB
  • Message quality

Codec Information

@MathJud MathJud added Discussion Testing Codebase testing in general Flutter Flutter UI related labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Flutter Flutter UI related Testing Codebase testing in general
Projects
None yet
Development

No branches or pull requests

1 participant