Announcement

Collapse
No announcement yet.

RADV Enables Vulkan Video By Default For RDNA3 / VCN4 GPUs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RADV Enables Vulkan Video By Default For RDNA3 / VCN4 GPUs

    Phoronix: RADV Enables Vulkan Video By Default For RDNA3 / VCN4 GPUs

    With Mesa's RADV driver supporting Vulkan Video for accelerated video encode/decode using this cross-platform, industry standard API it hasn't been exposed by default for RDNA3 graphics processors bearing VCN4 IP. That has now changed for Mesa 24.3 when using the latest VCN4 firmware...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    The RDNA2 support remains off by default and there is no word from AMD yet when they may be providing updated firmware for the video events compatibility. Otherwise the support can be enabled via the RADV_PERFTEST=video_decode and RADV_PERFTEST=video_encode environment variables manually.​
    Speaking as a RDNA2 owner, what are these "video events" that are not yet enabled for my hardware? What would they do if they were enabled?

    I have tried setting RADV_PERFTEST=video_decode, and vulkaninfo shows me:
    Code:
    VK_KHR_video_decode_av1 : extension revision 1
    VK_KHR_video_decode_h264 : extension revision 9
    VK_KHR_video_decode_h265 : extension revision 8
    VK_KHR_video_decode_queue : extension revision 8
    but I don't see any evidence that mpv is using it:
    Code:
    $ mpv --hwdec=vulkan --gpu-api=vulkan ~/Videos/Big_Buck_Bunny_720_10s_30MB.mp4
    (+) Video --vid=1 (*) (av1 1280x720 30.000fps)
    File tags:
    Artist: Blender Foundation 2008, Janus Bager Kristensen 2013
    Comment: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
    Composer: Sacha Goedegebure
    Genre: Animation
    Title: Big Buck Bunny, Sunflower version
    VO: [gpu-next] 1280x720 yuv420p

    Comment


    • #3
      Originally posted by chrisr View Post
      Speaking as a RDNA2 owner, what are these "video events" that are not yet enabled for my hardware? What would they do if they were enabled?

      I have tried setting RADV_PERFTEST=video_decode, and vulkaninfo shows me:
      Code:
      VK_KHR_video_decode_av1 : extension revision 1
      VK_KHR_video_decode_h264 : extension revision 9
      VK_KHR_video_decode_h265 : extension revision 8
      VK_KHR_video_decode_queue : extension revision 8
      but I don't see any evidence that mpv is using it:
      Code:
      $ mpv --hwdec=vulkan --gpu-api=vulkan ~/Videos/Big_Buck_Bunny_720_10s_30MB.mp4
      (+) Video --vid=1 (*) (av1 1280x720 30.000fps)
      File tags:
      Artist: Blender Foundation 2008, Janus Bager Kristensen 2013
      Comment: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
      Composer: Sacha Goedegebure
      Genre: Animation
      Title: Big Buck Bunny, Sunflower version
      VO: [gpu-next] 1280x720 yuv420p
      press i and look at the video line, will look like Video: codec blah blah HW: HW_ACCEL_HERE

      Comment


      • #4
        Originally posted by chrisr View Post
        Speaking as a RDNA2 owner, what are these "video events" that are not yet enabled for my hardware? What would they do if they were enabled?

        I have tried setting RADV_PERFTEST=video_decode, and vulkaninfo shows me:
        Code:
        VK_KHR_video_decode_av1 : extension revision 1
        VK_KHR_video_decode_h264 : extension revision 9
        VK_KHR_video_decode_h265 : extension revision 8
        VK_KHR_video_decode_queue : extension revision 8
        but I don't see any evidence that mpv is using it:
        Code:
        $ mpv --hwdec=vulkan --gpu-api=vulkan ~/Videos/Big_Buck_Bunny_720_10s_30MB.mp4
        (+) Video --vid=1 (*) (av1 1280x720 30.000fps)
        File tags:
        Artist: Blender Foundation 2008, Janus Bager Kristensen 2013
        Comment: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
        Composer: Sacha Goedegebure
        Genre: Animation
        Title: Big Buck Bunny, Sunflower version
        VO: [gpu-next] 1280x720 yuv420p
        You should probably be using --vo=gpu-next

        Vulkan Video Decoding: Usage Guide and FAQ On the 28th of May, we reached the significant milestone of finally merging all the required functionality into ffmpeg, libplacebo, and mpv to do end-to-e...

        Comment


        • #5
          Originally posted by ahrs View Post

          You should probably be using --vo=gpu-next

          https://github.com/mpv-player/mpv/discussions/13909
          I keep forgetting that this isn't the default yet lol

          Comment


          • #6
            Originally posted by ahrs View Post
            You should probably be using --vo=gpu-next
            Isn't he already?
            Code:
            VO: [gpu-next] 1280x720 yuv420p

            Comment


            • #7
              Originally posted by Anux View Post
              Isn't he already?
              Code:
              VO: [gpu-next] 1280x720 yuv420p
              Good catch, I was only looking at the flags. Maybe he set that in mpv.conf?

              Comment


              • #8
                Originally posted by Anux View Post
                Isn't he already?
                Code:
                VO: [gpu-next] 1280x720 yuv420p
                Yes.

                Comment


                • #9
                  Originally posted by Quackdoc View Post
                  press i and look at the video line, will look like Video: codec blah blah HW: HW_ACCEL_HERE
                  There is no such line. But mpv also seems to log using hardware decoding to the console:
                  Code:
                  $ mpv ~/Videos/jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv
                  (+) Video --vid=1 (*) (hevc 3840x2160 29.970fps)
                  Cannot load libcuda.so.1
                  Using hardware decoding (vaapi).
                  VO: [gpu-next] 3840x2160 vaapi[p010]
                  Exiting... (Quit)
                  and
                  Code:
                  $ mpv --hwdec=vdpau ~/Videos/jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv
                  (+) Video --vid=1 (*) (hevc 3840x2160 29.970fps)
                  Using hardware decoding (vdpau).
                  VO: [gpu-next] 3840x2160 vdpau[yuv420p10]
                  Exiting... (Quit)
                  whereas this doesn't claim "hardware decoding":
                  Code:
                  $ mpv --hwdec=vulkan --gpu-api=vulkan ~/Videos/jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv
                  (+) Video --vid=1 (*) (hevc 3840x2160 29.970fps)
                  VO: [gpu-next] 3840x2160 yuv420p10
                  V: 00:00:00 / 00:00:30 (0%)../src/vulkan/wsi/wsi_common_x11.c:1912: Swapchain status changed to VK_SUBOPTIMAL_KHR
                  Exiting... (Quit)
                  ​and
                  Code:
                  $ mpv --hwdec=vulkan --gpu-api=vulkan ~/Videos/sample_1280x720.hevc
                  [lavf] This format is marked by FFmpeg as having no timestamps!
                  [lavf] FFmpeg will likely make up its own broken timestamps. For
                  [lavf] video streams you can correct this with:
                  [lavf] --no-correct-pts --container-fps-override=VALUE
                  [lavf] with VALUE being the real framerate of the stream. You can
                  [lavf] expect seeking and buffering estimation to be generally
                  [lavf] broken as well.
                  (+) Video --vid=1 (hevc 1280x720 25.000fps)
                  No video PTS! Making something up. Using 25.000000 FPS.
                  No video PTS! Making something up. Using 25.000000 FPS.
                  Ignoring further missing PTS warnings.
                  VO: [gpu-next] 1280x720 yuv420p
                  Exiting... (Quit)​
                  Last edited by chrisr; 27 August 2024, 10:17 AM.

                  Comment


                  • #10
                    You might also need to set the context. This works for me in $HOME/.config/mpv/config

                    Code:
                    vo=gpu-next
                    gpu-api=vulkan
                    hwdec=vulkan
                    gpu-context=waylandvk
                    ​
                    To get more verbose output about what's going on, run mpv with --msg-level=all=debug​
                    Last edited by shmerl; 27 August 2024, 10:37 AM.

                    Comment

                    Working...
                    X