QSVEnc Documentation

repository·master·Indexed 19 days ago

https://github.com/rigaya/qsvenc

A toolset for high-performance video encoding and decoding using Intel QuickSyncVideo (QSV) hardware acceleration. It includes QSVEncC, a standalone command-line tool for transcoding, and QSVEnc.auo, an output plugin for AviUtl. Supported codecs include H.264/AVC, H.265/HEVC, MPEG2, VP9, and AV1, with a comprehensive library of VPP (Video Pre-Processing) filters for deinterlacing, noise reduction, and color adjustment.

Tokens
12.1K
Snippets
31
Records
60
Agent score
65%

What's inside QSVEnc

  1. Overview of QSVEnc components

    master

    QSVEnc is a tool designed to experiment with the performance (quality and speed) of Intel hardware encoders (QuickSync Video - QSV). It is provided in two main forms:

    1. QSVEncC.exe: A standalone command-line version for direct use.
    2. QSVEnc.auo: An output plugin for AviUtl that uses oneVPL for encoding.

    Developers and users can choose between the CLI for automated or scripted workflows and the AviUtl plugin for integration into a GUI-based video editing environment.

  2. Overview of QSVEnc software types

    master

    QSVEnc is designed to investigate the performance and image quality of Intel's QuickSyncVideo (QSV) hardware encoder. It is distributed in two forms:

    1. QSVEncC.exe: A standalone command-line version used for transcoding tasks.
    2. QSVEnc.auo: An output plugin specifically for the AviUtl video editing software.

    Both versions share core encoding features such as support for H.264/AVC, H.265/HEVC, MPEG2, VP9, and AV1, along with various encode modes (CQP, CBR, VBR, etc.) and VPP (Video Pre-Processing) filters.

  3. Specific features of QSVEncC (CLI version)

    master

    The standalone command-line version QSVEncC includes additional features:

    • Hardware Decoding Support: Supports MPEG2, H.264/AVC, HEVC, VP8, VP9, and AV1.
    • Flexible Pipeline: Allows free combination of QSV-based decoding, VPP, and encoding.
    • Passthrough: Supports outputting without encoding.
    • Format Support: Supports various formats including avi(vfw), avs, vpy, y4m, and raw.
    • Audio Processing: Uses libavcodec/libavformat for audio processing.
    • Muxing: Supports muxing while outputting using libavcodec/libavformat.
  4. Common encoding features and modes

    master

    Both the command-line version (QSVEncC) and the AviUtl plugin (QSVEnc.auo) support the following QuickSyncVideo features:

    Supported Codecs

    • H.264/AVC
    • H.265/HEVC (8bit/10bit)
    • MPEG2
    • VP9 (8bit/10bit)
    • AV1 (8bit/10bit)

    Encode Modes

    • CQP (Fixed Quantization)
    • CBR (Constant bitrate)
    • VBR (Variable bitrate)
    • AVBR (Adaptive Variable bitrate)
    • QVBR (Quality based Variable bitrate)
    • LA (Lookahead mode)
    • LA-HRD (HRD compatible Lookahead mode)
    • ICQ (Constant Quality)
    • LA-ICQ (Constant Quality with Lookahead)
    • VCM (Video Conference mode)

    Additional Capabilities

    • 7-step quality presets.
    • Interlaced encoding via PAFF.
    • Support for codec profile/level, SAR, colormatrix, maxbitrate, GOP length, etc.
    • Parallel encoding supporting multiple GPUs.
    • SSIM/PSNR calculation.
    • Extensive VPP (Video Pre-Processing) filter library including deinterlacing, noise reduction, resizing, and color adjustment.
  5. Use avcodec encoders with VPP filters

    master

    Starting from version 8.00, you can use VPP (Video Processing Pipeline) filters even when using avcodec encoders (e.g., av_libsvtav1, av_libvvenc, av_libvpx-vp9) by specifying them with the -c flag. You can pass encoder-specific parameters using the --avcodec-prms option.

    Note: This feature is available when using the -c av_xxx syntax.

    -c av_libsvtav1 --avcodec-prms "preset=6,crf=30,svtav1-params=enable-variance-boost=1:variance-boost-strength=2"
  6. How GPU selection works in multi-GPU environments (Windows)

    master

    In Windows environments with multiple QSV-capable GPUs, QSVEncC performs automatic selection based on the following logic:

    1. Capability Check: It verifies if a GPU supports the requested Codec, Profile, and Level. It also checks for 10bit depth encoding and HW decoding if specified in the options.
    2. Preference Logic: If multiple GPUs meet the requirements, the software prefers the GPU with the lowest Video Engine (VE) utilization and lowest GPU core utilization.

    Note on Timing: Utilization values are checked during the initialization phase. If multiple tasks are started simultaneously, they may all target the same GPU before the utilization values are updated, potentially leading to uneven distribution.

    Manual Selection: You can manually specify a GPU using the --device option.

  7. QSVEncC specific features

    master

    The command-line version QSVEncC includes additional capabilities beyond the core encoding engine:

    • Hardware Decoding: Supports QSV(hw) decoding for MPEG2, H.264/AVC, HEVC, VP8, VP9, and AV1.
    • Input Formats: Supports various formats including .avs, .vpy, .y4m, and raw data.
    • Muxing/Demuxing: Uses libavformat for demuxing and muxing.
    • Decoding: Uses libavcodec for decoding.
  8. Common features in QSVEnc and QSVEncC

    master

    Both the standalone CLI and the AviUtl plugin share several core capabilities:

    Supported Codecs (QuickSync Video)

    • H.264/AVC
    • H.265/HEVC (8bit/10bit)
    • MPEG2
    • VP9 (8bit/10bit)
    • AV1 (8bit/10bit)

    Rate Control Modes

    • CQP: Constant Quantization Parameter
    • CBR: Constant Bit Rate
    • VBR: Variable Bit Rate
    • AVBR: Adaptive Variable Bit Rate
    • QVBR: Quality-based Variable Bit Rate
    • Lookahead: Lookahead rate control
    • LA-HRD: Lookahead rate control (HRD compatible)
    • ICQ: Fixed Quality mode
    • LA-ICQ: Lookahead-based Fixed Quality mode
    • VCM: Video Conferencing Mode

    Additional Capabilities

    • 7 levels of encoding quality specification
    • Interlace preservation (PAFF method)
    • Scene change detection
    • SAR ratio specification
    • Color matrix and other parameter specification
    • H.264 Level/Profile specification
    • Blu-ray encoding mode
    • Maximum bitrate and maximum GOP length specification
    • AVX2 acceleration
    • Parallel encoding using multiple GPUs
    • SSIM/PSNR calculation for encoding results
    • VPP (Video Post-Processing) filters
  9. Install QSVEncC on Windows 10

    master

    To install QSVEncC on Windows 10, follow these steps:

    1. Install Intel Graphics driver: Ensure your Intel graphics drivers are up to date.
    2. Download Windows binary: Download the appropriate binary from the QSVEnc releases page.
      • Use QSVEncC_x.xx_Win32.7z for 32-bit systems.
      • Use QSVEncC_x.xx_x64.7z for 64-bit systems.

    QSVEncC can be run directly from the extracted directory without a formal installation process.

    N/A
  10. Build VapourSynth (Optional)

    master

    Building VapourSynth allows QSVEncC to load .vpy scripts. This is an optional step.

    1. Install Build Tools

    sudo apt install python3-pip autoconf automake libtool meson

    2. Install zimg

    git clone https://github.com/sekrit-twc/zimg.git --recursive
    cd zimg
    ./autogen.sh
    ./configure
    make && sudo make install
    cd ..

    3. Install Cython

    sudo pip3 install Cython

    4. Build VapourSynth

    git clone https://github.com/vapoursynth/vapoursynth.git
    cd vapoursynth
    ./autogen.sh
    ./configure
    make && sudo make install
    
    # Link vapoursynth for automatic loading (replace python3.x with your version)
    sudo ln -s /usr/local/lib/python3.x/site-packages/vapoursynth.so /usr/lib/python3.x/lib-dynload/vapoursynth.so
    sudo ldconfig

    5. Verify Installation

    vspipe --version