Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agersant/mp3-duration
https://github.com/agersant/mp3-duration
audio metadata mp3
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/agersant/mp3-duration
- Owner: agersant
- License: mit
- Created: 2017-12-10T00:40:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-31T09:37:45.000Z (over 3 years ago)
- Last Synced: 2025-01-16T13:38:27.995Z (11 days ago)
- Topics: audio, metadata, mp3
- Language: Rust
- Size: 51.3 MB
- Stars: 36
- Watchers: 4
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Crates.io](https://img.shields.io/crates/v/mp3-duration.svg)](https://crates.io/crates/mp3-duration)
[![Build Status](https://travis-ci.org/agersant/mp3-duration.svg?branch=master)](https://travis-ci.org/agersant/mp3-duration)# mp3-duration
This crate has only one purpose: determining the playback duration of mp3 files.
## Example
```rust
use std::path::Path;
use mp3_duration;let path = Path::new("music.mp3");
let duration = mp3_duration::from_path(&path).unwrap();
println!("File duration: {:?}", duration);
```## Changelog
### Version 0.1.10
- Replaced usage of `failure` with `thiserror` for error management (thanks @amesgen for the contribution)### Version 0.1.9
- Fixed a bug where the MP3Duration error type was no longer public since version 0.1.8 (thanks @compenguy for the contribution)### Version 0.1.8
- Minor performance improvements### Version 0.1.7
- Fixed a crash when reading corrupted files with impossibly short MPEG frames## Links
- [Format reference](https://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header)
- [Audio test file source](http://freemusicarchive.org/music/Karine_Gilanyan/Beethovens_Sonata_No_15_in_D_Major/Beethoven_-_Piano_Sonata_nr15_in_D_major_op28_Pastoral_-_I_Allegro)
- [Non-audio test file source](https://www.pexels.com/photo/close-up-of-tiled-floor-258805/)