How gkalian/video-to-gif-converter works
This Windows desktop application guides a user from choosing a video through configuring a trimmed frame extraction, reviewing and selecting frames, and encoding a GIF. The JavaScript UI communicates with Rust through Tauri commands; Rust invokes FFmpeg for video inspection and frame extraction, and handles GIF encoding from extracted PNGs. README features such as selection controls, quality levels, and fast global-palette mode are represented, though their full UI and implementation are not sampled. The source excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: app.js Conversion workflow UI · lib.rs Tauri command host · commands.rs Frame extraction
Components 16
Desktop interface
- Conversion workflow UI
src/app.js - Video file dialog
src/app.js - GIF save dialog
src/app.js - Frame review and selection
src/app.js - Frame preview
src/app.js
Conversion runtime
- Tauri command host
src-tauri/src/lib.rs - Video inspection
src-tauri/src/commands.rs - Frame extraction
src-tauri/src/commands.rs - GIF encoding
src-tauri/src/commands.rs - Temporary frame files
src-tauri/src/commands.rs - Progress events
src-tauri/src/commands.rs
System integrations
- FFmpeg
- Selected video
- GIF file
- System opener
Other components
- User
Connections 25
- User → Conversion workflow UI: operates
- Conversion workflow UI → Video file dialog: chooses video
- Video file dialog → Selected video: selects path
- Conversion workflow UI → Tauri command host: invokes commands
- Tauri command host → Video inspection: dispatches inspection
- Video inspection → FFmpeg: inspects video
- Video inspection → Selected video: reads metadata
- Tauri command host → Frame extraction: dispatches extraction
- Frame extraction → FFmpeg: extracts frames
- Frame extraction → Selected video: reads video
- Frame extraction → Temporary frame files: writes PNG frames
- Frame extraction → Progress events: emits progress
- Progress events → Conversion workflow UI: updates progress
- Conversion workflow UI → Frame review and selection: reviews frames
- Frame review and selection → Frame preview: previews selection
- Frame preview → Tauri command host: requests frame data
- Tauri command host → Temporary frame files: reads preview PNG
- Conversion workflow UI → GIF save dialog: chooses destination
- GIF save dialog → GIF file: selects path
- Conversion workflow UI → GIF encoding: requests GIF creation
- GIF encoding → Temporary frame files: reads selected frames
- GIF encoding → GIF file: writes GIF
- GIF encoding → Progress events: emits progress
- Conversion workflow UI → System opener: opens output
- Tauri command host → System opener: dispatches open path