# huangxd-/danmu_api

**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/huangxd-danmu-api).**

2,571 stars · 2,454 forks · JavaScript · AGPL-3.0

## Links

- GitHub: https://github.com/huangxd-/danmu_api
- Homepage: https://danmuapi.vercel.app
- awesome-repositories: https://awesome-repositories.com/repository/huangxd-danmu-api.md

## Topics

`anime` `api` `dandanplay` `danmu` `danmuku` `server`

## Description

danmu_api is a bullet chat API gateway that aggregates video comments from multiple platforms and serves them through a standardized interface for use in media players. It includes a metadata matching service to identify video content across platforms using keywords or file names.

The system uses an adapter-based normalization process to translate diverse platform response formats into a single schema and utilizes a Redis-backed cache to store search results and comment streams. It features a processing engine that cleans comment streams using keyword and regular expression filters.

The project covers comment style conversion and timestamp synchronization to align text with video playback. It also provides an XML exporter to maintain compatibility with legacy media players and includes a web interface for system configuration, log monitoring, and endpoint testing.

## Tags

### Content Management & Publishing

- [Bullet Chat Aggregators](https://awesome-repositories.com/f/content-management-publishing/content-aggregation-curation/comment-systems/comment-extractors/bullet-chat-aggregators.md) — Provides a standardized interface to aggregate bullet comments from various video platforms for media players. ([source](https://cdn.jsdelivr.net/gh/huangxd-/danmu_api@main/README.md))
- [Comment Moderation Filters](https://awesome-repositories.com/f/content-management-publishing/comment-moderation-filters.md) — Removes specific comments using keywords and regular expressions to clean output and reduce noise. ([source](https://cdn.jsdelivr.net/gh/huangxd-/danmu_api@main/README.md))
- [Regex Content Filtering](https://awesome-repositories.com/f/content-management-publishing/community-content-feeds/feed-content-filtering/regex-content-filtering.md) — Processes comment streams through a filter chain using regular expression patterns to remove unwanted text.
- [Bullet Chat Aggregators](https://awesome-repositories.com/f/content-management-publishing/content-aggregation-curation/comment-systems/bullet-comment-rendering/bullet-chat-aggregators.md) — Collects and standardizes real-time comments from various video platforms for display in a single media player.
- [Content Stream Filters](https://awesome-repositories.com/f/content-management-publishing/content-stream-filters.md) — Uses keywords and regular expressions to clean up comment streams and remove noisy text.
- [Comment Style Converters](https://awesome-repositories.com/f/content-management-publishing/content-aggregation-curation/comment-systems/bullet-comment-rendering/comment-style-converters.md) — Transforms comment types and colors to ensure visual compatibility across different video players. ([source](https://cdn.jsdelivr.net/gh/huangxd-/danmu_api@main/README.md))

### Data & Databases

- [Video Content Identifiers](https://awesome-repositories.com/f/data-databases/fuzzy-matching/metadata-based-identifier-matching/video-content-identifiers.md) — Identifies correct video content across platforms using keywords or file names to retrieve the appropriate comment stream. ([source](https://cdn.jsdelivr.net/gh/huangxd-/danmu_api@main/README.md))
- [Video Search Filters](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-and-indexing/content-search-filters/video-search-filters.md) — Locates specific video episodes or titles across multiple platforms using keywords to retrieve relevant identifiers. ([source](https://danmuapi.vercel.app))
- [API Response Caching](https://awesome-repositories.com/f/data-databases/api-response-caching.md) — Caches API endpoint responses for search results and comments to reduce redundant requests and latency. ([source](https://cdn.jsdelivr.net/gh/huangxd-/danmu_api@main/README.md))
- [In-Memory Caches](https://awesome-repositories.com/f/data-databases/in-memory-caches.md) — Utilizes a Redis-backed cache to store frequent search queries and comment streams to reduce latency.
- [Playback Timing Synchronization](https://awesome-repositories.com/f/data-databases/pointer-based-navigation/offset-based-addressing/timestamp-based-offset-lookups/transcript-to-timestamp-mapping/playback-timing-synchronization.md) — Adjusts comment delivery timing using linear scaling and manual offsets to align text with video playback.
- [Redis Caching Layers](https://awesome-repositories.com/f/data-databases/redis-caching-layers.md) — Implements a caching layer using Redis to store search results and comment streams for faster response times.

### Graphics & Multimedia

- [Video Metadata Scraping](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/media-processing/video-analysis-processing/video-metadata-scraping.md) — Extracts unique identifiers from filenames and keywords to aggregate detailed content information from external video platforms.

### Software Engineering & Architecture

- [Comment](https://awesome-repositories.com/f/software-engineering-architecture/api-gateways/comment.md) — Provides a standardized interface that aggregates video comments from multiple platforms and serves them to media players.
- [Comment Style Mappings](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/json-configuration-schemas/visual-style-schemas/comment-style-mappings.md) — Converts platform-specific comment colors and types into player-compatible visual styles.

### Web Development

- [Third-Party Media Player Integrations](https://awesome-repositories.com/f/web-development/third-party-api-integrations/third-party-media-player-integrations.md) — Connects external video players to a comment API to stream and render live bullet chat overlays.
- [Schema Normalizations](https://awesome-repositories.com/f/web-development/external-api-integrations/schema-normalizations.md) — Translates diverse video platform response formats into a single standardized schema for consistent consumption.

### Networking & Communication

- [Video Comment Overlays](https://awesome-repositories.com/f/networking-communication/real-time-messaging/video-comment-overlays.md) — Synchronizes the timing of bullet chat overlays to match video playback via offsets and scaling. ([source](https://cdn.jsdelivr.net/gh/huangxd-/danmu_api@main/README.md))
