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

ffmpeg-simple-converter

v1.0.0

Published

CLI para converter vídeos/áudios com presets via ffmpeg

Readme

ffmpeg-simple-converter

A simple CLI to convert audio and video files using ffmpeg, featuring:

  • file selector (checkbox)
  • ready-to-use presets (dynamic based on file type)
  • runs the command and streams output to the terminal

Requirements

  • Node.js >= 16
  • ffmpeg installed and available in your PATH

Quick check:

ffmpeg -version

Usage

Via npx (from any folder)

npx ffmpeg-simple-converter

This opens a selector to pick files from the current folder and then choose the appropriate preset.

Run locally (in this repo)

npm install
npm run convert

Supported types

The script only lists and allows selecting files with supported extensions.

  • Audio: .ogg, .wav, .mp3, .m4a, .aac, .flac
  • Video: .mp4, .mov, .mkv, .webm, .avi

Available presets

Presets are built dynamically based on the detected type (audio or video). If you select mixed files (audio + video), the script will ask for one preset per type.

Audio → MP3 (good quality)

ffmpeg -hide_banner -n -i input.ogg -c:a libmp3lame -q:a 2 output.mp3

Audio → MP3 (smaller)

ffmpeg -hide_banner -n -i input.ogg -c:a libmp3lame -q:a 5 output.mp3

Video → MP4 1080p (reasonable/smaller)

ffmpeg -hide_banner -n -i input.mp4 \
	-vf "scale='min(1080,iw)':-2" \
	-c:v libx264 -profile:v baseline -level 3.1 \
	-preset medium -crf 28 -r 30 \
	-c:a aac -b:a 128k \
	-movflags +faststart \
	output.mp4

Video → MP4 1080p (better/larger)

ffmpeg -hide_banner -n -i input.mp4 \
	-vf "scale='min(1080,iw)':-2" \
	-c:v libx264 -profile:v baseline -level 3.1 \
	-preset slow -crf 23 -r 30 \
	-c:a aac -b:a 128k \
	-movflags +faststart \
	output.mp4

Notes

  • The script uses -n (do not overwrite). If the output name already exists, it generates an alternative name with a suffix.
  • If the output extension matches the input extension (e.g. .mp3.mp3), the script uses a _converted suffix to avoid collisions.