Skip to content

[Feature Request] Add hardware acceleration (QSV/VAAPI) support for preview generation #2107

@Powerbock

Description

@Powerbock

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions