Skip to content
th0ma7 edited this page Jan 2, 2026 · 47 revisions

SynoCommunity package FFmpeg specific FAQ

FFmpeg provides a set of command line tools to process audio and video media files.

Commands are located in /usr/local/ffmpeg<version>/bin and libraries are required by other packages. In DSM 7.0, they are located in /volume1/@appstore/ffmpeg<version>/bin.

Symbolic links are made available thru /usr/local/bin as the following where the latest installed version will become default ffmpeg:

  • ffmpeg4
  • ffmpeg5
  • ffmpeg6
  • ffmpeg7
  • ffmpeg -> Last installed version

Download Fmpeg: https://www.ffmpeg.org/ffmpeg-master-latest-win64-gpl.zip

FFMPEG ultimate guide: https://img.ly/blog/ultimate-guide-to-ffmpeg/

Important: User Permissions

To access video acceleration, said user must be in the videodriver group.

  • Access to the video device file is granted on a per application basis. This allows an application such as tvheadend to be granted access use hardware acceleration when calling ffmpeg.
  • As a default user you must interact with ffmpeg acting as a user who's access was already granted or add your user account to the videodriver group (see below).
# Check current user and groups
$ id $(whoami)
# Output: uid=1026(<username>) gid=100(users) groups=100(users),101(administrators)

# Add yourself to the videodriver group (using Synology's synogroup command)
$ sudo synogroup --member videodriver $(whoami)

# Expected output:
# Group Name: [videodriver]
# Group Type: [AUTH_LOCAL]
# Group ID:   [937]
# Group Members: 
# 0:[<username>]

# Verify the change took effect
$ id $(whoami)
# Output should now include: groups=100(users),101(administrators),937(videodriver)

# Log out and log back in for all applications to recognize the new group membership

Alternative: Run commands as the ffmpeg service user:

# For FFmpeg7
sudo su -s /bin/bash sc-ffmpeg7 -c 'command'

Validate detection of your GPU

$ lsgpu
card0                    Intel Broxton (Gen9)              drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128

Validate Intel GPU Hardware Acceleration (VA-API)

On Intel GPUs, vainfo is used to validate that hardware video acceleration is correctly exposed through VA-API and that the Intel media driver (iHD) is functional.

This output confirms that:

  • ✅ The Intel GPU is detected by the kernel
  • ✅ The Intel Media Driver (iHD) is correctly installed and loadable
  • ✅ VA-API is functional and able to communicate with the GPU
  • ✅ Hardware decode, encode and video processing capabilities are exposed
$ /var/packages/synocli-videodriver/target/bin/vainfo
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /var/packages/synocli-videodriver/target/lib/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.4.4 (226f50c)
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointFEI
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD

Note that older Intel processor will fall-back to legacy i965 driver part of vainfo output:

vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.4.1

If access is restricted or non-existant such as on virtual DSM:

$ vainfo 
Trying display: drm
error: failed to initialize display

Hardware Acceleration Support in FFmpeg

Before validating individual acceleration paths, confirm that FFmpeg itself was built with hardware acceleration support.

List available hardware acceleration methods

$ ffmpeg7 -hide_banner -hwaccels

Expected output:

Hardware acceleration methods:
vaapi
qsv
drm
opencl
vulkan

This validates that FFmpeg was compiled with support for:

  • VA-API (Intel media driver)
  • QSV (Intel Quick Sync Video)
  • DRM (direct render node access)
  • OpenCL (GPU compute filters)
  • Vulkan (new, work-in-progress)

The hardware acceleration frameworks are enabled at build time. If a method is missing here, FFmpeg cannot use it, regardless of driver availability.

Summary: What Each Path Is Best For

Acceleration Primary Use Case
VA-API Hardware decode/encode and basic video processing
QSV High-performance Intel video processing and encoding
OpenCL GPU-accelerated image and video compute filters
CPU Fallback / reference / maximum compatibility

Performance Comparison (CPU vs GPU Acceleration)

The following benchmarks were executed on the same system using FFmpeg 7.0.3, with identical input, duration, filters and output settings.

Path FPS Speed Real Time Relative to CPU
CPU 13 0.419× 23.9 s baseline
VA-API 17 0.559× 17.9 s ~1.3× faster
OpenCL 21 0.686× 14.6 s ~1.6× faster
QSV 23 0.773× 12.9 s ~1.8× faster

