Announcement

Collapse
No announcement yet.

NVENC (Nvidia Hardware Encoder)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NVENC (Nvidia Hardware Encoder)

    Does anybody know if this is supported in Kubuntu? Searching online shows only very old content that suggests it can be done, but a few hoops need to be jumped through. I'm hoping that is no longer the case, but there is really very little out there about it that I can find.

    #2
    Nvenc is supported on most all Linux distros, if you are using the proprietary drivers and a video card that is not overly old. Then whatever application you use needs to support it as well. There may be extra packages needed, but again, his would probably depend on the application.

    Comment


      #3
      I suspected this was the case. It appears to be installed, but I do not think it is working. Handbrake suggests I can HW encode with it, but when I run a transcode, it appears to be using only the CPU (very efficiently to be fair, all 12 threads at about nearly 100%). How do I test the hardware and also check FFMPEG to see if it is compiled with it? I am seeing 1080p transcode speedups of about 2.5:1 using the NVENC preset in Handbrake, while 4k is about 1:1. This seems typical of CPU. The limited info I can find online suggests NVENC should be able to accelerate it to about 1.6:1. The results seem to be consistent across applications (Shotcut and Handbrake) whether using Hardware presets or Software.

      Comment


        #4
        Sooo. what video card and driver combo do you have?

        per the docs

        Supported Hardware and Configurations
        • NVIDIA GeForce GTX Pascal (1050+), GTX/RTX Turing (1650+, 2060+) or Ampere (3060+) series GPU or better
        • NVIDIA Graphics Driver 456.71 or later
        • Windows 10
        • Experimental Linux support is available in HandBrake’s command line interface
        The min driver version for Linux is not mentioned. And not sure how accurate the docs are, considering the flatpak offers NVENC options - at least I see them, even though have an AMD card

        Also, the source used to install Handrake might have an effect on hardware support. The official Flatpak might support it, and the likely older Ubuntu deb version might not, or vice versa.

        Comment


          #5
          Originally posted by ShadYoung View Post
          How do I test the hardware and also check FFMPEG to see if it is compiled with it?
          $ ffmpeg -encoders

          It *should* have this support, but I might be wrong.

          Comment


            #6
            Originally posted by ShadYoung View Post
            The limited info I can find online suggests NVENC should be able to accelerate it to about 1.6:1.
            This of course will be hardware dependent. My AMD card can do hardware encoding for Openshot, Kdenlive just fine, but it is actually no faster than CPU, and maybe even of somewhat lower quality (to my untrained eye).

            Comment


              #7
              Interesting. So, I get the feeling it might actually be working as with an AMD 2600x, it should take longer to encode a 4k file than it is taking. Seems the high cpu usage is typical even with the HW encoding. One would also think that the applications would all kick up an error if the encoder was not found, as is reported by others in my searching. ffmpeg does report being compiled with nvenc, so I will have to run a cli-test and see whats what. Thanks claydoh.

              Comment


                #8
                Well, I am not sure, but I think it is working in ffmpeg. The initial line before the input stage that defines cuda use seemed to bork the transcode. Removing it and doing a matching bitrate transcode on a 4k file of 8min duration resulted in a 3.75x speed up and a little over 2 minutes to complete using the h264_nvenc switch without the "cuda" predefinitions.

                (A few minutes late-or) Actually, I am now sure. I just realized that while I was watching the time, I was not watching the system. The GPU is at 100% while transcoding, 50% CPU. So, FFMPEG is working. Handbrake is not working. Not sure about Shotcut. Have yet to test Resolve.

                I will try a flatpack version of handbrake. If that doesn't work, it seems I will need to build a script with ffmpeg to do batch transcoding.

                Quality is fine. I see no functional difference between the 2 files.

                Comment


                  #9
                  Nope, shotcut is not working either. That is disappointing, although it is still considerably faster than Handbrake. It makes using it for video editing pointless. Cripes I am starting to wonder if my decision to dump Windows for good was premature. Damn.

                  Comment

                  Working...
                  X