<!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 27.11.2024 23:40, skrev Andrew
Randrianasulu:<br>
</div>
<blockquote type="cite"
cite="mid:CA+rFky7+KqhVKLbPL_AUm5AcZ8b_--qbA2pnBpNw6Gk8yRy=uA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">чт, 28 нояб. 2024 г.,
01:22 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> In August this year we had a thread "h264 vulkan
encoding" initiated by Andrea<br>
<a
href="https://lists.cinelerra-gg.org/pipermail/cin/2024-August/008517.html"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.cinelerra-gg.org/pipermail/cin/2024-August/008517.html</a><br>
<br>
Mesa 24.3 is released with many Vulkan Driver
Improvement, and implementations are expected around the
corner in rolling distributions.<br>
<br>
Some articles about this in Phoronix<br>
<a
href="https://www.phoronix.com/news/Mesa-24.3-Released" target="_blank"
rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.phoronix.com/news/Mesa-24.3-Released</a><br>
<a href="https://www.phoronix.com/news/Mesa-24.3-rc2"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.phoronix.com/news/Mesa-24.3-rc2</a><br>
<a
href="https://www.phoronix.com/news/Mesa-24.3-rc1-Released"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.phoronix.com/news/Mesa-24.3-rc1-Released</a><br>
<a
href="https://www.phoronix.com/news/Intel-Vulkan-Video-H264-H265"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.phoronix.com/news/Intel-Vulkan-Video-H264-H265</a><br>
<br>
With ffmpeg (7.1) h264/5 vulkan encoder support, I
wonder if Cingg is ready to put them into use?<br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg
-hide_banner -encoders | grep vulkan<br>
V....D h264_vulkan H.264/AVC (Vulkan) (codec
h264)<br>
V....D hevc_vulkan H.265/HEVC (Vulkan)
(codec hevc)<br>
</font></div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">you can try already (on system's ffmpeg), can't
you?</div>
<div dir="auto"><br>
</div>
<br>
</div>
</blockquote>
<font face="Courier New, Courier, monospace"><br>
I have tried ffmpeg 7.1 with Mesa 24.3.0 (Slowroll) and with Mesa
24.3.1 (Tumbleweed), but I have yet to find a command line that
work for vulkan endcoding. <br>
<br>
export ANV_VIDEO_DECODE=1<br>
export ANV_VIDEO_ENCODE=1<br>
<br>
vulkaninfo | grep VK_KHR_video<br>
VK_KHR_video_decode_h264 : extension
revision 9<br>
VK_KHR_video_decode_h265 : extension
revision 8<br>
VK_KHR_video_decode_queue : extension
revision 8<br>
VK_KHR_video_encode_h264 : extension
revision 14<br>
VK_KHR_video_encode_h265 : extension
revision 14<br>
VK_KHR_video_encode_queue : extension
revision 12<br>
VK_KHR_video_maintenance1 : extension
revision 1<br>
VK_KHR_video_queue : extension
revision 8<br>
<br>
---------------<br>
<br>
ffmpeg -hide_banner -init_hw_device vulkan -i hdv09_04.m2t -vf
format=nv12,hwupload -c:v hevc_vulkan -y
hdv09_04_hevc_vulkan_nv12.mp4<br>
[mpeg2video @ 0x55dc42008980] Invalid frame dimensions 0x0.<br>
Last message repeated 3 times<br>
[mpegts @ 0x55dc41fff300] PES packet size mismatch<br>
[mpegts @ 0x55dc41fff300] Packet corrupt (stream = 1, dts =
258142320).<br>
[mpegts @ 0x55dc41fff300] Could not find codec parameters for
stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
[mpegts @ 0x55dc41fff300] Could not find codec parameters for
stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
Input #0, mpegts, from 'hdv09_04.m2t':<br>
Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s<br>
Program 100 <br>
Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] /
0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR
16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn<br>
Side data:<br>
cpb: bitrate max/min/avg: 25000000/0/0 buffer size:
7340032 vbv_delay: N/A<br>
Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] /
0x0003), 48000 Hz, stereo, fltp, 384 kb/s<br>
Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)<br>
Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (mpeg2video (native) -> hevc
(hevc_vulkan))<br>
Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))<br>
Press [q] to stop, [?] for help<br>
[hevc_vulkan @ 0x55dc420090c0] No rate control settings specified,
using fixed QP = 18<br>
Output #0, mp4, to 'hdv09_04_hevc_vulkan_nv12.mp4':<br>
Metadata:<br>
encoder : Lavf61.7.100<br>
Stream #0:0: Video: hevc (Main) (hev1 / 0x31766568), vulkan(tv,
bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9],
q=2-31, 25 fps, 12800 tbn<br>
Metadata:<br>
encoder : Lavc61.19.100 hevc_vulkan<br>
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s<br>
Metadata:<br>
encoder : Lavc61.19.100 aac<br>
[hevc_vulkan @ 0x55dc420090c0] Unable to perform query:
VK_ERROR_DEVICE_LOST!<br>
[hevc_vulkan @ 0x55dc420090c0] Output failed: -542398533.<br>
[vost#0:0/hevc_vulkan @ 0x55dc420ee800] Error submitting video
frame to the encoder<br>
[vost#0:0/hevc_vulkan @ 0x55dc420ee800] Error encoding a frame:
Generic error in an external library<br>
[vost#0:0/hevc_vulkan @ 0x55dc420ee800] Task finished with error
code: -542398533 (Generic error in an external library)<br>
Unable to submit command buffer: VK_ERROR_DEVICE_LOST<br>
[vost#0:0/hevc_vulkan @ 0x55dc420ee800] Terminating thread with
return code -542398533 (Generic error in an external library)<br>
[hwupload @ 0x7fd45c004540] Failed to upload frame: -542398533.<br>
[vf#0:0 @ 0x55dc41fddc80] Error while filtering: Generic error in
an external library<br>
[vf#0:0 @ 0x55dc41fddc80] Task finished with error code:
-542398533 (Generic error in an external library)<br>
[vf#0:0 @ 0x55dc41fddc80] Terminating thread with return code
-542398533 (Generic error in an external library)<br>
[out#0/mp4 @ 0x55dc41fb8180] video:0KiB audio:494KiB subtitle:0KiB
other streams:0KiB global headers:0KiB muxing overhead: 1.327457%<br>
frame= 0 fps=0.0 q=0.0 Lsize= 500KiB time=N/A bitrate=N/A
speed=N/A <br>
[aac @ 0x55dc4201b000] Qavg: 414.312<br>
Conversion failed!<br>
--------------------------<br>
<br>
ffmpeg -hide_banner -init_hw_device vulkan -i hdv09_04.m2t -vf
format=nv12,hwupload -c:v h264_vulkan -y
hdv09_04_h264_vulkan_nv12.mp4<br>
[mpeg2video @ 0x559168e71440] Invalid frame dimensions 0x0.<br>
Last message repeated 3 times<br>
[mpegts @ 0x559168e68200] PES packet size mismatch<br>
[mpegts @ 0x559168e68200] Packet corrupt (stream = 1, dts =
258142320).<br>
[mpegts @ 0x559168e68200] Could not find codec parameters for
stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
[mpegts @ 0x559168e68200] Could not find codec parameters for
stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
Input #0, mpegts, from 'hdv09_04.m2t':<br>
Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s<br>
Program 100 <br>
Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] /
0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR
16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn<br>
Side data:<br>
cpb: bitrate max/min/avg: 25000000/0/0 buffer size:
7340032 vbv_delay: N/A<br>
Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] /
0x0003), 48000 Hz, stereo, fltp, 384 kb/s<br>
Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)<br>
Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264
(h264_vulkan))<br>
Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))<br>
Press [q] to stop, [?] for help<br>
[h264_vulkan @ 0x559168e71b80] No rate control settings specified,
using fixed QP = 18<br>
Output #0, mp4, to 'hdv09_04_h264_vulkan_nv12.mp4':<br>
Metadata:<br>
encoder : Lavf61.7.100<br>
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), vulkan(tv,
bt709, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9],
q=2-31, 25 fps, 12800 tbn<br>
Metadata:<br>
encoder : Lavc61.19.100 h264_vulkan<br>
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s<br>
Metadata:<br>
encoder : Lavc61.19.100 aac<br>
[h264_vulkan @ 0x559168e71b80] Unable to perform query:
VK_ERROR_DEVICE_LOST!<br>
[h264_vulkan @ 0x559168e71b80] Output failed: -542398533.<br>
[vost#0:0/h264_vulkan @ 0x559168f84880] Error submitting video
frame to the encoder<br>
Unable to submit command buffer: VK_ERROR_DEVICE_LOST<br>
[vost#0:0/h264_vulkan @ 0x559168f84880] Error encoding a frame:
Generic error in an external library<br>
[vost#0:0/h264_vulkan @ 0x559168f84880] Task finished with error
code: -542398533 (Generic error in an external library)<br>
[hwupload @ 0x7f421c004540] Failed to upload frame: -542398533.<br>
[vost#0:0/h264_vulkan @ 0x559168f84880] Terminating thread with
return code -542398533 (Generic error in an external library)<br>
[vf#0:0 @ 0x559168e1fcc0] Error while filtering: Generic error in
an external library<br>
[vf#0:0 @ 0x559168e1fcc0] Task finished with error code:
-542398533 (Generic error in an external library)<br>
[vf#0:0 @ 0x559168e1fcc0] Terminating thread with return code
-542398533 (Generic error in an external library)<br>
[out#0/mp4 @ 0x559168e1c580] video:0KiB audio:54KiB subtitle:0KiB
other streams:0KiB global headers:0KiB muxing overhead: 2.695310%<br>
frame= 0 fps=0.0 q=0.0 Lsize= 55KiB time=N/A bitrate=N/A
speed=N/A <br>
[aac @ 0x559168e83e00] Qavg: 186.490<br>
Conversion failed!<br>
<br>
<br>
<br>
<br>
</font>
</body>
</html>