Summary:

  • CPU: reference baseline, slowest but lowest memory usage
  • VA-API: moderate speedup, best suited for decode/encode acceleration
  • OpenCL: good acceleration for GPU-based filters, higher memory usage
  • QSV (Intel Quick Sync Video): best overall performance on Intel GPUs

VA-API

This test validates that FFmpeg can successfully use VA-API for hardware-accelerated video processing.

Validate that VA-API hardware acceleration is properly configured and usable by FFmpeg.

$ ffmpeg7 -hide_banner -v verbose -init_hw_device vaapi
[AVHWDeviceContext @ 0x5640ffbbfbc0] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x5640ffbbfbc0] libva: VA-API version 1.23.0
[AVHWDeviceContext @ 0x5640ffbbfbc0] libva: Trying to open /var/packages/synocli-videodriver/target/lib/iHD_drv_video.so
[AVHWDeviceContext @ 0x5640ffbbfbc0] libva: Found init function __vaDriverInit_1_23
[AVHWDeviceContext @ 0x5640ffbbfbc0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x5640ffbbfbc0] Initialised VAAPI connection: version 1.23
[AVHWDeviceContext @ 0x5640ffbbfbc0] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.4.4 (c77aee7).
[AVHWDeviceContext @ 0x5640ffbbfbc0] Driver not found in known nonstandard list, using standard behaviour.

Validate available VAAPI filters:

$ ffmpeg7 -hide_banner -filters | grep vaapi
 ... deinterlace_vaapi V->V       Deinterlacing of VAAPI surfaces
 ... denoise_vaapi     V->V       VAAPI VPP for de-noise
 ... hwupload_vaapi    V->V       Upload a system memory frame to a VAAPI device.
 ... overlay_vaapi     VV->V      Overlay one video on top of another
 ... procamp_vaapi     V->V       ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast
 ... scale_vaapi       V->V       Scale to/from VAAPI surfaces.
 ... sharpness_vaapi   V->V       VAAPI VPP for sharpness
 ... tonemap_vaapi     V->V       VAAPI VPP for tone-mapping
 ... transpose_vaapi   V->V       VAAPI VPP for transpose
 ... hstack_vaapi      N->V       "VA-API" hstack
 ... vstack_vaapi      N->V       "VA-API" vstack
 ... xstack_vaapi      N->V       "VA-API" xstack

Validate available VAAPI encoders:

$ ffmpeg7 -hide_banner -encoders | grep vaapi
 V....D av1_vaapi            AV1 (VAAPI) (codec av1)
 V....D h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V....D hevc_vaapi           H.265/HEVC (VAAPI) (codec hevc)
 V....D mjpeg_vaapi          MJPEG (VAAPI) (codec mjpeg)
 V....D mpeg2_vaapi          MPEG-2 (VAAPI) (codec mpeg2video)
 V....D vp8_vaapi            VP8 (VAAPI) (codec vp8)
 V....D vp9_vaapi            VP9 (VAAPI) (codec vp9)

Minimal VA-API video processing test

$ ffmpeg7 -benchmark \
  -init_hw_device vaapi=va:/dev/dri/renderD128 \
  -filter_hw_device va \
  -f lavfi -i testsrc=duration=10:size=1920x1080:rate=30 \
  -vf "format=nv12,hwupload,scale_vaapi=w=1280:h=720,hwdownload,format=nv12" \
  -f null -

This confirms end-to-end VA-API functionality, not just driver presence, and validates that FFmpeg can:

  • Initialize a VA-API hardware device
  • Upload frames to the GPU (hwupload)
  • Execute a VA-API hardware filter (scale_vaapi)
  • Download frames back to system memory (hwdownload)

Intel Quick Sync Video (QSV)

This test validates FFmpeg’s QSV path, which is built on top of VA-API but uses Intel’s Media SDK / oneVPL. QSV often provides lower CPU usage and better performance than VA-API for Intel GPUs.

Validate that Intel QSV hardware acceleration is properly configured and usable by FFmpeg.

