<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
While recent testing of a custom built didn't succeed to fire up
system FFmpeg QSV hwaccel encoding (so far), it possibly may be
better success with the more generic VAAPI instead.<br>
Cingg has currently rendering preset/profile for h264/hevc_vaapi,
but not av1_vaapi yet(?) as supported by ffmpeg (?)<br>
<br>
First to find the system FFmpeg 7.0.2 supported vaapi encoders and
formats:<br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg -hide_banner
-encoders | grep vaapi<br>
V....D av1_vaapi AV1 (VAAPI) (codec av1)<br>
V....D h264_vaapi H.264/AVC (VAAPI) (codec h264)<br>
V....D hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)<br>
V....D mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)<br>
V....D mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)<br>
V....D vp8_vaapi VP8 (VAAPI) (codec vp8)<br>
V....D vp9_vaapi VP9 (VAAPI) (codec vp9)</font><br>
<br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg -hide_banner -h
encoder=av1_vaapi | egrep 'Supported|profile|main|high'<br>
Supported hardware devices: vaapi <br>
Supported pixel formats: vaapi<br>
-profile <int> E..V....... Set profile
(seq_profile) (from -99 to 255) (default -99)<br>
main 0 E..V.......<br>
high 1 E..V.......<br>
-tier <int> E..V....... Set tier
(seq_tier) (from 0 to 1) (default main)<br>
main 0 E..V.......<br>
high 1 E..V.......<br>
<br>
<br>
ffmpeg -hide_banner -h encoder=hevc_vaapi | egrep
'Supported|profile|main|high'<br>
Supported hardware devices: vaapi <br>
Supported pixel formats: vaapi<br>
-profile <int> E..V....... Set profile
(general_profile_idc) (from -99 to 255) (default -99)<br>
main 1 E..V.......<br>
main10 2 E..V.......<br>
-tier <int> E..V....... Set tier
(general_tier_flag) (from 0 to 1) (default main)<br>
main 0 E..V.......<br>
high 1 E..V.......</font><br>
<br>
------------------------<br>
<br>
FFmpeg -loglevel debug details for now<br>
<br>
1)<br>
SD-DV --> VAAPI_HEVC<br>
<font face="Courier New, Courier, monospace">........<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Trying to use DRM render node
for device 0.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] libva: VA-API version 1.22.0<br>
[AVHWDeviceContext @ 0x7f9080c3b780] libva: Trying to open
/usr/lib64/dri/iHD_drv_video.so<br>
[AVHWDeviceContext @ 0x7f9080c3b780] libva: Found init function
__vaDriverInit_1_22<br>
[AVHWDeviceContext @ 0x7f9080c3b780] libva: va_openDriver()
returns 0<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Initialised VAAPI connection:
version 1.22<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x41524742 -> bgra.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x41424752 -> rgba.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x58524742 -> bgr0.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x58424752 -> rgb0.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30335241 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30334241 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30335258 ->
x2rgb10le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30334258 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x36314752 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x56555941 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x56555958 -> vuyx.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30303859 -> gray.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x3231564e -> nv12.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x3132564e ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x32595559 ->
yuyv422.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x59565955 ->
uyvy422.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x32315659 ->
yuv420p.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30323449 ->
yuv420p.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x50313134 ->
yuv411p.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x48323234 ->
yuv422p.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x56323234 ->
yuv440p.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x50343434 ->
yuv444p.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x33434d49 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30313050 ->
p010le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x32313050 ->
p012le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x36313050 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30313259 ->
y210le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x32313259 ->
y212le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x36313259 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x30313459 ->
xv30le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x32313459 ->
xv36le.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x36313459 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x50424752 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Format 0x50524742 ->
unknown.<br>
[AVHWDeviceContext @ 0x7f9080c3b780] VAAPI driver: Intel iHD
driver for Intel(R) Gen Graphics - 24.3.4 ().<br>
[AVHWDeviceContext @ 0x7f9080c3b780] Driver not found in known
nonstandard list, using standard behaviour.<br>
[AVHWFramesContext @ 0x7f90800de5c0] Created surface 0.<br>
[AVHWFramesContext @ 0x7f90800de5c0] Direct mapping possible.<br>
[hevc_vaapi @ 0x7f90803a3cc0] Input surface format is nv12.<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using VAAPI profile
VAProfileHEVCMain (17).<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using VAAPI entrypoint
VAEntrypointEncSliceLP (8).<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using VAAPI render target format
YUV420 (0x1).<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using CTU size 64x64, min CB size
8x8.<br>
[hevc_vaapi @ 0x7f90803a3cc0] Driver supports RC modes CQP, CBR,
VBR, ICQ, QVBR.<br>
[hevc_vaapi @ 0x7f90803a3cc0] No quality level set; using default
(25).<br>
[hevc_vaapi @ 0x7f90803a3cc0] RC mode: ICQ.<br>
[hevc_vaapi @ 0x7f90803a3cc0] Block Level bitrate control: OFF.<br>
[hevc_vaapi @ 0x7f90803a3cc0] RC quality: 25.<br>
[hevc_vaapi @ 0x7f90803a3cc0] RC framerate: 25/1 (25.00 fps).<br>
[hevc_vaapi @ 0x7f90803a3cc0] Driver does not support P-frames,
replacing them with B-frames.<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using intra and B-frames (supported
references: 3 / 3).<br>
[hevc_vaapi @ 0x7f90803a3cc0] All wanted packed headers available
(wanted 0xd, found 0x1f).<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using nv12 as format of
reconstructed frames.<br>
[AVHWFramesContext @ 0x7f908030aac0] Created surface 0x1.<br>
[AVHWFramesContext @ 0x7f908030aac0] Direct mapping possible.<br>
[hevc_vaapi @ 0x7f90803a3cc0] Using level 3.<br>
[SWR @ 0x7f908036d040] Using fltp internally between filters<br>
Transform tree:<br>
mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]:
[2, any], flags: [unaligned, out_of_place, fwd_only]<br>
fft_sr_ns_float_avx2 - type: fft_float, len: 512, factor:
2, flags: [aligned, inplace, out_of_place, preshuf]<br>
Transform tree:<br>
mdct_fwd_float_c - type: mdct_float, len: 128, factors[2]: [2,
any], flags: [unaligned, out_of_place, fwd_only]<br>
fft_sr_ns_float_avx2 - type: fft_float, len: 64, factor:
2, flags: [aligned, inplace, out_of_place, preshuf]<br>
Render::render_single: Session finished.<br>
** rendered 2832 frames in 4.068 secs, 696.165 fps<br>
audio0 pad 32 0 (32)<br>
Total excess of backups: -50 <br>
Session time: 0:11:48<br>
Cpu time: user: 0:00:26.120 sys: 0:00:06.087<br>
<br>
-----------<br>
ffprobe -hide_banner dv01_07_hevc_vaapi.mp4<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dv01_07_hevc_vaapi.mp4':<br>
Metadata:<br>
major_brand : isom<br>
minor_version : 512<br>
compatible_brands: isomiso2mp41<br>
encoder : Lavf61.1.100<br>
Duration: 00:01:53.28, start: 0.000000, bitrate: 6237 kb/s<br>
Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568),
yuv420p(tv, bt470bg/unknown/unknown), 720x576 [SAR 16:15 DAR 4:3],
6103 kb/s, 25 fps, 25 tbr, 12800 tbn (default)<br>
Metadata:<br>
handler_name : VideoHandler<br>
vendor_id : [0][0][0][0]<br>
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 128 kb/s (default)<br>
Metadata:<br>
handler_name : SoundHandler<br>
vendor_id : [0][0][0][0]<br>
<br>
<br>
2)<br>
HDV --> VAAPI HEVC<br>
..........<br>
[AVHWDeviceContext @ 0x7fe48c030680] Trying to use DRM render node
for device 0.<br>
[AVHWDeviceContext @ 0x7fe48c030680] libva: VA-API version 1.22.0<br>
[AVHWDeviceContext @ 0x7fe48c030680] libva: Trying to open
/usr/lib64/dri/iHD_drv_video.so<br>
[AVHWDeviceContext @ 0x7fe48c030680] libva: Found init function
__vaDriverInit_1_22<br>
[AVHWDeviceContext @ 0x7fe48c030680] libva: va_openDriver()
returns 0<br>
[AVHWDeviceContext @ 0x7fe48c030680] Initialised VAAPI connection:
version 1.22<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x41524742 -> bgra.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x41424752 -> rgba.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x58524742 -> bgr0.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x58424752 -> rgb0.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30335241 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30334241 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30335258 ->
x2rgb10le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30334258 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x36314752 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x56555941 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x56555958 -> vuyx.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30303859 -> gray.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x3231564e -> nv12.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x3132564e ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x32595559 ->
yuyv422.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x59565955 ->
uyvy422.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x32315659 ->
yuv420p.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30323449 ->
yuv420p.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x50313134 ->
yuv411p.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x48323234 ->
yuv422p.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x56323234 ->
yuv440p.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x50343434 ->
yuv444p.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x33434d49 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30313050 ->
p010le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x32313050 ->
p012le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x36313050 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30313259 ->
y210le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x32313259 ->
y212le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x36313259 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x30313459 ->
xv30le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x32313459 ->
xv36le.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x36313459 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x50424752 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] Format 0x50524742 ->
unknown.<br>
[AVHWDeviceContext @ 0x7fe48c030680] VAAPI driver: Intel iHD
driver for Intel(R) Gen Graphics - 24.3.4 ().<br>
[AVHWDeviceContext @ 0x7fe48c030680] Driver not found in known
nonstandard list, using standard behaviour.<br>
[AVHWFramesContext @ 0x7fe48c84c240] Created surface 0.<br>
[AVHWFramesContext @ 0x7fe48c84c240] Direct mapping possible.<br>
[hevc_vaapi @ 0x7fe48c039a40] Input surface format is nv12.<br>
[hevc_vaapi @ 0x7fe48c039a40] Using VAAPI profile
VAProfileHEVCMain (17).<br>
[hevc_vaapi @ 0x7fe48c039a40] Using VAAPI entrypoint
VAEntrypointEncSliceLP (8).<br>
[hevc_vaapi @ 0x7fe48c039a40] Using VAAPI render target format
YUV420 (0x1).<br>
[hevc_vaapi @ 0x7fe48c039a40] Using CTU size 64x64, min CB size
8x8.<br>
[hevc_vaapi @ 0x7fe48c039a40] Driver supports RC modes CQP, CBR,
VBR, ICQ, QVBR.<br>
[hevc_vaapi @ 0x7fe48c039a40] No quality level set; using default
(25).<br>
[hevc_vaapi @ 0x7fe48c039a40] RC mode: ICQ.<br>
[hevc_vaapi @ 0x7fe48c039a40] Block Level bitrate control: OFF.<br>
[hevc_vaapi @ 0x7fe48c039a40] RC quality: 25.<br>
[hevc_vaapi @ 0x7fe48c039a40] RC framerate: 25/1 (25.00 fps).<br>
[hevc_vaapi @ 0x7fe48c039a40] Driver does not support P-frames,
replacing them with B-frames.<br>
[hevc_vaapi @ 0x7fe48c039a40] Using intra and B-frames (supported
references: 3 / 3).<br>
[hevc_vaapi @ 0x7fe48c039a40] All wanted packed headers available
(wanted 0xd, found 0x1f).<br>
[hevc_vaapi @ 0x7fe48c039a40] Using nv12 as format of
reconstructed frames.<br>
[AVHWFramesContext @ 0x7fe48c84c300] Created surface 0x1.<br>
[AVHWFramesContext @ 0x7fe48c84c300] Direct mapping possible.<br>
[hevc_vaapi @ 0x7fe48c039a40] Using level 4.<br>
[SWR @ 0x7fe48d78ddc0] Using fltp internally between filters<br>
Transform tree:<br>
mdct_fwd_float_c - type: mdct_float, len: 1024, factors[2]:
[2, any], flags: [unaligned, out_of_place, fwd_only]<br>
fft_sr_ns_float_avx2 - type: fft_float, len: 512, factor:
2, flags: [aligned, inplace, out_of_place, preshuf]<br>
Transform tree:<br>
mdct_fwd_float_c - type: mdct_float, len: 128, factors[2]: [2,
any], flags: [unaligned, out_of_place, fwd_only]<br>
fft_sr_ns_float_avx2 - type: fft_float, len: 64, factor:
2, flags: [aligned, inplace, out_of_place, preshuf]<br>
Render::render_single: Session finished.<br>
** rendered 5972 frames in 24.335 secs, 245.408 fps<br>
audio0 pad 64 0 (64)<br>
Total excess of backups: -50 <br>
Session time: 0:32:22<br>
Cpu time: user: 0:01:19.691 sys: 0:00:12.896<br>
<br>
-----------<br>
<br>
ffprobe -hide_banner hdv09_04_hevc_vaapi.mp4<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_hevc_vaapi.mp4':<br>
Metadata:<br>
major_brand : isom<br>
minor_version : 512<br>
compatible_brands: isomiso2mp41<br>
encoder : Lavf61.1.100<br>
Duration: 00:03:58.88, start: 0.000000, bitrate: 11715 kb/s<br>
Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568),
yuv420p(tv, bt470bg/unknown/unknown, top coded first (swapped)),
1440x1080 [SAR 4:3 DAR 16:9], 11580 kb/s, 25 fps, 25 tbr, 12800
tbn (default)<br>
Metadata:<br>
handler_name : VideoHandler<br>
vendor_id : [0][0][0][0]<br>
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 129 kb/s (default)<br>
Metadata:<br>
handler_name : SoundHandler<br>
vendor_id : [0][0][0][0]<br>
<br>
<br>
<br>
<br>
<br>
</font><br>
<br>
</body>
</html>