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

@optima-chat/video-translate-tools

v1.0.8

Published

Path-B styled subtitle rendering + auto BGM ducking for HeyGen-translated videos. Pairs with `gen video-translate` CLI.

Readme

@optima-chat/video-translate-tools

Path-B styled subtitle rendering + BGM ducking for HeyGen-translated videos. Pairs with the gen video-translate CLI from @optima-chat/optima-gen-cli.

gen video-translate --video-url $URL --lang $LANG -o ./out
curl <caption_url> -o ./out/caption.srt
video-translate render-ass --srt ./out/caption.srt --lang $TAG --out ./out/subs.ass
video-translate mux        --raw ./out/translate_*.mp4 --ass ./out/subs.ass [--bgm ./bgm.wav] -o ./final.mp4

Install (in optima-ai-shell Dockerfile)

RUN apt-get install -y fonts-noto-core && \
    npm install -g @optima-chat/video-translate-tools@latest && \
    cp -r $(video-translate fonts-dir)/. /usr/share/fonts/video-translate/ && \
    fc-cache -f

CLI Reference

render-ass

Parse SRT → ASS path-B styled subtitles.

| Flag | Required | Description | |---|---|---| | --srt <path> | ✅ | HeyGen SRT file (BOM auto-stripped) | | --lang <en\|ms\|vi\|th> | ✅ | Target lang. Determines font + max chars per line | | --out <path> | ✅ | Output ASS path | | --translations <path> | ⬜ | Save / read JSON intermediate. If file exists, used as-is; user can hand-edit to add **word** for pink-KW highlight |

mux

Burn ASS onto HeyGen mp4. Optional BGM ducking.

| Flag | Required | Description | |---|---|---| | --raw <path> | ✅ | HeyGen-output mp4 (has lip-synced voice) | | --ass <path> | ✅ | ASS subtitle file | | --out <path> | ✅ | Final mp4 | | --bgm <path> | ⬜ | If set, mix BGM under voice via asplit sidechain ducking | | --fonts-dir <path> | ⬜ | Override fonts dir (defaults to bundled packages/video-translate-tools/fonts/) |

fonts-dir

Print bundled fonts directory absolute path. Used by Dockerfile to register fonts.

Languages

| Tag | Font | Max chars/line | Source | |---|---|---|---| | en | Bangers | 32 | npm bundle (this pkg) | | ms | Bangers | 32 | npm bundle (this pkg) | | vi | Noto Sans | 30 | apt-get install fonts-noto-core | | th | Sarabun | 42 | npm bundle (this pkg) |

Thai uses 42 chars/line because Thai has no spaces between words — smartSplit would otherwise cut mid-word.

System deps

  • Node ≥ 20
  • ffmpeg with libass (apt-get install ffmpeg on Ubuntu)
  • For Vietnamese subs: fonts-noto-core apt pkg (standalone Noto Sans family)
  • For Thai subs: bundled in this npm package (Sarabun-Regular.ttf)

Note: fonts-noto-cjk does NOT provide standalone Noto Sans — it ships only Noto Sans CJK * families. Use fonts-noto-core.

Scope

v1 ships subtitle rendering + BGM-ducked muxing only. Voice override (custom voice selection from HeyGen library) is deferred to v2 — default flow uses HeyGen auto-clone of original speaker. See SPEC v3.1 §Scope.

License

MIT