Feature Description
It would be great if XBVR could use hardware acceleration (Intel QSV, VAAPI, or NVENC) for preview/thumbnail generation instead of software encoding.
Current Behavior
Currently, pkg/tasks/preview.go uses software encoding:
cmd := buildCmd(GetBinPath("ffmpeg"), args...)
This is CPU-intensive, especially when generating previews for large libraries.
Proposed Solution
Add an environment variable like XBVR_HWACCEL to enable hardware acceleration:
XBVR_HWACCEL=qsv # Intel Quick Sync
XBVR_HWACCEL=vaapi # VAAPI (Linux)
XBVR_HWACCEL=nvenc # NVIDIA
FFmpeg call would change to:
ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mp4 -c:v h264_qsv ...
Benefits
- Significantly faster preview generation
- Lower CPU usage
- Better utilization of available hardware
Environment
- XBVR running in Docker
- Intel CPU with QSV support (tested with HD 630 / Kaby Lake)
- Custom FFmpeg build with QSV enabled
Thank you for considering this feature!