#webm #matroska #demuxer #demux

matroska-demuxer

A demuxer that can demux Matroska and WebM container files

5 releases (breaking)

0.5.0 Jun 12, 2023
0.4.0 Jun 18, 2022
0.3.0 Jan 20, 2022
0.2.0 Apr 26, 2021
0.1.1 Apr 25, 2021

#94 in Multimedia

Download history 3/week @ 2024-07-20 46/week @ 2024-07-27 2/week @ 2024-08-03 3/week @ 2024-08-10 1/week @ 2024-08-17 8/week @ 2024-08-24 5/week @ 2024-08-31 28/week @ 2024-09-21 23/week @ 2024-09-28 5/week @ 2024-10-05 23/week @ 2024-10-12 14/week @ 2024-10-19 13/week @ 2024-10-26 40/week @ 2024-11-02

91 downloads per month
Used in 4 crates (3 directly)

Zlib OR MIT OR Apache-2.0

150KB
3.5K SLoC

matroska-demuxer

Latest version Documentation ZLIB MIT Apache

A demuxer that can demux Matroska and WebM container files.

For simplicity only the elements supported by both Matroska and WebM are supported.

Integration test

To run the integration test you need to download the Matroska test suite video files and extract them into the tests/data folder (test1.mkv to test8.mkv).

License

Licensed under MIT or Apache-2.0 or ZLIB.


lib.rs:

A demuxer that can demux Matroska and WebM container files.

Example:

use std::fs::File;
use matroska_demuxer::*;

let file = File::open("test.mkv").unwrap();
let mut mkv = MatroskaFile::open(file).unwrap();
let video_track = mkv
    .tracks()
    .iter()
    .find(|t| t.track_type() == TrackType::Video)
    .map(|t| t.track_number().get())
    .unwrap();

let mut frame = Frame::default();
while mkv.next_frame(&mut frame).unwrap() {
    if frame.track == video_track {
        dbg!("video frame found");
    }
}

No runtime deps