Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

autosub

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autosub

Automatically generate and overlay subtitles for any video.

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

autosub

autosub uses ffmpeg and OpenAI Whisper's nodejs bindings to automatically generate and overlay subtitles on any video.

Installation

Before using autosub, you need to have ffmpeg installed. You can install ffmpeg using your package manager:

# On Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg

# On macOS using Homebrew (https://brew.sh/)
brew install ffmpeg

# On Windows using Chocolatey (https://chocolatey.org/)
choco install ffmpeg

Install Package

  • Note: When you run this project for the first time, it will automatically download an AI model and then compile it. If you encounter any errors during this process, please raise an issue in the Nodejs-Whisper repository.
npm install -g autosub

Usage

Generate subtitles for a video:

autosub generate -i <Absolute path to video> -o <output path>

Options:

  • -i, --input: Absolute path to the input video file.
  • -o, --output: (Optional) Output path for the subtitled video. If not provided, the output will be saved in the same directory as the input file.

Example:

autosub generate -i User/chetan/Developer/video.mp4 -o  User/chetan/Developer/output.mp4

Development

Available AI models to generate subtitles for video (bigger model will give better result)

  • For me tiny.en model works fine.
  • To changes AI model you need to change "modelName" value in transcription.ts
ModelDiskMem
tiny75 MB~390 MB
tiny.en75 MB~390 MB
base142 MB~500 MB
base.en142 MB~500 MB
small466 MB~1.0 GB
small.en466 MB~1.0 GB
medium1.5 GB~2.6 GB
medium.en1.5 GB~2.6 GB
large-v12.9 GB~4.7 GB
large-v22.9 GB~4.7 GB
large2.9 GB~4.7 GB

Todo List

  • Command line interface support.
  • Give options to change subtitle styles

Keywords

FAQs

Package last updated on 18 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc