<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<br>
<div class="moz-cite-prefix">Den 20.12.2024 17:27, skrev Андрей
Спицын via Cin:<br>
</div>
<blockquote type="cite"
cite="mid:CAEHHY6L+2CLY62NnEQ7Mit5Ohr6qxBDERNTC3YYczJg1VuAECg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div>><span style="font-size:12.8px">Cingg then should
supports NVENC via some dynamic linked external Nvidia lib</span></div>
<div><br>
</div>
<div dir="auto">Nvenc supported in ffmpeg, but you need to add
nvidia headers and add a flag during ffmpeg configuration
step.</div>
<div dir="auto"><br>
</div>
<div dir="auto">The friend of mine tested davinci and ffmpeg
encoding on nvidia card on windows. The davinci is 7 times
faster compared to ffmpeg. In both cases nvenc is used and
card used by 100%. I don't know the reason of this.</div>
</div>
</div>
</blockquote>
<br>
Not sure why h264_nvenc works and not h265_nvenc in Cingg.<br>
<br>
Quality/speed may differ with different profiles/presets in use,
though 7x was much<br>
.<br>
<br>
<blockquote type="cite"
cite="mid:CAEHHY6L+2CLY62NnEQ7Mit5Ohr6qxBDERNTC3YYczJg1VuAECg@mail.gmail.com">
<div dir="auto">
<div>
<div data-smartmail="gmail_signature"><br>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">пт, 20 дек. 2024 г., 19:20
Terje J. Hanssen via Cin <<a
href="mailto:cin@lists.cinelerra-gg.org"
moz-do-not-send="true" class="moz-txt-link-freetext">cin@lists.cinelerra-gg.org</a>>:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> Continued and extracted from <br>
[Cin] Video accelerators support, builds and use<br>
<a
href="https://lists.cinelerra-gg.org/pipermail/cin/2024-December/009226.html"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.cinelerra-gg.org/pipermail/cin/2024-December/009226.html</a><br>
<br>
<div>Den 12.12.2024 00:54, skrev Terje J. Hanssen:<br>
</div>
<blockquote type="cite"> <br>
<div>Den 11.12.2024 23:56, skrev Andrew Randrianasulu:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">чт, 12 дек.
2024 г., 00:43 Terje J. Hanssen via Cin <<a
href="mailto:cin@lists.cinelerra-gg.org"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">cin@lists.cinelerra-gg.org</a>>:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> To clarify some pieces once again, I
put up some basic statements or questions:<br>
<br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</blockquote>
..........snip<br>
<blockquote type="cite">
<blockquote type="cite">
<div dir="auto">
<div>
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> <br>
So what happened when adding
oneVPL (qsv) support to the build
system; dynamic linked to system
or static added embedded into the
build?<br>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">dynamic</div>
<div dir="auto"><br>
</div>
.....snip
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> Could in principle similar
methods be extended to include
broader video acceleration support
for AMD/amf and NVIDIA/nvenc?<br>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">nvenc already supported, I
think? At some point I tried it with
GF710 on livedvd and it was working for
me. try to test it if you have
proprietary nvidia drivers.</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</blockquote>
<br>
Apparently Cingg then should supports NVENC via some
dynamic linked external Nvidia lib, equivalent to what
we did for for QSV via oneVPL support.<br>
While h264_nvenc.mp4 rendering works, h265_nvenc.mp4
fails with the following errors, see detail below:<br>
<br>
<font face="Courier New, Courier, monospace">[hevc_nvenc
@ 0x7ff79c015640] No capable devices found<br>
FFMPEG::open_encoder err: Generic error in an
external library</font><br>
<br>
<br>
<blockquote type="cite"><br>
Yes, seemingly:<br>
Cin/bin/ffmpeg/video> ls *nvenc*<br>
h264_nvenc.mp4 h264_nvenc.qt h265_nvenc.mp4<br>
</blockquote>
<br>
NVENC Presets<br>
<br>
<font face="Courier New, Courier, monospace">cat
h264_nvenc.mp4<br>
mp4 h264_nvenc<br>
# encode for nvidia graphics hw only<br>
preset medium<br>
profile main<br>
<br>
cat h265_nvenc.mp4<br>
mp4 hevc_nvenc<br>
# encode for nvidia graphics hw only<br>
preset medium<br>
profile main</font><br>
<br>
<blockquote type="cite"> <br>
Maybe I can do an attempt later, if I get life in the
old GeForce GTX 960 in my Skylake workstation.<br>
<br>
</blockquote>
<br>
Setup<br>
----------<br>
Booted BIOS and checked that the integrated Intel gpu
and multimonitor setup were enabled. <br>
Installed the suse-prime package for <font
face="Courier New, Courier, monospace">nvidia/intel
gpu selection (for NVIDIA optimus laptops with
bbswitch support) and could then run the command<br>
<br>
prime-select on-demand<br>
<br>
and verified that both the Intel and Nvidia drivers
were available<br>
<br>
inxi -G<br>
Graphics:<br>
Device-1: Intel HD Graphics 530 driver: i915 v:
kernel<br>
Device-2: NVIDIA GM206 [GeForce GTX 960] driver:
nvidia v: 550.135<br>
Display: wayland server: X.org v: 1.21.1.14 with:
Xwayland v: 24.1.4<br>
compositor: gnome-shell v: 47.2 driver: X: loaded:
modesetting,nvidia<br>
unloaded: fbdev,vesa dri: iris gpu: i915
resolution: 1920x1080~60Hz<br>
API: OpenGL v: 4.6 vendor: intel mesa v: 24.3.1
renderer: Mesa Intel HD<br>
Graphics 530 (SKL GT2)<br>
API: EGL Message: EGL data requires eglinfo. Check
--recommends.<br>
<br>
==============<br>
<br>
<br>
Test h264_nvenc.mp4<br>
-------------------<br>
OK<br>
<br>
./CinGG-20241120-x86_64.AppImage<br>
Cinelerra Infinity - built: Nov 20 2024 22:06:05<br>
<br>
Loads hdv09_04.m27<br>
Shift-R<br>
mp4<br>
h264_nvenc (video preset)<br>
pixels: yuv420p (default)<br>
<br>
** rendered 5972 frames in 27.391 secs, 218.028 fps<br>
<br>
ffprobe -hide_banner hdv09_04_h264_nvenc_yuv420p.mp4<br>
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 /
0x31637661), yuvj420p(pc, smpte170m/unknown/unknown),
1440x1080 [SAR 4:3 DAR 16:9], 2156 kb/s, 25 fps, 25
tbr, 12800 tbn (default)<br>
<br>
-------<br>
<br>
Tried also h264_nvenc with<br>
pixels: nv12<br>
which for slowed down to 45% speed !?<br>
<br>
Render::render_single: Session finished.<br>
** rendered 5972 frames in 60.368 secs, 98.927 fps<br>
<br>
ffprobe -hide_banner hdv09_04_h264_nvenc_nv12.mp4<br>
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 /
0x31637661), yuvj420p(pc, smpte170m/unknown/unknown),
1440x1080 [SAR 4:3 DAR 16:9], 2154 kb/s, 25 fps, 25
tbr, 12800 tbn (default)<br>
<br>
===================<br>
<br>
Test h265_nvenc.mp4<br>
-------------------<br>
<br>
Did not render, neither with pixels yuv420p nor nv12:<br>
</font><font face="Courier New, Courier, monospace">FFMPEG::open_encoder
err: Generic error in an external library</font><br>
<font face="Courier New, Courier, monospace"><br>
[hevc_nvenc @ 0x7ff79c015640] No capable devices found<br>
FFMPEG::open_encoder err: Generic error in an
external library<br>
int FFMPEG::open_encoder(const char*, const char*):<br>
open failed
hevc_nvenc:/run/media/terje/video/hdv09_04_h265_nvenc_yuv420p.mp4<br>
Render::render_single: Session finished.<br>
<br>
===================<br>
<br>
GeForce GTX 960 (GM206) should be capable to manage
NVENC h265/hevc YUV 420 encoding<br>
<a
href="https://en.wikipedia.org/wiki/Nvidia_NVENC#Third_generation,_Maxwell_GM20x"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://en.wikipedia.org/wiki/Nvidia_NVENC#Third_generation,_Maxwell_GM20x</a><br>
<a
href="https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new</a><br>
<br>
Tested hevc_nvenc full transcoding with FFmpeg 7.1<br>
<br>
ffmpeg -hide_banner -hwaccel cuda
-hwaccel_output_format cuda -i hdv09_04.m2t -c:v
hevc_nvenc hdv09_04_ff_hevc_nvenc.mp4<br>
<br>
frame= 5963 fps=270 q=34.0 Lsize= 64316KiB
time=00:03:58.77 bitrate=2206.6kbits/s speed=10.8x
<br>
[aac @ 0x55a38d4c4d40] Qavg: 488.890<br>
<br>
------------------<br>
<br>
ffprobe -hide_banner hdv09_04_ff_hevc_nvenc.mp4<br>
Stream #0:0[0x1](und): Video: hevc (Main) (hev1 /
0x31766568), yuv420p(tv, bt709, top coded first
(swapped)), 1440x1080 [SAR 4:3 DAR 16:9], 2074 kb/s,
24.99 fps, 25 tbr, 12800 tbn (default)<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font> </div>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org"
target="_blank" rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">Cin@lists.cinelerra-gg.org</a><br>
<a
href="https://lists.cinelerra-gg.org/mailman/listinfo/cin"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<br>
</body>
</html>