audiocutter 0.0.9 audiocutter: ^0.0.9 copied to clipboard
A plugin to cut audio files. Uses flutter_ffmpeg to extract audio into small file sizes, perfect for streaming small clips of audio (or ringtones). Supports iOS and Android.
audiocutter #
A plugin to cut audio files. You pass in a path to a file, start and end times and the plugin will do the rest. For now, it automatically will reduce the quality quite a bit to ensure optimal file size for storage/streaming.
Getting Started #
-
Take a look at the requirements and any gotchas for your platform at the flutter_ffmpeg package page. There can be some stumbling blocks getting it working on iOS. (Works on my machine ¯\_(ツ)_/¯)
-
Import and cut!
import 'package:audiocutter/audiocutter.dart';
{...}
var start = 15.0;
var end = 25.5;
var path = 'path/to/audio/file.mp3';
// Get path to cut file and do whatever you want with it.
var outputFilePath = await AudioCutter.cutAudio(path, start, end);