<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <div class="moz-cite-prefix">Den 28.11.2024 00:00, skrev Terje J.
      Hanssen:<br>
    </div>
    <blockquote type="cite"
      cite="mid:380bb2db-1e86-4393-b763-d6eb82a39d9e@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <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>
      </blockquote>
      <br>
      Not Mesa 24.3 and vulkan encoding quite yet:<br>
      <font face="Courier New, Courier, monospace"><br>
        API: OpenGL v: 4.6 vendor: intel mesa v: 24.2.7 renderer: Mesa
        Intel Arc<br>
            A750 Graphics (DG2)<br>
          API: Vulkan v: 1.3.296 drivers: N/A surfaces: xcb,xlib<br>
          API: EGL Message: EGL data requires eglinfo. Check
        --recommends.<br>
        <br>
        <br>
        # export ANV_VIDEO_DECODE=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_queue                 <br>
      </font><br>
      So assume the FFmpeg benchmarks sample was vulkan decoding only, 
      as they work for hdv (mpeg2) input also:<br>
      <br>
      ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
      -hwaccel_output_format vulkan -i hdv09_04.m2t -f null - -benchmark<br>
      frame= 5963 fps=3503 q=-0.0 Lsize=N/A time=00:03:58.77 bitrate=N/A
      speed= 140x    <br>
      bench: utime=19.045s stime=0.313s rtime=1.702s<br>
      <br>
      ffmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
      -hwaccel_output_format vulkan -i hdv09_04_h264_qsv.mp4 -f null -
      -benchmark<br>
      frame= 5969 fps=988 q=-0.0 Lsize=N/A time=00:03:58.76 bitrate=N/A
      speed=39.5x    <br>
      bench: utime=1.397s stime=1.390s rtime=6.042s<br>
      bench: maxrss=164700KiB<br>
      <br>
      fmpeg -hide_banner -init_hw_device "vulkan=vk:0" -hwaccel vulkan
      -hwaccel_output_format vulkan -i hdv09_04_hevc_qsv_8b420.mp4 -f
      null - -benchmark<br>
      frame=  248 fps=2.0 q=-0.0 size=N/A time=00:00:09.92 bitrate=N/A
      speed=0.0787x <br>
      hevc terrible slow !!<br>
      <br>
    </blockquote>
    And I found a sample encoding on reddit, which failed as assumed for
    me as follows (similar for h264_vulkan):<br>
    <br>
    ffmpeg -init_hw_device vulkan=vkdev:0 -filter_hw_device vkdev -i
    hdv09_04.m2t -filter:v "format=nv12,hwupload" -c:v h264_vulkan
    hdv09_04_h264_vulkan_8b420.mp4<br>
    <br>
    <font face="monospace">ffmpeg version 7.1 Copyright (c) 2000-2024
      the FFmpeg developers<br>
        built with gcc 14 (SUSE Linux)<br>
        configuration: --prefix=/usr --libdir=/usr/lib64
      --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg
      --extra-cflags='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
      -fstack-protector-strong -funwind-tables
      -fasynchronous-unwind-tables -fstack-clash-protection
      -Werror=return-type -flto=auto -ffat-lto-objects -g'
      --optflags='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
      -fstack-protector-strong -funwind-tables
      -fasynchronous-unwind-tables -fstack-clash-protection
      -Werror=return-type -flto=auto -ffat-lto-objects -g'
      --disable-htmlpages --enable-pic --disable-stripping
      --enable-shared --disable-static --enable-gpl --enable-version3
      --enable-libsmbclient --disable-openssl --enable-gnutls
      --enable-ladspa --enable-libshaderc --enable-vulkan
      ......................<br>
      ..........<br>
      [hevc_vulkan @ 0x55c32f8df6c0] Device does not support the
      VK_KHR_video_encode_queue extension!<br>
      [vost#0:0/hevc_vulkan @ 0x55c32fa0cf00] Error while opening
      encoder - maybe incorrect parameters such as bit_rate, rate, width
      or height.<br>
      [vf#0:0 @ 0x55c32f8adcc0] Error sending frames to consumers:
      Function not implemented<br>
      [vf#0:0 @ 0x55c32f8adcc0] Task finished with error code: -38
      (Function not implemented)<br>
      [vf#0:0 @ 0x55c32f8adcc0] Terminating thread with return code -38
      (Function not implemented)<br>
      [vost#0:0/hevc_vulkan @ 0x55c32fa0cf00] Could not open encoder
      before EOF<br>
      [vost#0:0/hevc_vulkan @ 0x55c32fa0cf00] Task finished with error
      code: -22 (Invalid argument)<br>
      [vost#0:0/hevc_vulkan @ 0x55c32fa0cf00] Terminating thread with
      return code -22 (Invalid argument)<br>
      [out#0/mp4 @ 0x55c32f8b2c80] Nothing was written into output file,
      because at least one of its streams received no packets.<br>
      frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A
      speed=N/A    <br>
      [aac @ 0x55c32f90c640] Qavg: 441.163<br>
      Conversion failed!</font><br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>