flutter_lame 1.0.2 copy "flutter_lame: ^1.0.2" to clipboard
flutter_lame: ^1.0.2 copied to clipboard

Flutter native bindings to LAME (MP3 encoder), bundled with LAME source code.

flutter_lame #

Flutter native bindings to LAME (MP3 encoder), bundled with LAME source code.

Unlike dart_lame, your don't need to provide prebuilt libraries by yourself. The bundled LAME source code will be built as part of the Flutter Runner build.

Usage #

final File f = File("output.mp3");
final IOSink sink = f.openWrite();
final LameMp3Encoder encoder = LameMp3Encoder(sampleRate: 44100, numChannels: 2);


Float64List leftChannelSamples;
Float64List rightChannelSamples;
// Get samples from file or from microphone.

final mp3Frame = await encoder.encode(
  leftChannel: leftChannelSamples,
  rightChannel: rightChannelSamples);
sink.add(mp3Frame);
// continue until all samples have been encoded

// finally, flush encoder buffer
final lastMp3Frame = await encoder.flush();
sink.add(lastMp3Frame);

For a complete example, please go to /example folder.

5
likes
140
pub points
70%
popularity

Publisher

unverified uploader

Flutter native bindings to LAME (MP3 encoder), bundled with LAME source code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

LGPL-3.0 (LICENSE)

Dependencies

dart_lame, flutter, plugin_platform_interface

More

Packages that depend on flutter_lame