npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bili-pc-mp4

v0.2.0

Published

MP4 convertor for videos downloaded by the Bilibili pc application.

Downloads

4

Readme

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.

:star2: 特性

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

:wrench: 命令行工具

转换视频

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

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

:book: 作为库使用

您也可以讲 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,
});