Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 532 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 532 Bytes

Videostream

A rust library that provided a simple iterator around video files.

Requires ffmpeg to be installed.

Example

To read the first five frames of a video and write them to files is just:

extern crate videostream;

use videostream::VideoStream;

fn main() {
    let mut stream = VideoStream::new("file.mp4").unwrap();

    for (i, frame) in stream.iter().take(5).enumerate() {
        let image = frame.as_rgb().unwrap();
        image.save(&format!("{}.png", i));
    }
}