Skip to content

lextrack/GodotVideoConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot Video Converter

Desktop app for converting videos into game-ready formats, especially ogv for Godot, plus sprite atlas generation for 2D workflows.

This project is a Python rewrite of the original .NET tool I made some time ago.

Features

  • Convert videos to ogv, mp4, webm, and gif
  • Use Godot-focused OGV presets
  • Use Love2D-focused OGV presets
  • Generate PNG sprite atlases from video
  • Batch process files from a GUI
  • Analyze source video before export

Main Workflows

Video Conversion

  • ogv is the main target for Godot playback
  • mp4, webm, and gif are also available
  • Quality, FPS, resolution, audio, and OGV mode can be adjusted from the GUI

Godot OGV modes:

  • Official Godot
  • Seek Friendly
  • Ideal Loop
  • Mobile Optimized
  • High Compression

Love2D OGV modes:

  • Love2D Compatibility
  • Seek Friendly
  • Ideal Loop
  • Lightweight

Atlas Generation

  • Export PNG atlases from video clips
  • Layout modes: grid, horizontal, vertical
  • Backends: ffmpeg, opencv

Requirements

  • Python 3.11+
  • ffmpeg
  • ffprobe

On Windows, the app can use:

  • bin/ffmpeg.exe and bin/ffprobe.exe
  • GVC_FFMPEG_DIR
  • ffmpeg and ffprobe from PATH

On Linux, ffmpeg and ffprobe should be available in PATH.

Development Environment

Windows

  1. Install Python 3.11+.
  2. Clone or download this repository.
  3. Create a virtual environment:
python -m venv .venv
  1. Activate it:
.venv\Scripts\Activate.ps1
  1. Install Python dependencies:
pip install -r requirements.txt
pip install -e .
  1. Make sure FFmpeg (7.1.1 recomended version) is available using ONE of these options:
  • Copy ffmpeg.exe and ffprobe.exe into bin/
  • Set GVC_FFMPEG_DIR to the folder that contains both binaries
  • Add FFmpeg to PATH
  1. Run the app:
gvc-gui

Linux

  1. Install Python 3.11+.
  2. Install FFmpeg with your package manager.
  3. Clone or download this repository.
  4. Create a virtual environment:
python3 -m venv .venv
  1. Activate it:
source .venv/bin/activate
  1. Install Python dependencies:
pip install -r requirements.txt
pip install -e .
  1. Verify FFmpeg:
ffmpeg -version
ffprobe -version
  1. Run the app:
gvc-gui

Linux Package Examples

# Arch / CachyOS
sudo pacman -S ffmpeg python

# Debian / Ubuntu
sudo apt update
sudo apt install ffmpeg python3 python3-venv python3-pip

# Fedora
sudo dnf install ffmpeg python3 python3-pip

# openSUSE
sudo zypper install ffmpeg python3 python3-pip

Running the GUI

With the virtual environment active on Windows or Linux:

gvc-gui

Portable Build

Linux

Make sure ffmpeg and ffprobe are available in PATH, then run:

bash scripts/build_linux.sh

Output is generated in dist/gvc/.

Windows

Copy ffmpeg.exe and ffprobe.exe into bin/, then run:

./scripts/build_windows.ps1

Output is generated in dist/gvc/.

Project Structure

  • src/gvc/gui.py: PySide6 desktop interface
  • src/gvc/convert.py: video conversion presets and FFmpeg arguments
  • src/gvc/atlas.py: atlas generation
  • src/gvc/probe.py: FFprobe metadata reading
  • src/gvc/recommendations.py: playback recommendations
  • src/gvc/ffmpeg_paths.py: FFmpeg path resolution
  • src/gvc/settings.py: persisted UI settings
  • src/gvc/i18n.py: localization

About

A video converter for Godot and Love2D - drag, drop, and get optimized OGV files without any plugins

Topics

Resources

License

Stars

Watchers

Forks

Packages