Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.28 KB

README.md

File metadata and controls

45 lines (36 loc) · 1.28 KB

Sprite Preview

sprite-preview is a tool that extracts frames from a video file and creates a sprite sheet of these frames. It also generates a VTT file that allows displaying the video using the sprite sheet.

Preview

2023-03-30 11 25 50

Installation

To use sprite-preview, you must have Go installed on your system. You can then install sprite-preview using the following command:

go get github.com/Paxx-RnD/sprite-preview

Prerequisites

Before installing this project, make sure you have the following prerequisites installed:

  • FFmpeg
  • ImageMagick

macOS

brew install imagemagick
brew install ffmpeg

Linux

apt install imagemagick
apt install ffmpeg

Usage

sprite-preview -i input_file.mp4 -o output.png -f 1 -w 160 -h 90 -v output.vtt

Flags

  • i: Path to the input video file.
  • prefix: Path to the output sprite prefix sheet file.
  • col: Number of columns in the sprite sheet.
  • row: Number of rows in the sprite sheet.
  • f: Frequency of frames extraction in seconds.
  • w: Width of each frame in pixels.
  • h: Height of each frame in pixels.
  • vtt: Path to the output VTT file. If not specified, no VTT file will be generated.