Skip to main content
bilivideodownloader.com
en

Free tool · files stay on your device

Danmaku XML to ASS converter

Drop a Bilibili danmaku .xml file and get an .ass subtitle file where comments scroll across the video like they do on Bilibili, with their original colours and sizes.

Display settings

What the converter does

Bilibili stores comments as XML: each <d p="12.5,1,25,16777215,…">text</d> line holds the time in seconds, the comment mode, the font size and the colour. The converter reads those and writes an ASS subtitle line for each one.

  • Scrolling comments (modes 1 to 3) move right to left over the scroll time you set. Each one gets its own row, so comments posted at the same moment don't pile on top of each other. Longer comments move faster, as on Bilibili.
  • Top and bottom comments (modes 5 and 4) stay centred for four seconds and stack downwards or upwards.
  • Reverse comments (mode 6) scroll left to right.
  • Colours and the small, normal and large sizes carry over. Text is stripped of ASS override tags, so a comment can't restyle or reposition the rest of the file.

Getting the XML in the first place

Paste the video link into our subtitle and danmaku downloader and open the Danmaku tab. It can save the XML or convert to ASS directly, with default settings. Use this page when you already have XML files from another tool, want different settings, or want to convert a whole folder of them.

The XML holds the comments Bilibili currently serves for the video, which is usually the most recent few thousand, not every comment ever posted.

FAQ

Frequently Asked Questions About Bilibili Downloader

Video quality, sound, MP3, b23.tv links, and whether downloading is allowed.

Where do I get a Bilibili danmaku XML file?

Bilibili serves each video part’s comments as XML at comment.bilibili.com/<cid>.xml. The easiest way is the Danmaku tab of our subtitle and danmaku downloader, which saves the XML (or a ready ASS) for any public video. Most command-line downloaders and browser extensions save the same XML.

Is my file uploaded anywhere?

No. The file is read and converted by JavaScript in this page, and the ASS file is created in your browser. Nothing is sent to our server, so it also works offline once the page has loaded.

How do I play the ASS file with my video?

Give the .ass file the same name as the video (video.mp4 and video.ass) and keep them in one folder. VLC, mpv, PotPlayer, IINA and MPC-HC load it automatically. Otherwise drag the .ass onto the player window or use its Subtitle › Add subtitle file menu.

Which resolution should I pick?

Pick the resolution of your video. ASS positions comments in pixels of that canvas, and players scale it to the window, so a 1080p setting on a 720p video still works but text looks smaller than intended.

Why are some comments missing from the ASS file?

Advanced comments (mode 7), code comments (mode 8) and BAS comments (mode 9) carry their own positions and scripts that ASS can’t reproduce, so they are skipped. Empty comments are dropped too. Everything else, including top, bottom and reverse-scrolling comments, is kept with its colour and size.

The file came out empty or the converter says it isn’t danmaku. Why?

The converter looks for <d p="..."> elements, which is Bilibili’s XML format. Protobuf (.so/.bin) danmaku, JSON exports from other tools, and already-converted .ass files won’t match. Files saved compressed straight from comment.bilibili.com are decompressed automatically.