Announcement

Collapse
No announcement yet.

FFmpeg Lands Support For NVIDIA AV1 Video Decoding With RTX 30 + NVDEC

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

  • FFmpeg Lands Support For NVIDIA AV1 Video Decoding With RTX 30 + NVDEC

    Phoronix: FFmpeg Lands Support For NVIDIA AV1 Video Decoding With RTX 30 + NVDEC

    Adding to the growing list of changes for the next FFmpeg release is now AV1 video decoding with NVIDIA's GeForce RTX 30 series graphics cards...

    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
    Are they planning to add VAAPI for AV1 on RDNA 2 cards too?

    Comment


    • #3
      Given that AV1 is supposed to be used for live streaming as well, I wonder how the state of hardware assisted encoding is. (Or is AV1 easily enough on the CPU you can run it aside from actually heavy workloads like gaming?)

      Comment


      • #4
        Originally posted by aksdb View Post
        Given that AV1 is supposed to be used for live streaming as well, I wonder how the state of hardware assisted encoding is. (Or is AV1 easily enough on the CPU you can run it aside from actually heavy workloads like gaming?)
        Depends on the specific encoder and settings (lots of development on the AV1 encoders, currently). But it should be roughly on par with x265. With a 12-core or 16-core CPU, you should be fine with software encoding, I think.

        Comment


        • #5
          Originally posted by aksdb View Post
          Given that AV1 is supposed to be used for live streaming as well, I wonder how the state of hardware assisted encoding is. (Or is AV1 easily enough on the CPU you can run it aside from actually heavy workloads like gaming?)
          AV1 encoding is horrible currently. I have been doing considerable testing with both the RAV1E and AOM encoders and neither one of them is worth using. A 30 second clip takes about 6 hours to encode. The RAV1E encoder doesn't produce very good output. And even at double the file size of the h.264 source the AOM encoder still shows macroblocking and banding not in the original. I know it is possible to create great AV1 encodes as I have seen some on YT. But I am pretty sure those were produced with the SVT encoder which requires an Intel platform and I am using AMD.

          Hopefully the existing encoders continue to get better and we get better documentation for best practices when using them. If any one has managed to get great encodes out of ether RAV1E or AOM please post the command line you are using. In the mean time as much as I would like to, AV1 encoding is a non-starter for me.

          Comment


          • #6
            Originally posted by MadeUpName View Post
            . I know it is possible to create great AV1 encodes as I have seen some on YT. But I am pretty sure those were produced with the SVT encoder which requires an Intel platform and I am using AMD.
            I think youtube does use (lib)aom cause that is what google is developing.

            If you would look at the tests in the phoronix test suite https://openbenchmarking.org/test/pts/svt-av1 that did test svt-av1 on AMD CPUs would you know that AMD CPUs did perform even better than Intel ones cause they have more cores. So yeah svt-av1 works on AMD CPUs for sure .

            Well there are helper like av1an that split the video, so it gets encoded faster in parallel. Cause (lib)aom is not really good at using multiple cores efficient

            Yeah the documentation of aom is bad.
            I think cpu-used 3-4 should be a sweet spot(the default of aomenc is cpu-used0 and in ffmpeg is it cpu-used 1 AFAIK), lower than that will it get really slow.
            10bit is nice but has no fast software decoding on x86 yet(only arm64 is fast). 10bit should help with the banding except if the source has already banding but hidden behind grain/dithering cause aom does denoise it

            Comment


            • #7
              Actually, Youtube uses the reference one, aomenc, not SVT-AV1.

              SVT-AV1 doesn't require an Intel CPU. You just need an x86_64 capable CPU that preferably has AVX2 SIMD support for maximum speed(or AVX512 if you are one of those lucky ones).

              What are the parameters that you are currently using for aomenc? There are some ones that I could give you that could increase the speed substantially, as for aomenc, the default CPU preset is using CPU-0, which is abominably slow, and doesn't give you that much better efficiency.

              For aomenc, I just use something like this usually, alongside chunking software like av1an or qencoder to speed it up massively(very important, use this command in 2-pass mode to boost quality significantly):
              --threads=8 --tile-columns=1 --tile-rows=0 --cpu-used=4 --good --end-usage=q --cq-level=25 --enable-fwd-kf=1 --lag-in-frames=25 --bit-depth=8 --aq-mode=0 --enable-qm=1

              For rav1e, here's an example of the parameters I usually use for 30FPS content(not including input and output file):
              rav1e --quantizer 150 -s 4 -I 0 --tiles 2 --rdo-lookahead-frames 90 input.y4m --output output.ivf

              You can also use rav1e and aom with av1an/qencoder to speedup the encode massively by chunking it. No need to specify input and output files if you use the encoder frameworks.



              Comment


              • #8
                Originally posted by aksdb View Post
                Given that AV1 is supposed to be used for live streaming as well, I wonder how the state of hardware assisted encoding is. (Or is AV1 easily enough on the CPU you can run it aside from actually heavy workloads like gaming?)
                Given what? Where did you hear AV1 was for live streaming? Streaming services are starting to use it because it cuts back on bandwidth requirements (and thus costs), but those aren't live.

                shmerl Most likely RDNA2 will get support promptly. It just needs to be released first

                Comment


                • #9
                  Originally posted by BlueSwordM View Post
                  Actually, Youtube uses the reference one, aomenc, not SVT-AV1.
                  ...
                  Thank for the input. My last string oif tests with AOM have been like this.

                  Code:
                  ffmpeg -i <input file> -c:v libaom-av1 -row-mt 1 -tiles 2x2 -crf 5 -b:v 0 -strict experimental -c:a copy <output_file>
                  I got it from this page. https://trac.ffmpeg.org/wiki/Encode/AV1

                  I have tried settings from other pages like the recommendations from the rav1e home page but the results weren't as good and the work flow becomes an absolute nightmare as you what you need to do is separate your audio and video. Convert your video to some crazy format, shove that through the encoder twice and then try to align your audio and video again as you shove it into a container. That's just ugly.

                  I am using a constant quality setting rather than a constant bit rate. I started with -crf 30 as that is the recommendation which gave me a file of 3MB as opposed to the 129MB input file. Each night I would decrease the -crf and then kick it off to run over night. Once the output was larger than the input there was no point in more testing. I have used rav1e both wrapped by FFMpeg as well as directly and it hasn't been as good as AOM from a quality stand point. That isn't surprising as they say they wanted to start with speed and add quality later.

                  I will take your setting for a spin and see how they work out. Thanks for posting.

                  Comment


                  • #10
                    Originally posted by bug77 View Post

                    Given what? Where did you hear AV1 was for live streaming? Streaming services are starting to use it because it cuts back on bandwidth requirements (and thus costs), but those aren't live.

                    shmerl Most likely RDNA2 will get support promptly. It just needs to be released first
                    After deploying AV1 codec support in Chrome, Android, YouTube, and Duo, Google plans to bring AV1 support to Photos, Meet, TV, and Stadia.

                    Comment

                    Working...
                    X