# kkroening/ffmpeg-python

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kkroening-ffmpeg-python).**

10,999 stars · 944 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/kkroening/ffmpeg-python
- awesome-repositories: https://awesome-repositories.com/repository/kkroening-ffmpeg-python.md

## Description

ffmpeg-python is a Python wrapper that translates programmatic method calls into command-line arguments for executing FFmpeg media processing tasks. It functions as a multimedia transcoding interface and a media stream capture tool, allowing for the recording of live audio and video from hardware devices and network sources.

The library features a fluent interface for constructing complex directed graphs of audio and video filters through method chaining. It also includes an FFprobe metadata extractor that retrieves structured technical properties from media files and returns them as Python dictionaries.

The project covers a broad range of media operations, including format conversion, automated video generation from image sequences, and the extraction of raw frames into numerical arrays. It supports advanced audio engineering tasks, complex filter application with multi-input and multi-output handling, and the relaying of network streams.

## Tags

### Development Tools & Productivity

- [CLI Wrappers](https://awesome-repositories.com/f/development-tools-productivity/cli-wrappers.md) — Provides a programmatic Python interface that translates method calls into FFmpeg command-line arguments.
- [Command Execution Engines](https://awesome-repositories.com/f/development-tools-productivity/command-execution-engines.md) — Translates defined filter graphs into executable command lines to process media files. ([source](https://kkroening.github.io/ffmpeg-python/))
- [Media Metadata Extraction](https://awesome-repositories.com/f/development-tools-productivity/integration-metadata-retrievers/media-metadata-retrievers/media-metadata-extraction.md) — Provides programmatic access to FFprobe for extracting technical metadata like codecs and resolution from media files.
- [Filter Graphs](https://awesome-repositories.com/f/development-tools-productivity/modular-architecture/filter-graphs.md) — Represents media processing pipelines as directed graphs of interconnected filter nodes before execution.
- [Fluent Graph Builders](https://awesome-repositories.com/f/development-tools-productivity/modular-architecture/filter-graphs/fluent-graph-builders.md) — Implements a fluent interface for building complex directed graphs of audio and video filters through method chaining.
- [Fluent Command Generation](https://awesome-repositories.com/f/development-tools-productivity/command-line-argument-handlers/command-construction-logic/fluent-command-generation.md) — Builds complex media processing commands through a chainable API that incrementally accumulates arguments.
- [Subprocess Management](https://awesome-repositories.com/f/development-tools-productivity/subprocess-management.md) — Manages the spawning and execution of external FFmpeg system processes and their I/O streams.

### Graphics & Multimedia

- [FFmpeg Wrappers](https://awesome-repositories.com/f/graphics-multimedia/ffmpeg-wrappers.md) — Functions as a Python wrapper that translates programmatic calls into FFmpeg command-line arguments.
- [Filter Graph Applications](https://awesome-repositories.com/f/graphics-multimedia/ffmpeg-wrappers/filter-graph-applications.md) — Allows the construction and application of complex audio and video filter chains using FFmpeg's libavfilter.
- [Live Media Streaming](https://awesome-repositories.com/f/graphics-multimedia/live-media-streaming.md) — Captures and transmits live audio and video from hardware devices or network sources using FFmpeg protocols.
- [Media Metadata Extractors](https://awesome-repositories.com/f/graphics-multimedia/media-metadata-extractors.md) — Extracts structured technical properties from media files using FFprobe.
- [Media Metadata Parsers](https://awesome-repositories.com/f/graphics-multimedia/media-metadata-parsers.md) — Converts the text output of FFprobe into structured Python dictionaries and objects.
- [Media Transcoding](https://awesome-repositories.com/f/graphics-multimedia/media-transcoding.md) — Changes codecs, bitrates, and file formats of media assets to ensure cross-platform compatibility.
- [Programmatic Video Frameworks](https://awesome-repositories.com/f/graphics-multimedia/video-production/programmatic-video-frameworks.md) — Enables the construction of complex audio and video filter pipelines using Python code.
- [FFmpeg Transcoders](https://awesome-repositories.com/f/graphics-multimedia/video-production/transcoding-engines/ffmpeg-transcoders.md) — Provides a programmatic interface for changing codecs, bitrates, and formats of media files via FFmpeg.
- [Live Capture and Recording](https://awesome-repositories.com/f/graphics-multimedia/audio-music/media-capture-and-playback/live-capture-and-recording.md) — Records live video and audio directly from system hardware devices such as webcams. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))
- [Custom Processing Filters](https://awesome-repositories.com/f/graphics-multimedia/custom-processing-filters.md) — Executes filters by name to support multi-input streams and dynamic expressions. ([source](https://cdn.jsdelivr.net/gh/kkroening/ffmpeg-python@master/README.md))
- [Filter Syntax Serializers](https://awesome-repositories.com/f/graphics-multimedia/filter-syntax-serializers.md) — Serializes complex programmatic filter chains into the specific string syntax required by the FFmpeg binary.
- [Image-to-Video Sequencing](https://awesome-repositories.com/f/graphics-multimedia/image-to-video-sequencing.md) — Creates video files from sequences of image frames using pattern matching and specified framerates. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))
- [Stream Relaying](https://awesome-repositories.com/f/graphics-multimedia/live-media-streaming/rtsp-streamers/stream-relaying.md) — Reads RTSP streams and forwards raw packets to TCP sockets for network relaying. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))
- [Media Stream Processing](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/streaming-network-frameworks/media-stream-processing.md) — Decodes video frames or raw audio into numerical arrays for data science and machine learning analysis.
- [Independent Stream Processing](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/streaming-network-frameworks/media-stream-processing/independent-stream-processing.md) — Provides the ability to separate and apply independent filters to audio and video streams before merging them. ([source](https://kkroening.github.io/ffmpeg-python/))
- [Array-Based Frame Processing](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/video-processing-tools/video-frame-navigators/array-based-frame-processing.md) — Extracts individual frames of raw video and audio data into numerical arrays for external analysis. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))
- [Multi-Input Media Filters](https://awesome-repositories.com/f/graphics-multimedia/multi-input-media-filters.md) — Passes multiple input streams to a single filter to overlay content. ([source](https://cdn.jsdelivr.net/gh/kkroening/ffmpeg-python@master/README.md))
- [Multi-Output Media Filters](https://awesome-repositories.com/f/graphics-multimedia/multi-output-media-filters.md) — Splits a stream into multiple outputs to enable parallel processing branches. ([source](https://cdn.jsdelivr.net/gh/kkroening/ffmpeg-python@master/README.md))
- [Multi-Output Merging](https://awesome-repositories.com/f/graphics-multimedia/multi-output-merging.md) — Allows combining several output streams into a single command that writes them simultaneously. ([source](https://kkroening.github.io/ffmpeg-python/))
- [Programmatic Video Generation](https://awesome-repositories.com/f/graphics-multimedia/programmatic-video-generation.md) — Creates video files from sequences of images or raw data frames using programmatic controls.
- [Video Streaming](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/video-streaming.md) — Serves local video files as live streams over HTTP for remote playback. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))
- [Thumbnail Generators](https://awesome-repositories.com/f/graphics-multimedia/thumbnail-generators.md) — Generates representative video thumbnails by capturing and scaling frames at specific timestamps. ([source](https://cdn.jsdelivr.net/gh/kkroening/ffmpeg-python@master/README.md))
- [Video Frame Extraction](https://awesome-repositories.com/f/graphics-multimedia/video-frame-extraction.md) — Extracts individual static frames from a video stream as images or raw data pipes. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))

### Part of an Awesome List

- [Media Filter Application](https://awesome-repositories.com/f/awesome-lists/media/media-processing/media-filter-application.md) — Implements programmatic scaling, cropping, and volume adjustments through a fluent filter interface. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))

### Artificial Intelligence & ML

- [Media Filter Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/domain-specific-processing-pipelines/media-processing-pipelines/media-filter-pipelines.md) — Applies independent filters to separate video and audio streams before concatenating them into a single file. ([source](https://github.com/kkroening/ffmpeg-python/blob/master/examples/README.md))

### Programming Languages & Runtimes

- [Fluent Interfaces](https://awesome-repositories.com/f/programming-languages-runtimes/fluent-interfaces.md) — Implements a fluent API using method chaining to programmatically define media processing sequences.

### Software Engineering & Architecture

- [Command String Generators](https://awesome-repositories.com/f/software-engineering-architecture/schema-driven-generators/command-string-generators.md) — Generates a command-line string from a filter graph for inspection or manual execution. ([source](https://kkroening.github.io/ffmpeg-python/))
