Skip to content

Conversation

@AdrianEddy
Copy link
Contributor

@AdrianEddy AdrianEddy commented Oct 23, 2025

This PR adds a way to create inputs and outputs by providing a standard Rust Read/Write/Seek streams.

It allows using ffmpeg with arbitrary data sources like filesystem, network, memory etc

examples:

let file = std::fs::File::open("test.mp4")?;
let input_ctx = format::input_from_stream(format::context::StreamIo::from_read_seek(file)?, None, None)?;
let mut vec = Vec::new();
let mut cursor = std::io::Cursor::new(&mut vec);
let mut output_ctx = format::output_to_stream(format::context::StreamIo::from_read_write_seek(cursor)?, None, Some("mp4")).unwrap();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant