示例需要额外下载示例文件包 files.tar.gz;GPU 相关 demo 依赖 NVIDIA GPU 与 TensorRT 等后端,需自行准备环境;README 未给出 pip 安装命令,需按官网文档安装。
bmf
BabitMFApache-2.0活跃维护跨平台多媒体处理框架,支持 GPU 加速和异构调度,可把转码、AI 推理、算法模块和直播流处理串成一条流水线。
Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
README 未给出安装命令,安装步骤见官网 Getting Started 的 Install 页面:https://babitmf.github.io/docs/bmf/getting_started_yourself/install/README 未说明具体显存要求;支持 Linux、Windows、macOS,并针对 x86 与 ARM CPU 优化;GPU 加速部分与 NVIDIA 合作开发,另有 TensorRT 加速示例。
字节跳动开源的多媒体处理框架,用图的方式拼装视频转码、AI 推理和直播管线
跨平台多媒体处理框架,支持 GPU 加速和异构调度,可把转码、AI 推理、算法模块和直播流处理串成一条流水线。
核心能力
- 用 Python、Go、C++ 三种语言 API 搭建处理图
- 解耦架构,可独立添加自定义模块扩展能力
- 内置调度器支持 CPU/GPU 异构流水线
- 在 FFmpeg、Numpy、PyTorch、OpenCV、TensorRT 间无缝转换数据
- 提供 GPU 转码与滤镜模块,整条管线可跑在 GPU 上
容易踩的坑
- v0.2.0BabitMF Release 0.2.0最新正式版2025-06-27 · 2025-06-27 06:16 UTC
Changes from github community
- engine/builder: enable module callback can be called in cpp by @JackLau1222 in https://github.com/BabitMF/bmf/pull/171
- feature: move submodule to cmake by @meinie0826 in https://github.com/BabitMF/bmf/pull/191
- explicitly add download resources link in 'Getting Started' section by @WaterWhisperer in https://github.com/BabitMF/bmf/pull/192
- TraceLogger bugfix for register_queue by @Nielsencu in https://github.com/BabitMF/bmf/pull/197
Changes from bytedance internal
- Add data report interface and mechanism. Now users can implement a shared-library named "libbmf_data_reporter.so" by inheriting the interface named "bmf_kafka_reporter_interface.h", the library should contain the capacity to report the data generated from engine and module inside by some mechanism (Ex. Kafka/RabbitMQ/RocketMQ/Local file, etc..), which will be used by framework itself, then users are able to statistic the business and performance metrics of each modules and graphs by BMF framework.
- Upgrade the ci env related "ubuntu-20-04" to "ubuntu-22-04" because the "ubuntu-20-04" env in github ci met EOL https://github.com/actions/runner-images/issues/11101. Because of this change, the python version which default released binary packages are associated will be upgraded from 3.9 to 3.10.
- Add default rpath to MacOS binaries for homebrew installed ffmpeg4.
- Added BMF module template generator CLI tool and "bmf_template_generator" shortcut via the pip wheel package.
- Added demo for LLM video caption.
New Contributors
- @meinie0826 made their first contribution in https://github.com/BabitMF/bmf/pull/191
- @WaterWhisperer made their first contribution in https://github.com/BabitMF/bmf/pull/192
- @Nielsencu made their first contribution in https://github.com/BabitMF/bmf/pull/197
Full Changelog: https://github.com/BabitMF/bmf/compare/v0.1.0...v0.2.0
- v0.1.0BabitMF Release 0.1.02025-04-14 · 2025-04-14 03:37 UTC
查看更新说明
Changes from github community
- CONTRIBUTING: Improve documentation by @JackLau1222 in https://github.com/BabitMF/bmf/pull/176
- README: Improve documentation by @Jimmy385898 in https://github.com/BabitMF/bmf/pull/178
- c_engine: update internal module license to apache 2.0 by @JackLau1222 in https://github.com/BabitMF/bmf/pull/177
- Upgrade ci release pipeline, Support build wheel for py3.11 - 3.12 by @taoboyang in https://github.com/BabitMF/bmf/pull/179
- compat for mac python wheel package by @taoboyang in https://github.com/BabitMF/bmf/pull/182
- Update setup.py's version to 0.0.13 by @taoboyang in https://github.com/BabitMF/bmf/pull/180
- Upgrade release pipeline by @taoboyang in https://github.com/BabitMF/bmf/pull/184
- feat: adjust greeting message by @hulibruce in https://github.com/BabitMF/bmf/pull/183
- rename broadcaster.py to broadcaster_demo.py by @Old-cpu in https://github.com/BabitMF/bmf/pull/185
- Update version to 0.1.0 by @taoboyang in https://github.com/BabitMF/bmf/pull/186
Changes from bytedance internal
- Update and compat related github action, fix some problems
- Support python3.11 - 3.12 wheel package building
- Fix import dylink problem occured when using babitmf by "pip install" in mac platform
- Unify HMP naming scheme (Python interface change) and deprecate all occurrences of HML
- Some issues of framework and built-in modules have been fixed
- Add dynamic reset interface to sync module and pre module
- Fix hang issues while using amix filter
- Fix rotate problems in hardware decoder
New Contributors
- @Jimmy385898 made their first contribution in https://github.com/BabitMF/bmf/pull/178
- @Old-cpu made their first contribution in https://github.com/BabitMF/bmf/pull/185
Full Changelog: https://github.com/BabitMF/bmf/compare/v0.0.12...v0.1.0
- v0.0.13BabitMF Release 0.0.132025-03-26 · 2025-03-26 09:26 UTC
查看更新说明
Changes from github community
- CONTRIBUTING: Improve documentation by @JackLau1222 in https://github.com/BabitMF/bmf/pull/176
- README: Improve documentation by @Jimmy385898 in https://github.com/BabitMF/bmf/pull/178
- c_engine: update internal module license to apache 2.0 by @JackLau1222 in https://github.com/BabitMF/bmf/pull/177
- Upgrade ci release pipeline, Support build wheel for py3.11 - 3.12 by @taoboyang in https://github.com/BabitMF/bmf/pull/179
- compat for mac python wheel package by @taoboyang in https://github.com/BabitMF/bmf/pull/182
- Update setup.py's version to 0.0.13 by @taoboyang in https://github.com/BabitMF/bmf/pull/180
- Upgrade release pipeline by @taoboyang in https://github.com/BabitMF/bmf/pull/184
- feat: adjust greeting message by @hulibruce in https://github.com/BabitMF/bmf/pull/183
Changes from bytedance internal
- Update and compat related github action, fix some problems
- Support python3.11 - 3.12 wheel package building
- Fix import dylink problem occured when using babitmf by "pip install" in mac platform
- Unify HMP naming scheme (Python interface change) and deprecate all occurrences of HML
- Some issues of framework and built-in modules have been fixed.
- Add dynamic reset interface to sync module and pre module
- Fix hang issues while using amix filter
New Contributors
- @Jimmy385898 made their first contribution in https://github.com/BabitMF/bmf/pull/178
Full Changelog: https://github.com/BabitMF/bmf/compare/v0.0.12...v0.0.13
- v0.0.12_test_actiontest action2025-03-17 · 2025-03-17 08:23 UTC
这个版本没有写更新说明。
- v0.0.12_test_v10test ci2025-01-08 · 2025-01-08 10:46 UTC
这个版本没有写更新说明。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
BMF - Cross-platform, multi-language, customizable video processing framework with strong GPU acceleration
BMF (Babit Multimedia Framework) is a cross-platform, multi-language, customizable multimedia processing framework developed by ByteDance. With over 4 years of testing and improvements, BMF has been tailored to adeptly tackle challenges in our real-world production environments. It is currently widely used in ByteDance's video streaming, live transcoding, cloud editing and mobile pre/post processing scenarios. More than 2 billion videos are processed by the framework every day.
Here are some key features of BMF:
-
Cross-Platform Support: Native compatibility with Linux, Windows, and macOS, as well as optimization for both x86 and ARM CPUs.
-
Easy to use: BMF provides Python, Go, and C++ APIs, allowing developers the flexibility to code in their favourite languages.
-
Customizability: Developers can enhance the framework's features by adding their own modules independently because of BMF decoupled architecture.
-
High performance: BMF has a powerful scheduler and strong support for heterogeneous acceleration hardware. Moreover, NVIDIA has been cooperating with us to develop a highly optimized GPU pipeline for video transcoding and AI inference.
-
Efficient data conversion: BMF offers seamless data format conversions across popular frameworks (FFmpeg/Numpy/PyTorch/OpenCV/TensorRT), conversion between hardware devices (CPU/GPU), and color space and pixel format conversion.
BMFLite is a client-side cross-platform, lightweight, more efficient client-side multimedia processing framework. So far, the BMFLite client-side algorithm is used in apps such as Douyin/Xigua, serving more than one billion users in live streaming/video playing/pictures/cloud games and other scenarios, and processing videos and pictures trillions of times every day.
Dive deeper into BMF's capabilities on our website for more details.
Quick Experience
In this section, we will directly showcase the capabilities of the BMF framework around six dimensions: Transcode, Edit, Meeting/Broadcaster, GPU acceleration, AI Inference, and client-side Framework. For all the demos provided below, corresponding implementations and documentation are available on Google Colab, allowing you to experience them intuitively.
Transcode
This demo describes step-by-step how to use BMF to develop a transcoding program, including video transcoding, audio transcoding, and image transcoding. In it, you can familiarize yourself with how to use BMF and how to use FFmpeg-compatible options to achieve the capabilities you need.
If you want to have a quick experiment, you can try it on
Edit
The Edit Demo will show you how to implement a high-complexity audio and video editing pipeline through the BMF framework. We have implemented two Python modules, video_concat and video_overlay, and combined various atomic capabilities to construct a complex BMF Graph.
If you want to have a quick experiment, you can try it on
Meeting/Broadcaster
This demo uses BMF framework to construct a simple broadcast service. The service provides an API that enables dynamic video source pulling, video layout control, audio mixing, and ultimately streaming the output to an RTMP server. This demo showcases the modularity of BMF, multi-language development, and the ability to dynamically adjust the pipeline.
Below is a screen recording demonstrating the operation of broadcaster:

GPU acceleration
GPU Video Frame Extraction
The video frame extraction acceleration demo shows:
-
BMF flexible capability of:
- Multi-language programming, we can see multi-language modules work together in the demo
- Ability to extend easily, there are new C++, Python modules added simply
- FFmpeg ability is fully compatible
-
Hardware acceleration quickly enablement and CPU/GPU pipeline support
- Heterogeneous pipeline is supported in BMF, such as process between CPU and GPU
- Useful hardware color space conversion in BMF
If you want to have a quick experiment, you can try it on
GPU Video Transcoding and Filtering
The GPU transcoding and filter module demo shows:
- Common video/image filters in BMF accelerated by GPU
- How to write GPU modules in BMF
The demo builds a transcoding pipeline which fully runs on GPU:
decode->scale->flip->rotate->crop->blur->encode
If you want to have a quick experiment, you can try it on
AI inference
LLM preprocessing
The prototype of how to build a video preprocessing for LLM training data in Bytedance, which serves billions of clip processing each day.
The input video will be split according to scene change, and subtitles in the video will be detected and cropped by OCR module, and the video quality will be assessed by BMF provided aesthetic module. After that, the finalized video clips will be encoded as output.
If you want to have a quick experiment, you can try it on
Deoldify
This demo shows how to integrate the state of art AI algorithms into the BMF video processing pipeline. The famous open source colorization algorithm DeOldify is wrapped as a BMF pyhton module in less than 100 lines of codes. The final effect is illustrated below, with the original video on the left side and the colored video on the right.
If you want to have a quick experiment, you can try it on

Super Resolution
This demo implements the super-resolution inference process of Real-ESRGAN as a BMF module, showcasing a BMF pipeline that combines decoding, super-resolution inference and encoding.
If you want to have a quick experiment, you can try it on
Video Quality Score
This demo shows how to invoke our aesthetic assessment model using bmf. Our deep learning model Aesmode has achieved a binary classification accuracy of 83.8% on AVA dataset, reaching the level of academic SOTA, and can be directly used to evaluate the aesthetic degree of videos by means of frame extraction processing.
If you want to have a quick experiment, you can try it on
Face Detect With TensorRT
This Demo shows a full-link face detect pipeline based on TensorRT acceleration, which internally uses the TensorRT-accelerated Onnx model to process the input video. It uses the NMS algorithm to filter repeated candidate boxes to form an output, which can be used to process a Face Detection Task efficiently.
If you want to have a quick experiment, you can try it on
Client-side Framework
Edge AI models
This case illustrates the procedures of integrating an external algorithm module into the BMFLite framework and management of its execution.
Real-time denoise
This example implements the denoise algorithm as a BMF module, showcasing a BMF pipeline that combines video capture, noise reduction and rendering.
Table of Contents
-
- Install
- Create a Graph
- one of transcode example with 3 languages
- Use Module Directly
- Create a Module
If you need example files, you can find them in https://github.com/BabitMF/bmf/releases/download/files/files.tar.gz
License
The project has an Apache 2.0 License. Third party components and dependencies remain under their own licenses.
Contributing
Contributions are welcomed. Please follow the guidelines.
We use GitHub issues to track and resolve problems. If you have any questions, please feel free to join the discussion and work with us to find a solution.
Acknowledgment
The decoder, encoder and filter reference ffmpeg cmdline tool. They are wrapped as BMF's built-in modules under the LGPL license.
The project also draws inspiration from other popular frameworks, such as ffmpeg-python and mediapipe. Our website is using the project from docsy based on hugo.
Here, we'd like to express our sincerest thanks to the developers of the above projects!