About this project
bili_add_on is a command-line tool used to overlay Bilibili danmaku on videos. The tool supports automatically pulling danmaku XML from Bilibili video IDs as well as loading local XML files.
Main Functions and Features:
1. Multiple Input Modes:
- `overlay`: Overlays danmaku onto local video files, supporting standard input (STDIN) and standard output (STDOUT) pipe operations.
- `capture`: Real-time video input from capture devices (such as cameras or screen capture) with danmaku overlay.
- `list-devices`: Lists available capture devices.
2. Rendering and Customization:
- Supports various danmaku modes including scrolling, bottom, top, and reverse.
- Customizable danmaku opacity, display area (upper and lower bound ratios), font size scaling, scrolling speed, and line spacing.
- Features a glyph-level font fallback mechanism, supporting user-defined fonts, system fonts, and project-built-in fonts (such as Source Han Sans).
3. Encoding and Performance:
- Relies on ffmpeg for video encoding and decoding.
- Supports hardware-accelerated encoding, including NVIDIA NVENC, AMD AMF, and Intel QuickSync, and provides libx264 software encoding preset tuning.
- Employs a three-stage concurrent pipeline architecture consisting of decoding, rendering, and encoding.
4. Audio Processing:
- Retains original video audio by default and supports using `--audio` to specify external audio sources with timeline clipping and alignment.
This tool is open-sourced under the MIT license.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.