| Crates.io | ffmpeg-next-io |
| lib.rs | ffmpeg-next-io |
| version | 0.1.0 |
| created_at | 2024-01-03 09:34:04.706116+00 |
| updated_at | 2024-01-03 09:34:04.706116+00 |
| description | IO Extensions for ffmpeg-next |
| homepage | |
| repository | https://github.com/scuffletv/ffmpeg-next-io |
| max_upload_size | |
| id | 1087258 |
| size | 462,650 |
This is a helper library for ffmpeg-next that provides a general purpose IO implementation for bindings.
This library provides a wrapper for any struct that implements std::io::Read and std::io::Write, with seeking support for std::io::Seek.
We also have a channel compatability layer for many popular channels, including std::sync::mpsc, crossbeam-channel and tokio.
This library allows you to write to FFmpeg from a different thread. Meaning you can use FFmpeg in a async runtime and pass data from the async context to the sync context without blocking or having to write to a file first.
Without this libary you would be required to write to a tempory file or network socket or some unix pipe, which is not ideal. This library provides a much needed in-memory solution for ffmpeg-next.
Add this to your Cargo.toml:
[dependencies]
ffmpeg-next-io = "0.1.0"
use ffmpeg_next_io::Input;
let bytes = include_bytes!("../input.mp4"); // or any other source of bytes
let mut input = Input::seekable(std::io::Cursor::new(bytes));
// now you can use `input` as an input for ffmpeg-next
For more examples, see the examples directory.
This project is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT).