Danmaku Density & Spam Filter

Clean Bilibili or AcFun XML danmaku files by removing spam, repeated comments, or thinning density for better video visibility.

100% in your browser · nothing uploaded
Jump toCommon ProblemsHow to useFAQ
Paste Bilibili/AcFun XML here or drop file

Press Cmd/Ctrl + Enter to process

Filter Settings

Density & Thinning

Global Adjustments

Common Problems

Q

How do I handle large danmaku files that cause browser lag during processing?

A

The tool processes files in segments to minimize memory impact, but for exceptionally massive files, it is recommended to filter by specific time ranges first. This approach keeps the browser responsive while effectively pruning the unnecessary comment data.

Q

Why are some comments still appearing after applying a keyword filter?

A

Ensure that the keyword list is comma-separated and does not include extra spaces that might interfere with exact matching. If the issue persists, consider checking if the comments contain hidden Unicode characters by using the regex filter option to target them.

Q

Is there a way to restore the original XML after I have processed it?

A

The tool operates as a destructive editor during the generation of the output, so you should keep a local copy of your original file before processing. Once you download the cleaned version, the original structure is not cached in the tool's session state.

Q

Can this filter affect the timing metadata of my danmaku comments?

A

The filter is designed to preserve the timing metadata (`p` attribute) exactly as it appears in the original, ensuring your comments stay synced to the video frames. It only removes the content nodes that match your exclusion criteria, leaving the playback timeline completely untouched.

Q

Does this work with file formats other than Bilibili or AcFun XML?

A

Currently, the parser is optimized specifically for the standard XML structures used by Bilibili and AcFun platforms. Attempting to upload unsupported subtitle formats may lead to parsing errors or an empty statistics result.

Workflow

What is Danmaku Density & Spam Filter?

Danmaku, or bullet comments, often clutter video screens with repetitive spam or excessive density that obscures the content. This tool allows viewers to sanitize Bilibili and AcFun XML danmaku files by filtering out unwanted messages based on keywords, user IDs, or regex patterns.

Beyond basic filtering, the tool provides density-based thinning, deduplication windows, and the ability to hide fixed-position comments (top/bottom). It also supports global font size scaling. All processing happens locally in your browser, ensuring your subtitle files remain private while you prepare a cleaner viewing experience.

How to use Danmaku Density & Spam Filter

Paste your Bilibili or AcFun XML content into the input area or drop the file directly. Use the configuration panel to set keyword exclusions, regular expression filters, and user ID blacklists. Adjust the density settings to limit comments per second or remove duplicates within a specific time window, then click Process Danmaku to generate and download the updated XML file.

Example

Input XML:
<i>
  <d p="10.5,1,25,16777215,1718200000,0,u1,r1">Spam</d>
  <d p="10.6,1,25,16777215,1718200001,0,u1,r2">Spam</d>
</i>

Filtered Output (with 3s deduplication window):
<?xml version="1.0" encoding="UTF-8"?>
<i>
  <d p="10.5,1,25,16777215,1718200000,0,u1,r1">Spam</d>
</i>

Use Cases

1. Removing repetitive bot-generated spam comments from popular video XML files.

2. Thinning out high-density danmaku segments to maintain visual clarity during fast-paced scenes.

3. Filtering out specific toxic users or restricted keywords from community-archived subtitle tracks.

4. Globally scaling font sizes or hiding fixed-position comments for better compatibility with local media players.

FAQ

Does this tool store my uploaded XML files on a server?

No, all processing occurs directly in your browser. Your data is never transmitted or saved, ensuring complete privacy for your subtitle files.

Can I use regular expressions to filter danmaku?

Yes, you can define custom regex patterns to target complex spam sequences or specific formatting styles that traditional keyword filters might miss.

How does the density thinning algorithm work?

It limits the number of comments displayed within a specified time window, prioritizing keeping unique comments while shedding excess layers based on your defined maximum per-second settings.

Try also