audio_meta 2.0.0
audio_meta: ^2.0.0 copied to clipboard
audio information extraction (duration, bitrate, sample rate, channels) from audio files
audio_meta: Leightweight Audio Information Extraction #
Content #
- 💯 100% cross-platform
- 💯 100% pure dart
- 🙅♂️ 0 dependencies
- ✅ Uniform audio information for all file types
- ✅ No need for external tools like ffprobe
Current Support For: #
- ✅ mp3
- ✅ wav
- ✅ aac
- ✅ ogg
- ✅ flac
- ✅ opus
- 🚧 m4a
Metadata Available Through This Package: #
- 🔊 Track Duration
- 🔊 Sample Rate
- 🔊 Bit Rate
- 🔊 Bit Depth
- 🔊 Channel Count
- 🔊 Encoding
Getting Started #
Get from pub.dev #
dart pub add audio_meta
Include in Project #
import 'package:audio_meta/audio_meta.dart';
Basic Example #
import 'dart:io';
import 'package:audio_meta/audio_meta.dart';
final file = File('audio.mp3')
final bytes = Uint8List.fromList(f.readAsBytesSync());
final meta = AudioMeta(bytes);
print(meta.type); // AudioType.mp3
print(meta.sampleRate); // 44100
print(meta.bitRate); // 128000
print(meta.duration); // Duration(seconds: 180)
Example Project #
An example project can be found in the example folder of the repository.
FAQ #
Nothing here yet!
Contribution #
Feel free to support me by working on open issues, or making a feature request / opening an issue.