Menu

Building an offline audio editor in Flutter: what the platforms won't encode for you
📰

Building an offline audio editor in Flutter: what the platforms won't encode for you

DEV Community: dart·Johnny Nguyen·1 day ago
#gDbFdsqQ
#devtodart#devto#dev#ffmpeg#android
Reading 0:00
15s threshold

I work on AuCut at W Lab. It is an audio editor for iPhone and Android: trim a recording, pull the audio out of a video, convert between MP3, M4A and WAV, change the volume or the speed. Everything is processed on the phone and no file is uploaded. That one rule shaped most of the architecture, and this post is about where it got awkward.

One Flutter UI, two native engines, and FFmpeg

The UI is Flutter with Riverpod: one controller and one screen per tool under lib/features , shared services under lib/core . Dart doesn't touch audio samples. It talks to native code over one MethodChannel for commands (trim, extract, convert, get duration, cancel) and one EventChannel for progress.

Behind that channel are two different engines:

On iOS, AVFoundation, mostly AVAssetExportSession .

On Android, Media3 Transformer .

And beside both, FFmpeg, through the LGPL audio-only build of FFmpegKit.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.