On 03/03/2026 19:05, Andrew Randrianasulu wrote:
On Tue, Mar 3, 2026 at 8:56 PM Terje J. Hanssen via Cin
<cin@lists.cinelerra-gg.org> wrote:
I wonder if "Settings|Preferences|Performance|Use HW Device" is meant to set both gpu accelerated decoding and encoding (rendering)?
No, it for decoding only, encoding controlled  by preset. (I briefly
tied two in one of my experimental patchsets, but decided not to do
this, because I like flexibility and my GPU does not support full
Vulkan pipeline anyway)


and how does this possibly interact/work with selecting video preset, compression hwaccel methods or not?


Use HW Device has available 5 options: none, vaapi, vdpau, cuda, vulkan, while qsv is missing, reason?
Because this is not hwaccel device in sense you can't just call codec
with this decode method set, you need to pick specific codec name at
decoding.

Yes, for for ffmpeg complex transcoding with filters, and for multi-gpu intialization hw and defining a qsv_device

Yet, my system ffmpeg lists qsv among hwaccel methods.

For plain, high-speed transcoding and single gpu, also this simple ffmpeg code apparently works for me
:

ffmpeg -hide_banner -i hdv09_04.m2t -c:v av1_qsv hdv09_04_ffmpeg_av1_qsv.mp4
...........
[out#0/mp4 @ 0x55728d6db780] video:44686KiB audio:3774KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.249561%
frame= 5963 fps=631 q=-0.0 Lsize=   48580KiB time=00:03:58.77 bitrate=1666.7kbits/s speed=25.3x elapsed=0:00:09.45    
[aac @ 0x55728d50be80] Qavg: 488.382


745M    hdv09_04.m2t
48M    hdv09_04_ffmpeg_av1_qsv.mp4

48M    hdv09-04_cin_av1_qsv_8b420.mp4

I can add this kind of decoding in similar way mediacodec decoding
works, if you can test that.


I ran two av1_qsv rendering tests on Intel AlderLake/DG2 Using HW Device: None and vaapi respectively to exemplify this

using the latest Cinelerra Infinity - built: Mar  1 2026 06:30:41


1) Settings|Preferences|Performance|Use HW Device: None

file: hdv09_04.m2t

compression
av1_qsv_8b420.mp4
# Requires specific GPU hardware encoding capability
#  as well as required software implementation.
cin_pix_fmt=nv12
profile=main
# global_quality=25

libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0

Render::render_single: Session finished.
** rendered 5972 frames in 18.274 secs, 326.803 fps
audio0 pad 64 0 (64)

Fast and adequate quality/colors, although global quality may increase it somewhat.


2) Settings|Preferences|Performance|Use HW Device: vaapi (just to test)

file: hdv09_04.m2t

compression
av1_qsv_8b420.mp4
# Requires specific GPU hardware encoding capability
#  as well as required software implementation.
cin_pix_fmt=nv12
profile=main
# global_quality=25

libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0

int FFVideoConvert::convert_picture_vframe(VFrame*, AVFrame*, AVFrame*):
Error retrieving data from GPU to CPU
file: /Videoklipp/AV1/hdv09_04.m2t
int FFVideoConvert::convert_picture_vframe(VFrame*, AVFrame*, AVFrame*):
Error retrieving data from GPU to CPU
file: /Videoklipp/AV1/hdv09_04.m2t
int FFVideoConvert::convert_picture_vframe(VFrame*, AVFrame*, AVFrame*):
Error retrieving data from GPU to CPU
Hm, strange. Does this behave the same on other input files (h264,
hevc, vp9 ..) ?

I tried also a h264 input file and got a similar error with hybrid transcoding:

Render::render_single: Session finished.
** rendered 10457 frames in 14.724 secs, 710.201 fps
audio0 pad 128 0 (128)
Decoder libdav1d does not support device type vaapi.
HW device init failed, using SW decode.
file:/Videoklipp/QSV/hdv_movie_h264_qsv_cin_av1_qsv_8b420.mp4
  err: Operation not permitted
Decoder libdav1d does not support device type vaapi.
HW device init failed, using SW decode.
file:/Videoklipp/QSV/hdv_movie_h264_qsv_cin_av1_qsv_8b420.mp4
  err: Operation not permitted
Total excess of backups: -50 
Session time: 0:06:00
Cpu time: user: 0:00:26.413 sys: 0:00:03.644




file: /Videoklipp/AV1/hdv09_04.m2t
Render::render_single: Session finished.
** rendered 5972 frames in 33.049 secs, 180.701 fps
audio0 pad 64 0 (64)

Decoder libdav1d does not support device type vaapi.
HW device init failed, using SW decode.
file:/Videoklipp/QSV/hdv09-04_cin_av1_qsv_8b420.mp4
  err: Operation not permitted
Decoder libdav1d does not support device type vaapi.
HW device init failed, using SW decode.
file:/Videoklipp/QSV/hdv09-04_cin_av1_qsv_8b420.mp4
  err: Operation not permitted
Total excess of backups: -50
Session time: 0:22:43
Cpu time: user: 0:01:24.375 sys: 0:00:14.084
unjoined tids / owner 3
  00007f88517ff6c0 / 00007f88d16b96c0 12RenderEngine
  00007f886b7fe6c0 / 00007f88d16b96c0 12RenderEngine
  00007f88797fa6c0 / 00007f88d16b96c0 12RenderEngine


_______________________________________________
Cin mailing list -- cin@lists.cinelerra-gg.org
To unsubscribe send an email to cin-leave@lists.cinelerra-gg.org