$ ffmpeg7 -hide_banner -v verbose -init_hw_device qsv
[AVHWDeviceContext @ 0x560e2cee7040] Trying to use DRM render node for device 0, with matching vendor id (0x8086).
[AVHWDeviceContext @ 0x560e2cee7040] libva: VA-API version 1.23.0
[AVHWDeviceContext @ 0x560e2cee7040] libva: User requested driver 'iHD'
[AVHWDeviceContext @ 0x560e2cee7040] libva: Trying to open /var/packages/synocli-videodriver/target/lib/iHD_drv_video.so
[AVHWDeviceContext @ 0x560e2cee7040] libva: Found init function __vaDriverInit_1_23
[AVHWDeviceContext @ 0x560e2cee7040] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x560e2cee7040] Initialised VAAPI connection: version 1.23
[AVHWDeviceContext @ 0x560e2cee7040] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.4.4 (c77aee7).
[AVHWDeviceContext @ 0x560e2cee7040] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x560e2cee6bc0] Use Intel(R) Media SDK to create MFX session, API version is 1.35, the required implementation version is 1.3
[AVHWDeviceContext @ 0x560e2cee6bc0] Initialize MFX session: implementation version is 1.35

Validate available QSV filters:

$ ffmpeg7 -hide_banner -filters | grep qsv
 ... deinterlace_qsv   V->V       Quick Sync Video "deinterlacing"
 ... overlay_qsv       VV->V      Quick Sync Video overlay.
 ... scale_qsv         V->V       Quick Sync Video "scaling and format conversion"
 ... vpp_qsv           V->V       Quick Sync Video "VPP"
 ... hstack_qsv        N->V       "Quick Sync Video" hstack
 ... vstack_qsv        N->V       "Quick Sync Video" vstack
 ... xstack_qsv        N->V       "Quick Sync Video" xstack

Validate available QSV decoders:

$ ffmpeg7 -hide_banner -decoders | grep qsv
 V....D av1_qsv              AV1 video (Intel Quick Sync Video acceleration) (codec av1)
 V....D h264_qsv             H264 video (Intel Quick Sync Video acceleration) (codec h264)
 V....D hevc_qsv             HEVC video (Intel Quick Sync Video acceleration) (codec hevc)
 V....D mjpeg_qsv            MJPEG video (Intel Quick Sync Video acceleration) (codec mjpeg)
 V....D mpeg2_qsv            MPEG2VIDEO video (Intel Quick Sync Video acceleration) (codec mpeg2video)
 V....D vc1_qsv              VC1 video (Intel Quick Sync Video acceleration) (codec vc1)
 V....D vp8_qsv              VP8 video (Intel Quick Sync Video acceleration) (codec vp8)
 V....D vp9_qsv              VP9 video (Intel Quick Sync Video acceleration) (codec vp9)
 V....D vvc_qsv              VVC video (Intel Quick Sync Video acceleration) (codec vvc)

Validate available QSV encoders:

$ ffmpeg7 -hide_banner -encoders | grep qsv
 V..... h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
 V..... hevc_qsv             HEVC (Intel Quick Sync Video acceleration) (codec hevc)
 V..... mjpeg_qsv            MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)
 V..... mpeg2_qsv            MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)
 V..... vp9_qsv              VP9 video (Intel Quick Sync Video acceleration) (codec vp9)

Minimal QSV video processing test:

$ ffmpeg7 -benchmark \
  -init_hw_device qsv=qsv \
  -filter_hw_device qsv \
  -f lavfi -i testsrc=duration=10:size=1920x1080:rate=30 \
  -vf "format=nv12,hwupload=extra_hw_frames=64,scale_qsv=w=1280:h=720,hwdownload,format=nv12" \
  -f null -

This confirms that Intel QSV acceleration is available and usable and validates FFmpeg can:

  • Initialize a QSV hardware context
  • Allocate QSV surfaces on the GPU
  • Execute a QSV-native filter (scale_qsv)

OpenCL (not meant for video encode/decode)

This test validates GPU compute acceleration via OpenCL, typically used for image processing filters. OpenCL filters are compute-oriented, not video-codec-oriented, and are complementary to VA-API / QSV.

Validate that the OpenCL device is accessible and usable by FFmpeg for GPU-accelerated compute filters.

$ ffmpeg7 -hide_banner -v verbose -init_hw_device opencl
[AVHWDeviceContext @ 0x562fdca7bbc0] 0.0: Intel(R) OpenCL Graphics / Intel(R) HD Graphics 500
[AVHWDeviceContext @ 0x562fdca7bbc0] Media sharing must be enabled on context creation to use QSV to OpenCL mapping.
[AVHWDeviceContext @ 0x562fdca7bbc0] QSV to OpenCL mapping not usable.

How to validate OpenCL hardware acceleration (truncated output below - only available on DSM >=7 with more recent Intel processors):

$ /var/packages/synocli-videodriver/target/bin/clinfo
Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 3.0 
  Platform Profile                                FULL_PROFILE
...

Validate available OpenCL filters:

