- Add `checkNvidiaGpuAvailable()` function using nvidia-smi to detect GPU presence
- Add comprehensive logging for hardware acceleration decisions:
- GPU detection status
- Hardware vs software encoding/decoding choices
- CUDA codec support detection
- Encoder selection decisions
- Cache GPU availability results to avoid repeated checks
- Add `resetNvidiaGpuCache()` for testing
- Update tests to handle GPU availability mocking
This provides visibility into hardware acceleration decisions and ensures CUDA is only attempted when NVIDIA GPU hardware is actually available.
- Detect video codec using ffprobe instead of file extensions
- Auto-enable CUDA hwaccel for supported codecs when FFMPEG_PREFER_HARDWARE=true
- Skip probing for image formats to optimize performance
- Add comprehensive tests for hardware acceleration logic
Add FFMPEG_PREFER_HARDWARE env var to enable hardware acceleration
Use h264_nvenc and hevc_nvenc encoders when hardware preferred
Fall back to software encoders (libx264/libx265) when disabled
Add comprehensive tests for hardware/software encoding modes
Update README with new environment variable documentation
This enables GPU-accelerated video encoding for better performance on systems with NVIDIA GPUs.