0.0
There's a lot of open issues
A long-lived project that still receives updates
Ruby Spriter is a cross-platform tool for creating professional spritesheets from video files with advanced GIMP image processing. Features include edge-based and inner background removal, multi-threshold processing, ghost edge prevention, smoke detection, scaling with multiple interpolation methods, sharpening, batch processing, spritesheet consolidation, frame extraction, and comprehensive metadata management. Designed for game development workflows with Godot Engine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Ruby Spriter v0.7.0.1

Ruby License Platform

Professional MP4 to Spritesheet Converter with Advanced Image Processing

A powerful cross-platform Ruby tool for creating high-quality spritesheets from video files and processing them with professional-grade image manipulation. Perfect for game development workflows, particularly with Godot Engine.


โœจ Key Features

  • ๐ŸŽฌ Video to Spritesheet - Extract frames from MP4 videos using FFmpeg
  • ๐Ÿ–ผ๏ธ Advanced Image Processing - Scale, sharpen, and remove backgrounds with precision
  • ๐ŸŽจ Quality Enhancement - 5 interpolation methods and configurable unsharp masking
  • ๐ŸŽž๏ธ Frame-by-Frame Processing - Process each video frame individually for varying backgrounds (v0.7.0.1+)
  • ๐Ÿ“ Spritesheet Consolidation - Merge multiple spritesheets vertically
  • ๐Ÿ“Š Metadata Management - Embed, verify, and add grid information to PNG files
  • ๐Ÿ“ฆ Batch Processing - Process multiple MP4 files in a directory automatically (v0.6.7+)
  • ๐Ÿ—œ๏ธ Maximum Compression - Optimal PNG compression while preserving metadata (v0.6.7+)
  • ๐ŸŒ Cross-Platform - Works seamlessly on Windows, Linux, and macOS
  • ๐Ÿงช Production Ready - Comprehensive RSpec test coverage (512+ tests)

๐Ÿš€ Quick Start

Install

gem install ruby_spriter

Verify Installation

ruby_spriter --check-dependencies

Basic Usage

# Create 4x4 grid with 16 frames
ruby_spriter --video input.mp4

# Remove background
ruby_spriter --video input.mp4 --remove-bg

# Scale and compress
ruby_spriter --video input.mp4 --scale 50 --max-compress

# Batch process entire directory
ruby_spriter --batch --dir "videos/" --remove-bg

๐Ÿ“š Documentation

Complete documentation is organized into focused guides:

Guide Purpose
Installation Guide Prerequisites, installation methods, and verification
Usage Reference Complete CLI options and command examples
Features Overview All capabilities and image processing features
Advanced Features Batch processing, compression, consolidation, etc.
Architecture Guide System design, processing pipelines, components
Development Guide Contributing, testing, and development setup
Use Cases & Examples Real-world scenarios and game development workflows

๐Ÿ“‹ Requirements

External Dependencies

Tool Purpose
FFmpeg Video frame extraction
ImageMagick Metadata and image processing
GIMP Advanced scaling and background removal
Xvfb Virtual display (Linux only)

Ruby Version

  • Ruby 2.7.0 or higher
  • No runtime gem dependencies (uses Ruby standard library)

Supported Formats

  • Video Input: MP4 only
  • Image Input/Output: PNG only

๐Ÿ’ก Common Workflows

Game Development

# Character animation for Godot
ruby_spriter --video character_walk.mp4 \
  --frames 16 --columns 4 \
  --scale 50 --remove-bg --sharpen

# VFX effects with high frame count
ruby_spriter --video explosion.mp4 \
  --frames 64 --columns 8 \
  --scale 75 --interpolation nohalo

# Consolidate 8-directional walk cycles
ruby_spriter --consolidate --dir "walk_cycles/" \
  --output character_walk_all.png

Batch Processing

# Process entire animation library
ruby_spriter --batch --dir "raw_animations/" \
  --outputdir "game_assets/" \
  --scale 50 --remove-bg --max-compress

# Batch with consolidation
ruby_spriter --batch --dir "states/" \
  --batch-consolidate --output character_all.png

Varying Backgrounds

# Frame-by-frame for videos with changing backgrounds
ruby_spriter --video animation.mp4 \
  --remove-bg --by-frame \
  --frames 32 --columns 8

# Batch process with frame-by-frame
ruby_spriter --batch --dir "animations/" \
  --remove-bg --by-frame --scale 50

๐Ÿ”ง Advanced Features

  • Inner Background Removal - Remove interior background regions (v0.7.0+)
  • Threshold Stepping - Process with multiple thresholds for superior edges (v0.7.0+)
  • Ghost Edge Prevention - Multi-pass cleanup of semi-transparent artifacts (v0.7.0+)
  • Smoke Detection - Identify and remove transparency gradients (v0.7.0+)
  • Frame Extraction - Extract specific frames by number (v0.7.0+)
  • Metadata Addition - Add grid information to external spritesheets (v0.7.0+)
  • Cell-Based Cleanup - Post-process residual backgrounds per-cell (v0.7.0.1+, experimental)

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ”— Links


๐Ÿ™ Acknowledgments

  • FFmpeg - Video processing foundation
  • GIMP - Professional image manipulation
  • ImageMagick - Metadata and image operations
  • Ruby Community - Excellent standard library

Made with โค๏ธ for game developers