Skip to content

Rhitottam/transition-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Transition Studio

A modern, professional video transition editor built with React and WebGL shaders. Create stunning video transitions with real-time preview and export capabilities.

Features

  • 🎨 27+ Color-Coded Transitions - Each effect has a unique color for easy identification
  • 🎯 Per-Clip-Pair Control - Apply different transitions between specific clips
  • 🎬 Multi-Video Support - Upload and combine multiple video clips with drag & drop
  • ⚑ WebGL Performance - Hardware-accelerated transitions with 60fps preview
  • πŸ–ΌοΈ Real-time Preview - See transitions instantly with Web Worker rendering
  • πŸ“Š Visual Timeline - Color-coded timeline shows all transitions at a glance
  • πŸ’Ύ Quality Export Options - High (30fps), Medium (24fps), or Low (15fps)
  • πŸŽ›οΈ Professional Layout - Side-by-side design with accessible controls
  • πŸ“± Responsive Design - Horizontal layout maintained across all screen sizes

Technology Stack

  • React 18 - Modern React with hooks
  • Vite - Fast build tool and dev server
  • Web Workers - Off-main-thread WebGL rendering
  • OffscreenCanvas - Hardware-accelerated canvas rendering in workers
  • WebGL/WebGL2 - GPU-accelerated shader-based transitions
  • MediaRecorder API - Video export functionality

Installation

  1. Navigate to the project directory:
cd video-transitions-react
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open your browser and navigate to the URL shown in the terminal (typically http://localhost:5173)

Usage

1. Upload Videos

  • Click the upload area or drag and drop video files
  • Supports multiple video formats (MP4, WebM, etc.)
  • Add as many clips as you need

2. Arrange Clips

  • View all your clips in the sidebar
  • Use ↑ and ↓ buttons to reorder clips
  • Remove clips with the βœ• button

3. Apply Transitions

  • Select a transition effect from the dropdown (with color indicator)
  • Choose transition duration (0.5-3 seconds)
  • Select where to apply:
    • All Clip Pairs - Apply same transition to all clips
    • Between Clip 1 & 2 - Apply to specific clip pairs (NEW!)
    • Start of First Clip - Opening transition
    • End of Last Clip - Closing transition
  • Click "Apply Transition"
  • See color-coded transitions in the timeline

4. Preview

  • Click the play button to preview your video
  • Use the timeline slider to scrub through
  • See real-time FPS counter

5. Export

  • Select export quality (High, Medium, or Low)
  • Click "Export Video"
  • Wait for processing (progress bar shows status)
  • Video downloads automatically when complete

Available Transitions

Basic Transitions

  • Fade - Simple opacity crossfade
  • Dissolve - Random dissolve with noise

Wipe Transitions

  • Wipe Left/Right/Up/Down - Directional wipes
  • Circle Wipe - Circular reveal
  • Diamond Wipe - Diamond-shaped reveal

Slide Transitions

  • Slide Left/Right/Up/Down - Sliding motion

Zoom & Scale

  • Zoom In/Out - Zoom effects
  • Scale & Rotate - Combined scaling and rotation

WebGL Shader Effects

  • Pixelate - Pixel dissolution
  • Blur Transition - Smooth blur crossfade
  • Glitch - Digital glitch with RGB split
  • Ripple - Water ripple distortion
  • Swirl - Spiral swirl effect
  • Kaleidoscope - Kaleidoscope mirror effect
  • Dreamy - Soft dreamy blur with glow
  • Page Curl - Page turning effect with shadow
  • Directional Warp - Wavy directional distortion
  • Mosaic - Animated mosaic tiles
  • Radial Blur - Radial zoom blur
  • Crosshatch - Crosshatch pattern fade

Browser Compatibility

Recommended Browsers

  • Chrome 94+ - Full support with OffscreenCanvas
  • Edge 94+ - Full support with OffscreenCanvas
  • Firefox 105+ - Full support with OffscreenCanvas
  • Safari 16.4+ - Full support with OffscreenCanvas

Fallback Support

  • Older browsers automatically fall back to 2D canvas rendering
  • WebGL transitions still work, but may not use Web Workers
  • Performance may be reduced on older browsers

Project Structure

video-transitions-react/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ClipsList.jsx          # Video clips sidebar
β”‚   β”‚   β”œβ”€β”€ ControlsPanel.jsx      # Transition controls with color indicators
β”‚   β”‚   β”œβ”€β”€ PlaybackControls.jsx   # Play/pause and timeline
β”‚   β”‚   β”œβ”€β”€ Timeline.jsx           # Color-coded visual timeline
β”‚   β”‚   β”œβ”€β”€ VideoPreview.jsx       # WebGL canvas preview with worker
β”‚   β”‚   └── VideoUpload.jsx        # Drag & drop file upload
β”‚   β”œβ”€β”€ workers/
β”‚   β”‚   └── webgl-renderer.worker.js  # WebGL rendering in Web Worker
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ webgl-renderer-main.js    # Main thread WebGL renderer
β”‚   β”‚   └── transitionColors.js       # Color mapping for transitions
β”‚   β”œβ”€β”€ App.jsx                    # Main application logic
β”‚   β”œβ”€β”€ App.css                    # Modern dark theme with CSS variables
β”‚   └── main.jsx                   # Entry point
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js
└── README.md

Performance Optimization

  • Web Workers - All WebGL rendering happens off the main thread
  • OffscreenCanvas - Hardware-accelerated rendering without blocking UI
  • RequestAnimationFrame - Smooth 60fps playback
  • Efficient State Management - Minimal re-renders with React hooks
  • ImageBitmap - Fast video frame transfer to workers

Build for Production

npm run build

The production-ready files will be in the dist directory.

Troubleshooting

Videos not loading

  • Ensure videos are in a supported format (MP4, WebM)
  • Check browser console for error messages
  • Try shorter video files for testing

Poor performance

  • Close other browser tabs
  • Use Chrome/Edge for best performance
  • Reduce video resolution or duration
  • Lower export quality setting

Export fails

  • Check if MediaRecorder API is supported
  • Ensure sufficient disk space
  • Try a different video codec (automatic selection)

OffscreenCanvas not working

  • Update to latest browser version
  • App automatically falls back to 2D rendering
  • Performance may be reduced but functionality remains

Contributing

Feel free to submit issues and enhancement requests!

License

MIT License - feel free to use this project for any purpose.

Credits

Based on the professional transitions guide and WebGL shader implementations. Built with React and modern web technologies.


Made with ❀️ using React, WebGL, and Web Workers

About

Video Transition Effects using webgl shaders and webworker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors