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.

v0.2.0发布于 2025-06-27 06:16 UTC1,038star108fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
README 未给出安装命令,安装步骤见官网 Getting Started 的 Install 页面:https://babitmf.github.io/docs/bmf/getting_started_yourself/install/
硬件要求按 README 说明

README 未说明具体显存要求;支持 Linux、Windows、macOS,并针对 x86 与 ARM CPU 优化;GPU 加速部分与 NVIDIA 合作开发,另有 TensorRT 加速示例。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

字节跳动开源的多媒体处理框架,用图的方式拼装视频转码、AI 推理和直播管线

跨平台多媒体处理框架,支持 GPU 加速和异构调度,可把转码、AI 推理、算法模块和直播流处理串成一条流水线。

核心能力

  • 用 Python、Go、C++ 三种语言 API 搭建处理图
  • 解耦架构,可独立添加自定义模块扩展能力
  • 内置调度器支持 CPU/GPU 异构流水线
  • 在 FFmpeg、Numpy、PyTorch、OpenCV、TensorRT 间无缝转换数据
  • 提供 GPU 转码与滤镜模块,整条管线可跑在 GPU 上

容易踩的坑

示例需要额外下载示例文件包 files.tar.gz;GPU 相关 demo 依赖 NVIDIA GPU 与 TensorRT 等后端,需自行准备环境;README 未给出 pip 安装命令,需按官网文档安装。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.0
  1. v0.2.0BabitMF Release 0.2.0最新正式版2025-06-27 · 2025-06-27 06:16 UTC

    Changes from github community

    Changes from bytedance internal

    1. 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.
    2. 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.
    3. Add default rpath to MacOS binaries for homebrew installed ffmpeg4.
    4. Added BMF module template generator CLI tool and "bmf_template_generator" shortcut via the pip wheel package.
    5. Added demo for LLM video caption.

    New Contributors

    Full Changelog: https://github.com/BabitMF/bmf/compare/v0.1.0...v0.2.0

  2. v0.1.0BabitMF Release 0.1.02025-04-14 · 2025-04-14 03:37 UTC
    查看更新说明

    Changes from github community

    Changes from bytedance internal

    1. Update and compat related github action, fix some problems
    2. Support python3.11 - 3.12 wheel package building
    3. Fix import dylink problem occured when using babitmf by "pip install" in mac platform
    4. Unify HMP naming scheme (Python interface change) and deprecate all occurrences of HML
    5. Some issues of framework and built-in modules have been fixed
    6. Add dynamic reset interface to sync module and pre module
    7. Fix hang issues while using amix filter
    8. Fix rotate problems in hardware decoder

    New Contributors

    Full Changelog: https://github.com/BabitMF/bmf/compare/v0.0.12...v0.1.0

  3. v0.0.13BabitMF Release 0.0.132025-03-26 · 2025-03-26 09:26 UTC
    查看更新说明

    Changes from github community

    Changes from bytedance internal

    1. Update and compat related github action, fix some problems
    2. Support python3.11 - 3.12 wheel package building
    3. Fix import dylink problem occured when using babitmf by "pip install" in mac platform
    4. Unify HMP naming scheme (Python interface change) and deprecate all occurrences of HML
    5. Some issues of framework and built-in modules have been fixed.
    6. Add dynamic reset interface to sync module and pre module
    7. Fix hang issues while using amix filter

    New Contributors

    Full Changelog: https://github.com/BabitMF/bmf/compare/v0.0.12...v0.0.13

  4. v0.0.12_test_actiontest action2025-03-17 · 2025-03-17 08:23 UTC

    这个版本没有写更新说明。

  5. v0.0.12_test_v10test ci2025-01-08 · 2025-01-08 10:46 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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 Open In Colab

    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 Open In Colab

    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:

    1. 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
    2. 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 Open In Colab

    GPU Video Transcoding and Filtering

    The GPU transcoding and filter module demo shows:

    1. Common video/image filters in BMF accelerated by GPU
    2. 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 Open In Colab

    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 Open In Colab

    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 Open In Colab

    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 Open In Colab

    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 Open In Colab

    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 Open In Colab

    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

    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!