Transcoding errors using Intel Quick Sync

I get the this Error in the Logs when transcoding a video:
[Nest] 7 - 10/04/2023, 3:51:08 PM LOG [MediaService] Start encoding video de4ebb6f-e623-4618-b76c-ebf31e3ea95a {"inputOptions":["-init_hw_device qsv=hw","-filter_hw_device hw"],"outputOptions":["-c:v h264_qsv","-c:a aac","-movflags faststart","-fps_mode passthrough","-map 0:1","-map 0:0","-bf 7","-refs 5","-g 256","-v verbose","-vf format=nv12,hwupload=extra_hw_frames=64,scale_qsv=720:-1","-preset 7","-global_quality 23"],"twoPass":false}

[... ]

[AVHWDeviceContext @ 0x5f89e160300] Trying to use DRM render node for device 0, with matching kernel driver (i915).

[AVHWDeviceContext @ 0x5f89e160300] libva: VA-API version 1.18.0

[AVHWDeviceContext @ 0x5f89e160300] libva: User requested driver 'iHD'

[AVHWDeviceContext @ 0x5f89e160300] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so

[AVHWDeviceContext @ 0x5f89e160300] libva: Found init function __vaDriverInit_1_18

[AVHWDeviceContext @ 0x5f89e160300] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed

[AVHWDeviceContext @ 0x5f89e160300] libva: va_openDriver() returns 1

[AVHWDeviceContext @ 0x5f89e160300] Failed to initialise VAAPI connection: 1 (operation failed).

Device creation failed: -5.

Failed to set value 'qsv=hw' for option 'init_hw_device': Input/output error

Error parsing global options: Input/output error

[Nest] 7 - 10/04/2023, 3:51:09 PM ERROR [MediaService] Error: ffmpeg exited with code 1: Device creation failed: -5.

Failed to set value 'qsv=hw' for option 'init_hw_device': Input/output error

Error parsing global options: Input/output error

[Nest] 7 - 10/04/2023, 3:51:09 PM ERROR [MediaService] Error occurred during transcoding. Retrying with QSV acceleration disabled.
[Nest] 7 - 10/04/2023, 3:51:08 PM LOG [MediaService] Start encoding video de4ebb6f-e623-4618-b76c-ebf31e3ea95a {"inputOptions":["-init_hw_device qsv=hw","-filter_hw_device hw"],"outputOptions":["-c:v h264_qsv","-c:a aac","-movflags faststart","-fps_mode passthrough","-map 0:1","-map 0:0","-bf 7","-refs 5","-g 256","-v verbose","-vf format=nv12,hwupload=extra_hw_frames=64,scale_qsv=720:-1","-preset 7","-global_quality 23"],"twoPass":false}

[... ]

[AVHWDeviceContext @ 0x5f89e160300] Trying to use DRM render node for device 0, with matching kernel driver (i915).

[AVHWDeviceContext @ 0x5f89e160300] libva: VA-API version 1.18.0

[AVHWDeviceContext @ 0x5f89e160300] libva: User requested driver 'iHD'

[AVHWDeviceContext @ 0x5f89e160300] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so

[AVHWDeviceContext @ 0x5f89e160300] libva: Found init function __vaDriverInit_1_18

[AVHWDeviceContext @ 0x5f89e160300] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so init failed

[AVHWDeviceContext @ 0x5f89e160300] libva: va_openDriver() returns 1

[AVHWDeviceContext @ 0x5f89e160300] Failed to initialise VAAPI connection: 1 (operation failed).

Device creation failed: -5.

Failed to set value 'qsv=hw' for option 'init_hw_device': Input/output error

Error parsing global options: Input/output error

[Nest] 7 - 10/04/2023, 3:51:09 PM ERROR [MediaService] Error: ffmpeg exited with code 1: Device creation failed: -5.

Failed to set value 'qsv=hw' for option 'init_hw_device': Input/output error

Error parsing global options: Input/output error

[Nest] 7 - 10/04/2023, 3:51:09 PM ERROR [MediaService] Error occurred during transcoding. Retrying with QSV acceleration disabled.
I am running Immich in Portainer. I have added /dev/dri as a device in the container.
7 Replies
sogan
sogan2y ago
Hi, could you share the cpu model as well as the host server’s kernel version?
FireBird
FireBirdOP2y ago
CPU: Intel Celeron J1900 Kernel: 4.4.180+
sogan
sogan2y ago
That CPU isn’t among the supported platforms for Quick Sync https://github.com/intel/media-driver#supported-platforms
GitHub
GitHub - intel/media-driver
Contribute to intel/media-driver development by creating an account on GitHub.
sogan
sogan2y ago
You can try VAAPI instead
abbhishek_chakra
@sogan where can I check if my cpu is in the supported list? I have a i3 4010u
sogan
sogan2y ago
Check the platform of the CPU (yours is Haswell) and make sure it’s included in the list in the above link

Did you find this page helpful?