#ffmpeg #audio #video #codec #multimedia


Simple and safe Rust interface for FFmpeg libraries

8 releases

0.16.0 Mar 1, 2021
0.15.6 Feb 24, 2021
0.15.5 Oct 29, 2020
0.15.3 Sep 29, 2020
0.15.1 Aug 11, 2020

#15 in Video

49 downloads per month

MIT license

5.5K SLoC

Rust 4K SLoC // 0.0% comments C 1.5K SLoC // 0.0% comments

Rust wrapper for FFmpeg libraries

Crates.io MIT licensed Build Status

This library provides a Rust interface for FFmpeg libraries. Rather than supporting all FFmpeg features, we focus on safety and simplicity of the interface.

Supported features

  • Demuxing any self-contained media container
  • Muxing any self-contained media container
  • Decoding audio and video
  • Encoding audio and video
  • Video frame scaling and pixel format transformations
  • Audio resampling
  • Bitstream filters


  • FFmpeg v4.x libraries, the following libraries are required:
    • libavutil
    • libavcodec
    • libavformat
    • libswresample
    • libswscale


The following env. variables can be used to set correct paths to FFmpeg header files and libraries:

  • FFMPEG_INCLUDE_DIR - path to the FFmpeg header files
  • FFMPEG_LIB_DIR - path to the FFmpeg libs

If you prefer static linking, you can force it using:



Even though this library is distributed under the MIT license, the FFmpeg project has its own license policies that need to be respected. See https://ffmpeg.org/legal.html for more details.