happy-horse-1.0-video-converter
v0.1.0
Published
CLI and Node.js utilities for converting, compressing, and extracting media with FFmpeg.
Downloads
9
Maintainers
Readme
happy-horse-1.0-video-converter
happy-horse-1.0-video-converter is a lightweight npm package for common FFmpeg
workflows: convert media, compress video, clip segments, extract audio, and
export thumbnails.
It ships with both a CLI and a typed Node.js API so it can fit local scripts, automation pipelines, or app integrations.
Install
pnpm add happy-horse-1.0-video-converterOr run it with your preferred package manager after publishing:
npm install happy-horse-1.0-video-converterFFmpeg Requirement
Version 0.1.x expects ffmpeg and ffprobe to be available in your system
PATH.
Example:
ffmpeg -version
ffprobe -versionIf FFmpeg is not installed, the CLI and API will return a clear runtime error.
CLI Usage
The package exposes one command:
happyhorse-video --helpConvert formats
happyhorse-video convert input.mp4 --to webm
happyhorse-video convert input.mov --to gif
happyhorse-video convert input.mp4 --to mp3Compress video
happyhorse-video compress input.mp4 --width 1280 --crf 28
happyhorse-video compress input.mov --video-bitrate 1800k --frame-rate 30Clip a segment
happyhorse-video clip input.mp4 --start 00:00:05 --duration 10
happyhorse-video clip input.mp4 --start 00:00:03 --end 00:00:12Extract audio
happyhorse-video audio input.mp4 --to mp3
happyhorse-video audio input.mov --to wav --audio-bitrate 192kExport thumbnails
happyhorse-video thumbnail input.mp4 --at 00:00:03
happyhorse-video thumbnail input.mp4 --interval-seconds 5 --count 3Node.js API
import {
clipVideo,
compressVideo,
convertVideo,
extractAudio,
generateThumbnail,
} from 'happy-horse-1.0-video-converter';
const converted = await convertVideo({
inputPath: 'input.mp4',
to: 'webm',
});
const compressed = await compressVideo({
inputPath: 'input.mov',
width: 1280,
crf: 28,
});
const clipped = await clipVideo({
inputPath: 'input.mp4',
start: '00:00:05',
duration: '10',
});
const audio = await extractAudio({
inputPath: 'input.mp4',
to: 'mp3',
});
const thumbnails = await generateThumbnail({
inputPath: 'input.mp4',
at: '00:00:03',
});Every command returns a structured result:
type CommandResult = {
success: boolean;
message: string;
outputPath?: string;
outputPaths?: string[];
command: string[];
};Supported Outputs
- Video:
mp4,webm,mov,gif - Audio:
mp3,wav
Notes
- This package intentionally keeps the first release focused on common conversion and extraction tasks.
- It does not bundle FFmpeg binaries in
0.1.x. - Advanced editing pipelines can be added later without changing the basic API shape.
HappyHorse
Built by HappyHorse, a toolkit focused on practical AI and creator workflows. The link is included as normal package attribution and support context, not as promotional filler.
License
MIT
