flutter_lame 1.0.3 copy "flutter_lame: ^1.0.3" to clipboard
flutter_lame: ^1.0.3 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.

6
likes
160
points
63
downloads

Publisher

unverified uploader

Weekly Downloads

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