中文文档 | English Document
npx bili-pc-mp4 ~/Movies/bilibilibili-pc-mp4 is a tool for converting videos downloaded from the "Bilibili Desktop Client" (Windows (non-UMP), Mac version) into MP4 format.
Please note that bili-pc-mp4 is not a downloader, and you need to first use the "Bilibili Desktop Client" to perform "offline caching" of the videos.
bili-pc-mp4 only supports videos downloaded using the "Bilibili Desktop Client" and does not support other platform clients.
You need to first install ffmpeg.
- Decrypts and merges videos without loss of audio and video quality.
- Supports batch conversion of multiple videos.
- Supports viewing video information.
- Simple and easy-to-use command-line tool.
- Low memory usage.
You can use the simple command at the top of the page or use the complete command:
npx bili-pc-mp4 convert -i ~/Movies/bilibili -o ~/Movies/converted| Name | Type | Description |
|---|---|---|
--input, -i |
Path | Specifies the location of the videos to be converted. It can be a folder containing a single video or multiple videos. |
--output, -o |
Path | Specifies the output location for the videos. Defaults to the current location. |
--page-number, -p |
Whether to include the page number (分p) before the output video filename. | |
--silence, -s |
Whether to suppress terminal output. | |
--buffer-size, -b |
Number | Specifies the block size (in KB) for reading file streams. Defaults to 64 MB. For effective decryption, this value should not be less than 16 KB. |
You can input the following command to see complete help information and usage examples:
npx bili-pc-mp4 helpnpx bili-pc-mp4 list ~/Movies/bilibiliYou can also use bili-pc-mp4 as a library; bili-pc-mp4 uses CommonJS.
bili-pc-mp4 has complete JSDoc, and its features and options are consistent with the command-line.
npm i bili-pc-mp4import { listVideos, processFolder } from 'bili-pc-mp4';
// View video information
await listVideos('./bilibili');
// Convert videos
await processFolder('./bilibili', {
output: './converted',
pageNumber: true,
silence: true,
bufferSize: 64 * 1024,
});