https://github.com/amugofjava/mp3_info
A package for extracting key meta information from an MP3 file including sample rate, bitrate and duration.
https://github.com/amugofjava/mp3_info
Last synced: 3 months ago
JSON representation
A package for extracting key meta information from an MP3 file including sample rate, bitrate and duration.
- Host: GitHub
- URL: https://github.com/amugofjava/mp3_info
- Owner: amugofjava
- License: mit
- Created: 2019-12-04T11:51:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-01T08:23:41.000Z (about 3 years ago)
- Last Synced: 2025-12-13T09:51:45.620Z (5 months ago)
- Language: Dart
- Size: 109 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MP3 Info
Processes an MP3 file to extract key meta information such as MPEG version,
MPEG layer version, bitrate, sample rate and duration.
## Usage
A simple usage example:
```dart
import 'dart:io';
import 'package:mp3_info/mp3_info.dart';
main() {
MP3Info mp3 = MP3Processor.fromFile(File("test_files/test_128kpbs_441khz_stereo_10s.mp3"));
print('MP3: test_128kpbs_441khz_stereo_10s.mp3');
switch(mp3.sampleRate) {
case SampleRate.rate_32000:
print('Sample rate: 32KHz');
break;
case SampleRate.rate_44100:
print('Sample rate: 44.1KHz');
break;
case SampleRate.rate_48000:
print('Sample rate: 48KHz');
break;
}
print('Bit rate: ${mp3.bitrate}bps');
print('Duration: ${mp3.duration}');
}
```
### Task list
- [x] MP3 Key fields
- [x] MPEG version
- [x] MPEG layer version
- [x] Sample rate
- [x] Bitrate
- [x] Duration
- [x] CRC check
- [x] Channel mode
- [ ] Mode extension
- [x] Copyright flag
- [x] Origin (original/copy))
- [x] Emphasis
- [x] CBR (Constant Bitrate) support
- [ ] VBR (Variable Bitrate) support
- [ ] ID3 Tag support
- [ ] ID1 Tag support