#mp3 #duration #metadata #parser #audio-metadata

mp3-duration

A library for measuring the playback duration of mp3 files

11 releases

0.1.10 Jun 18, 2020
0.1.9 Feb 14, 2020
0.1.8 Jan 20, 2020
0.1.7 Dec 17, 2019
0.1.1 Dec 11, 2017

#313 in Audio

Download history 396/week @ 2024-06-05 518/week @ 2024-06-12 394/week @ 2024-06-19 444/week @ 2024-06-26 504/week @ 2024-07-03 639/week @ 2024-07-10 715/week @ 2024-07-17 650/week @ 2024-07-24 674/week @ 2024-07-31 672/week @ 2024-08-07 724/week @ 2024-08-14 429/week @ 2024-08-21 517/week @ 2024-08-28 620/week @ 2024-09-04 1434/week @ 2024-09-11 3486/week @ 2024-09-18

6,123 downloads per month
Used in 6 crates

MIT license

21KB
480 lines

Crates.io Build Status

mp3-duration

This crate has only one purpose: determining the playback duration of mp3 files.

Example

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

Dependencies

~260–710KB
~17K SLoC