A high-performance command-line tool for displaying images, videos, and GIFs directly in your terminal using sixel graphics. Built with Rust for cross-platform compatibility and optimal performance.
- Download the latest release: build_wimg.zip
- Extract the ZIP file
- Run
install-user.bat(orinstall.batas administrator) - Restart your terminal
- Use:
wimg <file>
Requirements: Windows Terminal with sixel support enabled
See the Building from Source section below.
- Display images (JPEG, PNG, GIF, BMP, and more) in your terminal
- Play videos (MP4, AVI, MOV, MKV, WebM, FLV, WMV) with smooth frame rendering
- Animated GIF support with enhanced frame rates
- Dynamic FPS detection for videos (preserves original frame rate up to 30 FPS)
- Automatic terminal size detection and adaptive scaling
- Graceful Ctrl+C handling with proper cleanup
- Standalone executable with statically linked dependencies
- FFmpeg bundled in distribution package (no separate installation needed)
Windows:
- Windows Terminal with sixel support enabled
- No additional installations needed (FFmpeg is included in the distribution package)
Linux:
- Terminal emulator with sixel support (xterm, mlterm, wezterm)
- FFmpeg installed via package manager
macOS:
- Terminal emulator with sixel support (iTerm2, WezTerm)
- FFmpeg installed via Homebrew
Windows:
-
MSYS2 with MINGW64 toolchain
- Download from https://www.msys2.org/
-
Rust toolchain
- Install from https://rustup.rs/
- Add GNU target:
rustup target add x86_64-pc-windows-gnu
-
libsixel (built from source in MSYS2)
# In MSYS2 MINGW64 terminal pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config git autoconf automake libtool make git clone https://github.com/libsixel/libsixel.git cd libsixel ./configure --prefix=/mingw64 --disable-python make make install
-
FFmpeg (for video/GIF support during development)
- Download from https://ffmpeg.org/download.html
- Add to PATH
Linux:
- Terminal emulator with sixel support (xterm, mlterm, wezterm)
- FFmpeg and libsixel development libraries
sudo apt install ffmpeg libsixel-dev # Debian/Ubuntu sudo dnf install ffmpeg libsixel-devel # Fedora
- Rust toolchain from https://rustup.rs/
macOS:
- Terminal emulator with sixel support (iTerm2, WezTerm)
- FFmpeg and libsixel
brew install ffmpeg libsixel
- Rust toolchain from https://rustup.rs/
git clone https://github.com/life2harsh/wimg.git
cd wimg# Set environment variables for static linking
export PKG_CONFIG_ALL_STATIC=1
export RUSTFLAGS="-C target-feature=+crt-static"
# Build the release binary
cargo build --release --target x86_64-pc-windows-gnu --features sixel
# The executable will be at: target/x86_64-pc-windows-gnu/release/try_image.execargo build --release --features sixel
# The executable will be at: target/release/try_image# Windows only
cd build_wimg
.\build-release.ps1 -Version "1.0.0"This will create dist/wimg-windows-x64-v1.0.0.zip with everything bundled.
Recommended for most users:
- Download the latest release from GitHub Releases
- Extract
wimg-windows-x64.zip - Run one of the installation scripts:
install-user.bat- Install for current user (no admin required)install.bat- Install system-wide (requires administrator)
- Restart your terminal
- Test:
wimg --help
The distribution package includes everything you need: wimg.exe, ffmpeg.exe, and ffprobe.exe.
For developers or other platforms:
# Set environment variables for static linking
$env:PKG_CONFIG_ALL_STATIC=1
$env:RUSTFLAGS="-C target-feature=+crt-static"
# Build the release binary
cargo build --release --target x86_64-pc-windows-gnu --features sixel
# Copy to your preferred location
copy target\x86_64-pc-windows-gnu\release\try_image.exe C:\bin\wimg.exe# Build
cargo build --release --features sixel
# Install system-wide
sudo cp target/release/try_image /usr/local/bin/wimg
sudo chmod +x /usr/local/bin/wimg
# Or install to user directory
mkdir -p ~/.local/bin
cp target/release/try_image ~/.local/bin/wimg
# Add ~/.local/bin to your PATH if not alreadyTo create your own distribution package:
cd build_wimg
.\build-release.ps1 -Version "1.0.0"See BUILD-RELEASE.md for detailed instructions.
wimg photo.jpg
wimg screenshot.pngwimg video.mp4
wimg movie.aviwimg animation.gifRun without arguments to display a test pattern:
wimgPress Ctrl+C to stop video/GIF playback. The terminal will be properly cleaned up and the cursor restored.
- Videos: Dynamic FPS detection (capped at 30 FPS for terminal compatibility)
- GIFs: Enhanced to 30 FPS for smoother playback
- Resolution: Scales to 1280px width with fast bilinear filtering
- Display: 10 pixels per character cell for optimal rendering speed
- Quality: Balanced settings for terminal viewing
Images: JPEG, PNG, GIF (static), BMP, TIFF, WebP, ICO, and more
Videos: MP4, AVI, MOV, MKV, WebM, FLV, WMV
Animations: GIF (with enhanced frame rate)
- FFprobe detects the original video frame rate
- FFmpeg extracts frames at the detected rate (capped at 30 FPS)
- Frames are scaled to fit your terminal dimensions
- Sixel graphics encode the frames for terminal display
- Frames are played back with precise timing matching the original FPS
Want to share wimg with others? See the DISTRIBUTION.md guide for information on:
- Creating portable ZIP packages
- Building Windows installers
- Publishing to package managers (Chocolatey, Scoop)
- Creating packages for Linux (AppImage, .deb, .rpm)
- macOS Homebrew formulas
If using pre-built binary: The distribution package includes FFmpeg. Make sure you extracted all files from the ZIP.
If building from source: Make sure FFmpeg is installed and available in your PATH:
ffmpeg -version
ffprobe -versionEnsure your terminal supports sixel graphics:
- Windows: Use Windows Terminal (enable sixel in settings under "Rendering")
- Linux: Use xterm, mlterm, or wezterm
- macOS: Use iTerm2 (enable sixel in preferences) or WezTerm
The tool uses optimized settings for terminal rendering with a balance between quality and performance. Terminal rendering limitations cap playback at 30 FPS. This is normal for sixel graphics in most terminals.
Windows: Make sure you're running the correct script:
install-user.bat- For current user only (recommended)install.bat- For all users (right-click → Run as administrator)
After installation, restart your terminal for PATH changes to take effect.
.
├── Cargo.toml # Project dependencies
├── src/
│ └── main.rs # Main application code
├── build_wimg/
│ ├── BUILD-RELEASE.md # Distribution build guide
│ ├── build-release.ps1 # Automated build script
│ ├── install-user.bat # User installation script
│ └── install.bat # System installation script
├── DISTRIBUTION.md # Distribution guide
└── target/ # Build output
image(0.24) - Image loading and processingsixel-rs(0.5.0) - Sixel graphics encoding (optional feature)tempfile(3.8) - Temporary directory management for frame extractionterminal_size(0.3) - Dynamic terminal dimension detectionctrlc(3.4) - Signal handling for graceful shutdown
If you want to use the pure Rust fallback encoder:
cargo build --release --no-default-featuresContributions are welcome! Please feel free to:
- Report bugs via GitHub Issues
- Submit pull requests
- Suggest new features
- Improve documentation
Before submitting a PR:
- Ensure code builds without warnings
- Test on your platform
- Update documentation if needed
This project is open source. See LICENSE file for details.
- Built with Rust for performance and safety
- Uses libsixel for high-quality sixel encoding
- FFmpeg for video processing
- Thanks to the terminal emulator developers who support sixel graphics
- Repository: https://github.com/life2harsh/wimg
- Releases: https://github.com/life2harsh/wimg/releases
- Issues: https://github.com/life2harsh/wimg/issues
- Distribution Guide: DISTRIBUTION.md
- Build Guide: BUILD-RELEASE.md