$ ffmpeg7 -hide_banner -filters | grep opencl
 ... avgblur_opencl    V->V       Apply average blur filter
 ... boxblur_opencl    V->V       Apply boxblur filter to input video
 ... colorkey_opencl   V->V       Turns a certain color into transparency. Operates on RGB colors.
 ... convolution_opencl V->V       Apply convolution mask to input video
 ... deshake_opencl    V->V       Feature-point based video stabilization filter
 ... dilation_opencl   V->V       Apply dilation effect
 ... erosion_opencl    V->V       Apply erosion effect
 ... nlmeans_opencl    V->V       Non-local means denoiser through OpenCL
 ... overlay_opencl    VV->V      Overlay one video on top of another
 ... pad_opencl        V->V       Pad the input video.
 ... prewitt_opencl    V->V       Apply prewitt operator
 ... program_opencl    N->V       Filter video using an OpenCL program
 ... remap_opencl      VVV->V     Remap pixels using OpenCL.
 ... roberts_opencl    V->V       Apply roberts operator
 ... scale_opencl      V->V       Scale the input video size through OpenCL.
 ... sobel_opencl      V->V       Apply sobel operator
 ... tonemap_opencl    V->V       Perform HDR to SDR conversion with tonemapping.
 ... transpose_opencl  V->V       Transpose input video
 ... unsharp_opencl    V->V       Apply unsharp mask to input video
 ... xfade_opencl      VV->V      Cross fade one video with another video.
 ... openclsrc         |->V       Generate video using an OpenCL program

Minimal OpenCL filter test:

$ ffmpeg7 -benchmark \
  -init_hw_device opencl=ocl \
  -filter_hw_device ocl \
  -f lavfi -i testsrc=duration=10:size=1920x1080:rate=30 \
  -vf "format=nv12,hwupload,boxblur_opencl,hwdownload,format=nv12" \
  -f null -

This Confirms OpenCL runtime and GPU compute path are operational and validates that FFmpeg can:

  • Initialize an OpenCL compute device
  • Upload frames to GPU memory
  • Execute OpenCL-based filters
  • Download frames back to system memory

Vulkan

To be confirmed but might work on Synology models using a 5.10 kernel or newer using https://github.com/007revad/Transcode_for_x25.

Fails on older Synology models to detect proper vulkan acceleration:

$ /var/packages/synocli-videodriver/target/bin/vulkaninfo 
ERROR: [../src/intel/vulkan/anv_allocator.c:142] Code 0 : VK_ERROR_INITIALIZATION_FAILED
ERROR: [Loader Message] Code 0 : terminator_CreateDevice: Failed in ICD /volume1/@appstore/synocli-videodriver/lib/libvulkan_intel.so vkCreateDevice call
ERROR: [Loader Message] Code 0 : vkCreateDevice:  Failed to create device chain.
ERROR at /github/workspace/spk/synocli-videodriver/work-x64-7.1/Vulkan-Tools-1.4.337/vulkaninfo/./vulkaninfo.h:1723:vkCreateDevice failed with ERROR_INITIALIZATION_FAILED

Fails on older Synology models to initiate vulkan hardware device using ffmpeg:

$ ffmpeg7 -hide_banner -v verbose -init_hw_device vulkan
[AVHWDeviceContext @ 0x5650254c7bc0] Supported layers:
[AVHWDeviceContext @ 0x5650254c7bc0] Using instance extension VK_KHR_portability_enumeration
[AVHWDeviceContext @ 0x5650254c7bc0] GPU listing:
[AVHWDeviceContext @ 0x5650254c7bc0]     0: Intel(R) HD Graphics 500 (APL 2) (integrated) (0x5a85)
[AVHWDeviceContext @ 0x5650254c7bc0] Device 0 selected: Intel(R) HD Graphics 500 (APL 2) (integrated) (0x5a85)
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_EXT_physical_device_drm
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_EXT_shader_atomic_float
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_EXT_external_memory_dma_buf
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_EXT_image_drm_format_modifier
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x5650254c7bc0] Using device extension VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x5650254c7bc0] Queue families:
[AVHWDeviceContext @ 0x5650254c7bc0]     0: graphics compute transfer (queues: 1)
[AVHWDeviceContext @ 0x5650254c7bc0] Device creation failure: VK_ERROR_INITIALIZATION_FAILED
Device creation failed: -542398533.
Failed to set value 'vulkan' for option 'init_hw_device': Generic error in an external library

Clone this wiki locally