Skip to main content

Babit Multimedia Framework

Project description

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 Mac OS, 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.

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 five dimensions: Transcode, Edit, Meeting/Broadcaster, GPU acceleration, and AI Inference. 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

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

Table of Contents

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

BabitMF_GPU-0.0.11-cp310-cp310-manylinux_2_28_x86_64.whl (37.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

BabitMF_GPU-0.0.11-cp39-cp39-manylinux_2_28_x86_64.whl (37.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

BabitMF_GPU-0.0.11-cp38-cp38-manylinux_2_28_x86_64.whl (37.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

BabitMF_GPU-0.0.11-cp37-cp37m-manylinux_2_28_x86_64.whl (37.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.28+ x86-64

BabitMF_GPU-0.0.11-cp36-cp36m-manylinux_2_28_x86_64.whl (37.5 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.28+ x86-64

File details

Details for the file BabitMF_GPU-0.0.11-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for BabitMF_GPU-0.0.11-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3c7621f2afa02b53a0f6b4abf3905d3ccccd51aa2feeb18612e45051f5d14f4c
MD5 8b40b649be61f1d23e68daf66b2bbc4a
BLAKE2b-256 f2f0b6ca683aca798d81e76daf9e5f7c2e43e0b98f0fdec0b7caf32796cdabf4

See more details on using hashes here.

File details

Details for the file BabitMF_GPU-0.0.11-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for BabitMF_GPU-0.0.11-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2eee349f30e5b2f7bf86d47ad08e71fd1e012cf78cee6b938aca273ace828e2
MD5 6518e484b88037b3921240578135dcea
BLAKE2b-256 4b4e35a46c090d117466eb38c3ca86403a5740fc0f1c6bcff859b0c2b71892c6

See more details on using hashes here.

File details

Details for the file BabitMF_GPU-0.0.11-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for BabitMF_GPU-0.0.11-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 822a8dc211de8af493e633da437ca341dee08101b3ce782ede984250a13ada8d
MD5 5c4e16edc85d8efab5b5516efc93330c
BLAKE2b-256 913338e2be2e6cc31a8ee83fcf4ff4f7a788cc37db3043c7cc399a3c47e8345b

See more details on using hashes here.

File details

Details for the file BabitMF_GPU-0.0.11-cp37-cp37m-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for BabitMF_GPU-0.0.11-cp37-cp37m-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a9e81805707884778db3de7e6cc55b7ae225b82955b1574f67b7a719c2014d58
MD5 fc9ab520655e580c126192873a6cc40d
BLAKE2b-256 49b6dc076bacb8ddb60180022e9a1fd4b475d6b109bb02c96b97781bda673c8b

See more details on using hashes here.

File details

Details for the file BabitMF_GPU-0.0.11-cp36-cp36m-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for BabitMF_GPU-0.0.11-cp36-cp36m-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b024a4e71bd72dd08ed28b6a29ea7b52150294de221be9db14aa686acb602558
MD5 b1b3ae5c7e9004e6c668aed36100ecf2
BLAKE2b-256 81f8a9546bf477b7fdffa6dcae0b62e82f1f187c236e8f7003dd127aed9afaf6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page