@voyo/video-last-frame
v1.0.0
Published
Extract the latest frame from MP4 video as a command line tool
Downloads
88
Readme
yoFrame
Extract the latest frame from MP4 videos as a command-line tool. This utility allows you to easily extract the final frame of any MP4 video and save it as a PNG image with a unique filename.
Installation
To install globally and use as a command-line tool:
npm install -g @voyo/video-last-frameUsage
After installation, you can use the command-line interface:
yoFrame <video-file-path>For example:
yoFrame ./my-video.mp4This will create a PNG image named my-video[8-digit-random-number].png in the same directory as the input video.
Features
- Extracts the last frame of an MP4 video
- Outputs as high-quality PNG format
- Generates unique filenames with 8-digit random numbers to prevent conflicts
- Provides detailed feedback during processing
- Cross-platform compatibility
How It Works
yoFrame uses ffmpeg and ffprobe under the hood to:
- Analyze the video to determine its duration
- Seek to the last frame of the video
- Extract that frame as a PNG image
- Save it with a unique filename
Local Development
If you want to contribute or run locally:
- Clone the repository
- Install dependencies:
npm install - Run directly:
node cli.js <video-file-path>
Dependencies
fluent-ffmpeg: High-level interface for ffmpegffmpeg-static: Prebuilt ffmpeg binariesffprobe-static: Prebuilt ffprobe binaries
License
ISC
Contributing
Feel free to submit issues and pull requests. Contributions are welcome!
