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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dy-rec

v0.1.0

Published

A tool to record/download Douyin live streams

Readme

Douyin Live Recorder

抖音直播录制工具,支持 API 和浏览器两种模式,自动重连,多房间监控等功能。

特性

  • 混合检测模式: API 优先,失败时自动回退到浏览器模式
  • 多格式支持: 支持 FLV 和 M3U8 (HLS) 流录制
  • 多种输出格式: MP4、TS、Fragmented MP4,支持边录边播和中断安全
  • 短视频下载: 支持下载抖音短视频(支持短链和完整链接)
  • 自动重连: 录制中断时自动检测并重连
  • 房间监控: 自动监控多个直播间,开播时自动开始录制
  • 分段录制: 支持按时长分段录制,避免单个文件过大
  • 多房间并发: 支持同时录制多个直播间

要求

  • Node.js 18+
  • FFmpeg(需安装并配置到 PATH)
  • npm 或 yarn

安装

git clone [email protected]:Algovate/dy-rec.git
cd dy-rec
npm install
npm run build

快速开始

# 录制单个直播间 (默认命令)
node dist/cli.js 379595210124
# 或者显式使用 record 命令
node dist/cli.js record 379595210124

# 开发模式(无需编译)
npm run dev 379595210124

注意: 使用 npm start 时需要用 -- 分隔参数:npm start -- 379595210124

主要功能

直播录制

# 基本录制 (只需房间ID/URL)
node dist/cli.js 379595210124

# 指定输出目录
node dist/cli.js record 379595210124 -o ./videos

# 指定画质
node dist/cli.js record 379595210124 -q hd

# 使用 TS 格式(边录边播,中断安全)
node dist/cli.js record 379595210124 --format ts

分段录制

# 每 30 分钟自动分段(适合长时间录制)
node dist/cli.js record 379595210124 --segment --segment-duration 1800

短视频下载

# 下载短视频(支持短链)
node dist/cli.js download 'https://v.douyin.com/xxxxxx/'

# 指定输出文件名
node dist/cli.js download 'https://v.douyin.com/xxxxxx/' -o my_video.mp4

配置文件批量处理

# 批量检测并录制 (一次性执行)
node dist/cli.js batch

# 指定配置文件
node dist/cli.js batch -c /path/to/config.json

监听模式

# 自动监控配置中的房间,开播时自动录制
node dist/cli.js watch

# 指定检查间隔(秒)和配置文件
node dist/cli.js watch -i 30 -c config.json

文档

许可证

MIT