Skip to content

mistergiantmedia/QuiltPlayer

Repository files navigation

Looking Glass Quilt Video Player

High-performance 4K quilt video player for Looking Glass holographic displays using hardware-accelerated video decoding.

Features

  • Hardware Acceleration: VideoToolbox hardware decoding for maximum performance
  • Direct GPU Pipeline: OpenGL Pixel Buffer Objects (PBOs) for zero-copy texture streaming
  • High Performance: Consistent 25 FPS playback of 4094x4094 RGBA video
  • Production Ready: Optimized for 20-hour daily operation with minimal resource usage
  • Auto File Detection: Automatically finds video files or shows file picker
  • Bridge SDK Integration: Native Looking Glass Bridge SDK support

Requirements

  • macOS with Apple Silicon or Intel Mac
  • Looking Glass display with Bridge 2.6.0+
  • FFmpeg with VideoToolbox support: brew install ffmpeg
  • Video file: quilt_qs5x9a1.78.mp4 (5x9 quilt layout, 1.78 aspect ratio)

Installation

  1. Clone the repository
  2. Ensure FFmpeg is installed: brew install ffmpeg
  3. Place your quilt video file in the project directory
  4. Build and run:
chmod +x build.sh
./build.sh
./quilt_player

Video File Requirements

  • Format: MP4 with H.264 encoding
  • Resolution: 4094x4094 pixels <----------- this is verry important!!!!!
  • Layout: 5x9 quilt (45 views)
  • Aspect Ratio: 1.78
  • Frame Rate: 25 FPS
  • Pixel Format: Hardware decode outputs RGBA

Usage

From Terminal

./quilt_player

Double-Click Launch

The app will search for video files in common locations:

  • Current directory
  • ~/Desktop/player/
  • Shows file picker if not found

Production Deployment

For 20-hour daily operation, consider using a Launch Agent:

# Disable Terminal session restore
defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool false

Architecture

Hardware Decode Pipeline

  1. FFmpeg Process: VideoToolbox hardware decoding to RGBA
  2. Pipe Streaming: Direct data transfer via Unix pipes
  3. PBO Buffer: OpenGL Pixel Buffer Object for GPU memory
  4. Texture Upload: Zero-copy GPU texture creation
  5. Bridge Rendering: Looking Glass SDK quilt rendering

Performance Characteristics

  • Throughput: ~1.4 GB/second texture streaming
  • CPU Usage: Minimal (hardware decode + streaming only)
  • Memory: ~64MB PBO buffer
  • Latency: <40ms end-to-end pipeline

Technical Details

FFmpeg Configuration

ffmpeg -stream_loop -1 -hwaccel videotoolbox -i video.mp4 \
       -f rawvideo -pix_fmt rgba -an -threads 0 \
       -fflags nobuffer -r 25 -loglevel quiet -

Bridge SDK Integration

  • Window creation and management
  • 5x9 quilt layout configuration
  • 1.78 aspect ratio rendering
  • Hardware-accelerated texture display

OpenGL Pipeline

  • Core Profile 3.2 context
  • Single PBO with mutex synchronization
  • Dynamic buffer allocation
  • Asynchronous texture uploads

Troubleshooting

Video Not Found

  • Check file exists in project directory
  • Verify filename matches exactly
  • Use file picker if automatic detection fails

Performance Issues

  • Ensure VideoToolbox hardware acceleration is working
  • Check FFmpeg installation includes VideoToolbox support
  • Monitor system resources during playback

Looking Glass Connection

  • Verify Bridge SDK is running before launching player
  • Check display connection and calibration
  • 10-second startup delay allows Bridge initialization

Build Configuration

The project uses minimal logging for production deployment:

  • No FPS counters or debug output
  • Silent FFmpeg operation
  • Streamlined error handling
  • Optimized for long-term stability

License

[Add your license here]

Contributing

[Add contribution guidelines here]

About

High-performance 4K quilt video player for Looking Glass displays. Hardware-accelerated FFmpeg decode with VideoToolbox, direct GPU streaming via OpenGL PBOs, Bridge SDK integration. Achieves 25 FPS on 4094x4094 RGBA video. Optimized for 20-hour operation with minimal resources and auto file detection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors