VideoTools/scripts
Jake P fa6ff5aba1 Turned GIT Converter Modular
📋 GIT Converter v2.7 - Feature Summary & Changes

🚀 Major New Features Added

🎬 Codec & Container Selection
- AV1 vs HEVC encoding - Choose between next-gen AV1 or mature HEVC
- MKV vs MP4 containers - Flexibility vs device compatibility
- User-controlled output format - Full control over final file type

⚙️ Advanced Quality Control
- Source Quality mode - Bypass quality changes unless required
- CRF options - 16 (near-lossless), 18 (recommended), 20 (balanced)
- Custom bitrate control - Exact bitrate specification for precise file sizes
- Encoder-specific optimization - Different parameters for AV1 vs HEVC

🎮 GPU/Encoder Selection
- Auto-detection - Intelligent hardware detection with benchmarking
- Manual selection - Choose specific GPU/encoder:
  - NVIDIA NVENC (HEVC/AV1)
  - AMD AMF (HEVC/AV1)
  - Intel Quick Sync (HEVC/AV1)
  - CPU encoding (SVT-AV1/x265)
  - Custom encoder selection
- Two-stage interface - Auto-detect first, then option to override

🎨 Enhanced Color Correction
- 8 specialized presets:
  - 2000s DVD Restore
  - 90s Quality Restore
  - VHS Quality Restore
  - Anime Preservation
  - Pink skin tone restoration (Topaz AI fix)
  - Warm/Cool color boosts
- Fixed filter parameters - Resolved unsharp filter matrix size issues

🔧 Technical Improvements

📦 Modular Architecture
- Separated concerns into focused modules:
  - hardware.sh - GPU detection & encoder selection
  - codec.sh - Codec & container options
  - quality.sh - Quality modes & bitrate control
  - filters.sh - Resolution, FPS, color correction
  - encode.sh - FFmpeg execution & monitoring

 Performance Optimizations
- Hardware benchmarking - Tests encoder speed before selection
- Timeout protection - Prevents hanging during encoder tests
- Better error reporting - Shows SUCCESS/FAILED/NOT AVAILABLE status
- Improved timing logic - Cross-platform compatible timing

🖥️ User Experience
- Two-stage workflow - Auto-detect → confirm/override
- Clear menu navigation - Numbered options with validation
- Real-time feedback - Shows what's being tested/selected
- Fixed input validation - Proper regex for multi-digit numbers

🐛 Bug Fixes
- Fixed unsharp filter - Corrected matrix size requirements (odd numbers only)
- Fixed hue parameter - Corrected eq filter syntax
- Fixed encoder detection - Improved hardware detection logic
- Fixed menu display - Resolved command substitution output capture issues

🎯 Key Benefits
- Full user control over encoding parameters
- Hardware optimization with automatic fallbacks
- Professional quality restoration options
- Modular design for easy maintenance
- Cross-platform compatibility (Windows/Linux)
2025-12-14 03:00:44 +00:00
..
bat Add VT helper scripts for 4K/1440p 60fps and smoothing 2025-12-09 00:57:48 -05:00
git_converter Turned GIT Converter Modular 2025-12-14 03:00:44 +00:00
alias.sh Add build/run scripts and fix DVD options visibility 2025-11-29 19:53:47 -05:00
build-linux.sh Fix droppable signature and dependency handling 2025-12-11 06:53:49 -05:00
build-windows.sh add build.bat script for Windows installation 2025-12-04 17:05:52 -05:00
build.bat Handle already-installed MSYS2 in build script 2025-12-04 17:50:58 -05:00
build.ps1 Add cross-platform dependency installation and build scripts 2025-12-02 18:19:33 -05:00
build.sh Clean Go cache automatically at build start 2025-12-09 12:05:27 -05:00
clear-go-cache.bat Add Windows clear-go-cache.bat helper 2025-12-09 00:51:11 -05:00
clear-go-cache.sh Add one-click AV1/HEVC helper scripts (sh/bat) 2025-12-09 00:53:56 -05:00
convert-av1-4k60-vt.sh Add VT helper scripts for 4K/1440p 60fps and smoothing 2025-12-09 00:57:48 -05:00
convert-av1-1080p-vt.sh Add one-click AV1/HEVC helper scripts (sh/bat) 2025-12-09 00:53:56 -05:00
convert-hevc-4k60-vt.sh Add VT helper scripts for 4K/1440p 60fps and smoothing 2025-12-09 00:57:48 -05:00
convert-hevc-1080p-vt.sh Add one-click AV1/HEVC helper scripts (sh/bat) 2025-12-09 00:53:56 -05:00
convert-hevc-1440p60-vt.sh Add VT helper scripts for 4K/1440p 60fps and smoothing 2025-12-09 00:57:48 -05:00
convert-hevc-lossless-vt.sh Add one-click AV1/HEVC helper scripts (sh/bat) 2025-12-09 00:53:56 -05:00
install-deps-linux.sh Add cross-platform dependency installation and build scripts 2025-12-02 18:19:33 -05:00
install-deps-windows.bat Add Windows helper scripts and conversion questionnaire 2025-12-07 11:37:45 -05:00
install-deps-windows.ps1 Add cross-platform dependency installation and build scripts 2025-12-02 18:19:33 -05:00
README.md Show bitrate in kbps/Mbps and expand presets 2025-12-08 23:53:40 -05:00
run.sh Add build/run scripts and fix DVD options visibility 2025-11-29 19:53:47 -05:00
setup-windows.ps1 add build.bat script for Windows installation 2025-12-04 17:05:52 -05:00
smooth-60fps-vt.sh Add VT helper scripts for 4K/1440p 60fps and smoothing 2025-12-09 00:57:48 -05:00

VideoTools Build Scripts

This directory contains scripts for building and managing VideoTools on different platforms.

Linux

Install Dependencies

Automatically installs all required dependencies for your Linux distribution:

./scripts/install-deps-linux.sh

Supported distributions:

  • Fedora / RHEL / CentOS
  • Ubuntu / Debian / Pop!_OS / Linux Mint
  • Arch Linux / Manjaro / EndeavourOS
  • openSUSE / SLES

Installs:

  • Go 1.21+
  • GCC compiler
  • OpenGL development libraries
  • X11 development libraries
  • ALSA audio libraries
  • ffmpeg

Build VideoTools

./scripts/build.sh

Features:

  • Automatic dependency verification
  • Clean build option
  • Progress indicators
  • Error handling

Run VideoTools

./scripts/run.sh

Runs VideoTools with proper library paths configured.

Shell Alias

source ./scripts/alias.sh

Adds a VideoTools command to your current shell session.

Windows

Install Dependencies

Run in PowerShell as Administrator:

.\scripts\install-deps-windows.ps1

Options:

  • -UseScoop - Use Scoop package manager instead of Chocolatey
  • -SkipFFmpeg - Skip ffmpeg installation (if you already have it)

Installs:

  • Go 1.21+
  • MinGW-w64 (GCC compiler)
  • ffmpeg
  • Git (optional, for development)

Package managers supported:

  • Chocolatey (default, requires admin)
  • Scoop (user-level, no admin)

Build VideoTools

Run in PowerShell:

.\scripts\build.ps1

Options:

  • -Clean - Clean build cache before building
  • -SkipTests - Skip running tests

Features:

  • Automatic GPU detection (NVIDIA/Intel/AMD)
  • Dependency verification
  • File size reporting
  • Build status indicators

Cross-Platform Notes

CGO Requirements

VideoTools uses Fyne for its GUI, which requires CGO (C bindings) for OpenGL support. This means:

  1. C compiler required (GCC on Linux, MinGW on Windows)
  2. OpenGL libraries required (system-dependent)
  3. Build time is longer than pure Go applications

ffmpeg Requirements

VideoTools requires ffmpeg to be available in the system PATH:

  • Linux: Installed via package manager
  • Windows: Installed via Chocolatey/Scoop or manually

The application will auto-detect available hardware encoders:

  • NVIDIA: NVENC (h264_nvenc, hevc_nvenc)
  • Intel: Quick Sync Video (h264_qsv, hevc_qsv)
  • AMD: AMF (h264_amf, hevc_amf)
  • VA-API (Linux only)

GPU Encoding

For best performance with hardware encoding:

NVIDIA (Recommended for Jake's setup):

  • Install latest NVIDIA drivers
  • GTX 1060 and newer support NVENC
  • Reduces 2-hour encode from 6-9 hours to <1 hour

Intel:

  • Install Intel Graphics drivers
  • 7th gen (Kaby Lake) and newer support Quick Sync
  • Built into CPU, no dedicated GPU needed

AMD:

  • Install latest AMD drivers
  • Most modern Radeon GPUs support AMF
  • Performance similar to NVENC

Troubleshooting

Linux: Missing OpenGL libraries

# Fedora/RHEL
sudo dnf install mesa-libGL-devel

# Ubuntu/Debian
sudo apt install libgl1-mesa-dev

# Arch
sudo pacman -S mesa

Windows: MinGW not in PATH

After installing MinGW, restart PowerShell or add to PATH manually:

$env:Path += ";C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin"

Build fails with "cgo: C compiler not found"

Linux: Install gcc Windows: Install MinGW via install-deps-windows.ps1

ffmpeg not found

Linux:

sudo dnf install ffmpeg-free  # Fedora
sudo apt install ffmpeg       # Ubuntu

Windows:

choco install ffmpeg
# or
scoop install ffmpeg

GPU encoding not working

  1. Verify GPU drivers are up to date
  2. Check ffmpeg encoders:
    ffmpeg -encoders | grep nvenc  # NVIDIA
    ffmpeg -encoders | grep qsv    # Intel
    ffmpeg -encoders | grep amf    # AMD
    
  3. If encoders not listed, reinstall GPU drivers

Development

Quick Build Cycle

Linux:

./scripts/build.sh && ./scripts/run.sh

Windows:

.\scripts\build.ps1 && .\VideoTools.exe

Clean Build

Linux:

./scripts/build.sh  # Includes automatic cleaning

Windows:

.\scripts\build.ps1 -Clean

Build for Distribution

Linux:

CGO_ENABLED=1 go build -ldflags="-s -w" -o VideoTools .
strip VideoTools  # Further reduce size

Windows:

$env:CGO_ENABLED = "1"
go build -ldflags="-s -w -H windowsgui" -o VideoTools.exe .

The -H windowsgui flag prevents a console window from appearing on Windows.

Platform-Specific Notes

Linux: Wayland vs X11

VideoTools works on both Wayland and X11. The build scripts automatically detect your display server.

Windows: Antivirus False Positives

Some antivirus software may flag the built executable. This is common with Go applications. You may need to:

  1. Add an exception for the build directory
  2. Submit the binary to your antivirus vendor for whitelisting
  • Handle codesigning requirements

License

VideoTools build scripts are part of the VideoTools project. See the main project LICENSE file for details.