Giter Site home page Giter Site logo

bili-pc-mp4's Introduction

bili-pc-mp4

npm license size GitHub release

中文文档 | English Document

npx bili-pc-mp4 ~/Movies/bilibili

bili-pc-mp4 是用于将「Bilibili 桌面客户端」(Windows(非 UMP), Mac 版)下载的视频转换为 MP4 格式的工具。

请注意 bili-pc-mp4 并非下载器,您需要先通过「Bilibili 桌面客户端」对视频进行「离线缓存」。

bili-pc-mp4 仅支持由「Bilibili 桌面客户端」下载的视频,不支持其它平台客户端。

您需要先安装 ffmpeg.

🌟 特性

  • 解密并合并视频,不损失音画质
  • 支持批量转换多个视频
  • 支持查看视频信息
  • 简单易用的命令行工具
  • 低内存占用

🔧 命令行工具

转换视频

您可以使用页首的简单命令,或使用完整命令:

npx bili-pc-mp4 convert -i ~/Movies/bilibili -o ~/Movies/converted

命令行支持如下选项:

名称 类型 简介
--input, -i 路径 指定要转换的视频位置,可以是单个视频的文件夹,也可以是包含多个视频的文件夹。
--output, -o 路径 指定输出视频的位置,默认为当前位置。
--page-number, -p 是否在输出的视频文件名前加入分p 序号。
--silience, -s 是否取消终端输出。
--buffer-size, -b 数字 指定读取文件流的分块大小(KB),默认为64 MB,为使解密有效,该值应不少于 16 KB.

你可以输入以下命令查看完整帮助信息和使用示例:

npx bili-pc-mp4 help

查看视频信息

npx bili-pc-mp4 list ~/Movies/bilibili

📖 作为库使用

您也可以讲 bili-pc-mp4 作为库使用,bili-pc-mp4 使用 CommonJS.

bili-pc-mp4 完整使用 JSDoc,各功能及选项与命令行一致。

npm i bili-pc-mp4
import { listVideos, processFolder } from 'bili-pc-mp4';

// 查看视频信息
await listVideos('./bilibili');

// 转换视频
await processFolder('./bilibili', {
  output: './converted',
  pageNumber: true,
  silence: true,
  bufferSize: 64 * 1024,
});

bili-pc-mp4's People

Contributors

yinyanfr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

bili-pc-mp4's Issues

Performance issue

Using streams slows down bili-pc-mp4 dramatically, previous solution that first save the decrypted files is much quicker.

Besides there's no significant rise of CPU and disk usage so that I consider that ths issue is with the stream.

I'm going to add the disk consuming way back as an option.

转换弹幕 / Danmu output

Bilibili 桌面端下载的弹幕是多个看起来很奇怪的文件,我并不知道如何处理,需要帮助。

The Bilibili desktop app downloads Danmu in strange files which I have no idea how to parse, help wanted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.