Is there a library for encoding videos?


(I don’t want to pull in GStreamer or ffmpeg as dependencies.)


I’m not aware of anything in pure Rust, but libVLC might be something for you:

The libVLC (VLC SDK) media framework can be embedded into an application to get multimedia capabilities.
Since VLC is based on libVLC, one should be able to have the same features that VLC media player has.

I was happy to discover it even has bindings available: vlc-rs: “Rust bindings for libVLC media framework.”

P.S. VLC is a big fan of Rust; if I recall correctly, @geal wrote nom mostly to help him parse VLC media streams in his big quest to Rustify VLC’s internals.

P.P.S. researching @geal’s awesomeness brought me to rust-av: “Multimedia Toolkit written in pure rust.”, I have no idea on its usability, though


For encoding of WebM (VP9) only I’ve had success with the libvpx-sys + webm crate. It compiles to static self-contained executable.


Thanks! I’ll try using those with the opus crate.