Bilibili-XMLSubtitle-to-ASS visualization Bilibili local video XML barrage conversion ASS subtitle converter: Added automatic conversion Bilibili downloaded video function

Visualize Bilibili local video XML barrage conversion ASS subtitle converter

A visual, ready-to-use tool for converting Bilibili bullet chat into ASS format subtitles that local players can recognize.

In addition, this tool has another magical function. If you want to watch a barrage of a TV series/movie that once existed on Station B but is now off the shelf, this tool can help you do this more or less. Specifically Please see below for the method.

Version update: Added the function of automatically converting Bilibili downloaded videos

Since the downloaded videos of the current version of the bilibili client cannot be directly opened and watched on the local player, the program has added the function of automatically converting the downloaded video into a video file that can be opened and played by the local player during the process of converting the barrage. There is no need for the user to manually select. Note that the converted video cannot be opened and watched with the Bilibili UWP player!

project address

NaiboWang/Bilibili-XMLSubtitle-to-ASS: Visualize Bilibili local video XML barrage conversion ASS subtitle converter (github.com)​github.com/NaiboWang/Bilibili-XMLSubtitle-to-ASS

achieve effect

Features

This tool can convert the downloaded default XML barrage file of the Bilibili video into an ASS subtitle file that can be recognized by the local player and load and play it, so as to play the video without the Bilibili player and use a local player (such as PotPlayer ) And with the function of barrage . At the same time, the following additional functions are provided:

  1. Bullet chat update function, update the latest bullet chat according to the info file (use with caution, because of the B station interface, the number of updated bullet chat may be less than the original number, of course, the original bullet chat file will not be updated after updating deleted, but changed the name).
  2. Automatically modify the font size of the corresponding barrage according to the size of the video , that is, self-adaptive.
  3. Supports renaming of video folders downloaded using the Bilibili Windows client .
  4. Customize the font style, size, transparency, and duration of a single bullet chat.
  5. This warehouse also talks about how to download the bullet chat files of Bilibili videos that have been taken off the shelves or cannot be downloaded. With third-party downloads, the function of watching bullet chat locally can also be realized.

renderings

【Movie: The Mermaid】

【Detective Conan Movie】

【TV Drama: Underground Transportation Station】

【Game Recording: Legend of Sword and Fairy IV】

The tool will automatically match the video resolution to generate the corresponding font size, such as:

[High resolution video 4K: Detective Di Renjie]

[Low resolution 360P video: Ultraman Mebius]

That is, no matter how big the video is (360P or 4K), the font size of the generated subtitles looks very appropriate, and other tools on the Internet have not achieved this for the time being.

The font style, size and transparency of the barrage can also be adjusted, such as large italics and low transparency "Bright Sword" barrage:

【TV Drama: Bright Sword】

In short, as long as it is an XML barrage file of station B (no matter where the video is downloaded from), it can be converted into a barrage file that can be loaded by a local player (such as PotPlayer), and the effect is basically the same as that of the official player of station B ( In addition to the advanced barrage and auto-block functions).

Of course, if there are too many bullet screens, it will affect viewing. After all, there is no automatic subtitle protection function. At this time, it is recommended to reduce the transparency of the subtitles:

[Ghost Animal Video: King of Poems]

How to use the tool

This tool is very simple to use, simply put it is three steps:

  1. Download the video and bullet chat, and put them in the same folder, keep the XML names of the video and bullet chat in compliance with the specification (the video downloaded with the Bilibili client is by default conforming to the specification, and how to do it will be described below).
  2. Select the folder with videos and bullet chats (multi-level directories are supported, that is to say, if there are two folders B and C under folder A, if A is selected, the tool will search for videos and bullet chats under folder A, And the videos and barrage under the B and C folders, if there are nested folders under the B folder, they will also be searched level by level).
  3. Configuration options (such as whether to rename the directory, bullet chat font size, style, transparency, whether to update the bullet chat, etc.), all configuration parameters keep the default is the effect in the rendering.
  4. Click the "Execute!" button to execute.

But here it should be noted that the principle of this tool is to search for video files, and then find out whether the video files have XML files that meet the specifications. If so, convert them into corresponding ASS barrage files. Adaptive, therefore, conversion cannot be performed with only XML files and no video files !

If there are many video files in the folder selected by the user, it may be stuck for a while after clicking the "Execute!" button. Please do not forcibly close the program. Please pay attention to the output information in the black console, which will show which file is currently being processed , indicating that it is not stuck at this time.

Video download method

There are generally two download channels for videos and barrage:

  1. Download directly through the Bilibili client of Win 10/Win 11. In this way, the Bilibili client will download the video and barrage at the same time.
  2. The video is downloaded from a third-party channel, such as Xunlei, Baidu/Ali Wangdisk, and the bullet chat file is downloaded through Bilibili's API (we will talk about how to use this method to download the bullet chat at station B later).

Please refer to the Github documentation for detailed usage:

NaiboWang/Bilibili-XMLSubtitle-to-ASS: Visualize Bilibili local video XML barrage conversion ASS subtitle converter (github.com)​github.com/NaiboWang/Bilibili-XMLSubtitle-to-ASS

Guess you like

Origin blog.csdn.net/qq_20028731/article/details/126985119