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

@codedimension/video-editor

v1.2.2

Published

Video Editor CLI merges .mkv files to a single .mp4 file

Readme

Video Editor CLI

A powerful Node.js command-line interface (CLI) tool for automated video editing tasks, primarily focused on .mkv files. It optimizes common workflows such as silence removal, batch merging, and course processing with high-quality output.

Key Features

  • Automatic Silence Removal: Detects and removes silence (start, end, or middle) using FFmpeg filters.
  • Natural Sorting: Intelligently sorts files numerically (e.g., part2.mkv comes before part10.mkv).
  • High-Quality Output: Default encoding uses libx264 with CRF 18 and slow preset for visually lossless results.
  • Batch Processing: Orchestrates complex folder structures for courses or large collections.

Prerequisites

This tool depends on FFmpeg. You must have FFmpeg installed and available in your system's PATH.

  • Ubuntu/Debian: sudo apt install ffmpeg
  • macOS: brew install ffmpeg
  • Windows: Download from the official website or use winget install ffmpeg

Global Installation (Recommended)

To install and use video-editor from anywhere in your terminal without downloading the source code:

npm install -g @codedimension/video-editor

After installation, you can run the video-editor command directly.

Development Installation

If you want to run the CLI from source code:

# Install dependencies
npm install

# Build the project
npm run build

To use the video-editor command locally during development:

  1. Build the latest version:

    npm run build
  2. Link the package globally:

    npm link

Source code changes will be reflected after each npm run build.

Commands

1. Remove Silence from Videos (remove-silence-of-videos or rsov)

The most advanced trimming command. It removes all silence sections from a batch of videos, including silence in the middle of a recording.

Arguments:

  • [directory]: The directory containing .mkv files (Defaults to the current directory).

Options:

  • --start <number>: Manual start time in seconds (overrides silence detection).
  • --end <number>: Manual end time in seconds (overrides silence detection).

Features:

  • Removes middle silence by default.
  • Automatically skips files containing [skip] in their name.
  • Exports processed files to a trimmed-videos subfolder as .mp4.

Example:

video-editor rsov ./raw_recordings --start 5 --end 120

2. Trim Silence (trim-silence)

A simpler version that focuses on removing silence only from the start and end of files.

Options:

  • --input <path>: The path to a single .mkv file or a directory. (Required)
  • --output <path>: The path where the trimmed file(s) should be saved. (Required)

Example:

video-editor trim-silence --input recording.mkv --output ./trimmed/

3. Merge Videos (merge-videos)

Merges multiple .mkv files into a single high-quality .mp4 file.

Options:

  • --videosDir <path>: The directory containing the .mkv video files. (Required)
  • --outputFile <path>: The exact path and filename for the resulting .mp4. (Required)

Features:

  • Automatic Trimming: Detects and removes silence at the ends of each clip before merging.
  • Natural Order: Merges files in numerical/natural order.
  • High Quality: Uses CRF 18 and slow preset for the final export.

Example:

video-editor merge-videos --videosDir ./parts/ --outputFile final.mp4

4. Process Course (process-course)

Orchestrates a complete course editing workflow through a defined directory structure.

Input Structure:

/MyCourse
  /nao-editado
    /Module-1
      /Lesson-A
        - 1_intro.mkv
        - 2_demo.mkv
        - materials.pdf

Output Structure (/editado folder):

/MyCourse
  /editado
    /Module-1
      /Lesson-A
        - Lesson-A.mp4 (Merged and trimmed)
        - materials.pdf (Automatically copied)

Options:

  • <coursePath>: Path to the course root folder. (Required)
  • --skip-existing: Skips lessons that already have an output .mp4 file.

Example:

video-editor process-course /path/to/MyCourse --skip-existing

Technical Details

  • Silence Detection: Threshold set at -30dB for at least 0.5s.
  • Encoding Settings:
    • Video: libx264, pix_fmt yuv420p
    • Audio: aac
    • Quality: CRF 18, Preset: slow (optimized for high quality and reasonable file size).

Troubleshooting

  • FFmpeg not found: Make sure the ffmpeg -version command works in your terminal.
  • No silence detected: If the background noise is higher than -30dB, the tool might not detect silence correctly.