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 🙏

© 2026 – Pkg Stats / Ryan Hefner

dual-subtitle

v0.6.1

Published

Extract Chinese and English subtitles from streaming media like Netflix, and merge them into dual subtitles.

Downloads

369

Readme

dual-subtitle

一键批量提取视频内嵌字幕中的两条轨道,并合并为双语字幕文件。

NPM

依赖

  • 需要本地安装 Node.js(含 npm):Node.js 官网
  • 本工具会优先使用系统自带的 ffmpeg / ffprobe;若未安装,会通过依赖包自动使用内置版本。

使用

# 在当前目录下处理所有 .mp4 / .mkv
npx dual-subtitle

# 指定目录(末尾可带或不带 /)
npx dual-subtitle /path/to/videos

注:有些环境(比如群晖)如果没有 npx,可以用 npm exec 代替,对应命令:npm exec dual-subtitle(可加目录参数)。

输出文件

  • 合并后的字幕文件名为:<原文件名>.<语言1>-<语言2>.srt
  • 例如自动匹配到简体中文 + 英语时,生成:movie.chi-eng.srt

运行流程

  1. 每个视频文件会先扫描内嵌字幕轨道。
  2. 启动前有 3 秒倒计时
    • 不按键:自动按「简体中文(chi) + 英语(eng)」查找并合成;若缺某一条,会列出字幕并提示输入要合并的两条索引
    • 按任意键:跳过自动查找,直接列出所有字幕,由你依次输入两条要合并的字幕索引。
  3. 批量处理:若在第一个(或任意一个)文件中进行了「手动选择索引」,则本轮后续所有文件都会直接进入手动选择流程,不再倒计时、也不再自动匹配 chi/eng。

界面语言

  • 默认:根据系统语言自动选择中文或英文(会读取环境变量 LANG / LC_ALL 等;在 macOS 上还会读取系统首选语言)。
  • 强制指定
    DUAL_SUBTITLE_LANG=zhDUAL_SUBTITLE_LANG=en 可覆盖自动检测。

简介

主要用于在 Infuse 等播放器上观看流媒体时,将两条内嵌字幕(如中英)合并成一条双语字幕轨道,以解决播放器无法同时显示两条字幕的问题。

更多说明见知乎文章:https://zhuanlan.zhihu.com/p/1915534266130997832