MCPcopy Index your code
hub / github.com/angelcam/rust-ac-ffmpeg

github.com/angelcam/rust-ac-ffmpeg @v0.19.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.19.0 ↗ · + Follow
761 symbols 1,505 edges 45 files 365 documented · 48%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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
  • Setting metadata
  • Seeking
  • Decoding audio and video
  • Encoding audio and video
  • Video frame scaling and pixel format transformations
  • Audio resampling
  • Bitstream filters
  • Simple Video filtergraphs

Requirements

  • FFmpeg v4.x, v5.x, v6.x or v7.x libraries. The following libraries are required:
    • libavutil
    • libavcodec
    • libavformat
    • libswresample
    • libswscale
  • and the following libraries are optional:
    • libavfilter

Compilation

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 require building for multiple platforms, you can append _PLATFORM_TARGET_TRIPLET to both of the above to create platform specific env. variables, for example: * FFMPEG_INCLUDE_DIR_AARCH64_LINUX_ANDROID = ${jniInclude}/arm64-v8a/ * FFMPEG_LIB_DIR_AARCH64_LINUX_ANDROID = ${jniLibs}/arm64-v8a/ * FFMPEG_INCLUDE_DIR_X86_64_LINUX_ANDROID = ${jniInclude}/x86_64/ * FFMPEG_LIB_DIR_X86_64_LINUX_ANDROID = ${jniLibs}/x86_64/

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

  • FFMPEG_STATIC=1

License

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.

Extension points exported contracts — how you extend this code

Filter (Interface)
A media filter. # Common filter operation 1. Push a frame to the filter. 2. Take all frames from the filter until you g [1 …
ac-ffmpeg/src/codec/mod.rs
Decoder (Interface)
A media decoder. # Common decoder operation 1. Push a packet to the decoder. 2. Take all frames from the decoder until
ac-ffmpeg/src/codec/mod.rs
Encoder (Interface)
A media encoder. # Common encoder operation 1. Push a frame to the encoder. 2. Take all packets from the encoder until
ac-ffmpeg/src/codec/mod.rs

Core symbols most depended-on inside this repo

is_null
called by 69
ac-ffmpeg/src/time.rs
as_ptr
called by 40
ac-ffmpeg/src/codec/video/frame.rs
timestamp
called by 24
ac-ffmpeg/src/time.rs
as_ptr
called by 17
ac-ffmpeg/src/codec/audio/frame/mod.rs
num
called by 14
ac-ffmpeg/src/math.rs
den
called by 14
ac-ffmpeg/src/math.rs
with_time_base
called by 13
ac-ffmpeg/src/time.rs
take
called by 11
ac-ffmpeg/src/codec/bsf.rs

Shape

Method 414
Function 242
Class 91
Enum 11
Interface 3

Languages

Rust71%
C29%

Modules by API surface

ac-ffmpeg/src/codec/mod.rs83 symbols
ac-ffmpeg/src/codec/mod.c77 symbols
ac-ffmpeg/src/codec/video/frame.rs49 symbols
ac-ffmpeg/src/codec/audio/frame/mod.rs41 symbols
ac-ffmpeg/src/codec/frame.c38 symbols
ac-ffmpeg/src/packet.rs36 symbols
ac-ffmpeg/src/time.rs34 symbols
ac-ffmpeg/src/format/demuxer.rs33 symbols
ac-ffmpeg/src/codec/audio/mod.rs25 symbols
ac-ffmpeg/src/format/io.rs23 symbols
ac-ffmpeg/src/codec/video/mod.rs23 symbols
ac-ffmpeg/src/packet.c22 symbols

For agents

$ claude mcp add rust-ac-ffmpeg \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact