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

  • Jabberwocky
    replied
    Originally posted by Toggleton View Post

    google duo is the only one of these where Your device is encoding. For Youtube, netflix and other video streaming services will you only need to decode.
    For low bitrate video calls like in google duo is libaom tuned with real time mode --rt and at a high speed setting(--cpu-used6 and up).
    AV1 does really work great to hide artifacts at this low bitrate situations so this is a great use case for it.
    I was under the impression that dalaa and vp9 was really good at low bitrate. Is AV1 some how worse or just too slow?

    I have not checked up on this tech in ~2 years.

    Leave a comment:


  • aksdb
    replied
    Originally posted by Toggleton View Post

    google duo is the only one of these where Your device is encoding. For Youtube, netflix and other video streaming services will you only need to decode.
    For low bitrate video calls like in google duo is libaom tuned with real time mode --rt and at a high speed setting(--cpu-used6 and up).
    AV1 does really work great to hide artifacts at this low bitrate situations so this is a great use case for it.

    I guess if stadia will switch to AV1 they will use FPGAs to stream it in real time. nvidia did tease that twitch is working on 1440p120fps AV1 trancoding https://www.nvidia.com/en-us/geforce...-av1-decoding/ Twitch did work with NGCODEC on VP9 trancoding https://blog.twitch.tv/en/2018/12/19...-35db26f6322f/
    So i guess they will do the same with AV1 (I think the streamer will still stream with h.264 and twitch will do AV1 in the trancoding steps)
    Here a talk from NGCODEC about that work(NGCodec was acquired by Xilinx in July 2019) https://www.youtube.com/watch?v=vcuQuQAX4gU

    Not sure if AV1 as Live streaming codecs(Software encoding on the CPU) is the right choice yet https://openbenchmarking.org/test/pts/svt-av1 That are big CPUs with a lot of cores for 1080p in this test(this are results for svt-av1 0.8.0 not sure how the speed of it changed since that)
    Thanks for these clarifications. I would not have expected Twitch to transcode those streams (probably same with Youtube Live). As a provider this would be exactly the kind of thing I would try to push to the edges instead of my datacenter. But I guess for the time being where there are no hardware encoders yet (on the mass market), it might still make sense to reduce the multiplexed traffic significantly. Once there are hardware encoders and they are used by the different capture cards (like Elgato) I assume Twitch (and others) would still prefer if the stream is directly encoded in AV1.

    Leave a comment:


  • Toggleton
    replied
    google duo is the only one of these where Your device is encoding. For Youtube, netflix and other video streaming services will you only need to decode.
    For low bitrate video calls like in google duo is libaom tuned with real time mode --rt and at a high speed setting(--cpu-used6 and up).
    AV1 does really work great to hide artifacts at this low bitrate situations so this is a great use case for it.

    I guess if stadia will switch to AV1 they will use FPGAs to stream it in real time. nvidia did tease that twitch is working on 1440p120fps AV1 trancoding https://www.nvidia.com/en-us/geforce...-av1-decoding/ Twitch did work with NGCODEC on VP9 trancoding https://blog.twitch.tv/en/2018/12/19...-35db26f6322f/
    So i guess they will do the same with AV1 (I think the streamer will still stream with h.264 and twitch will do AV1 in the trancoding steps)
    Here a talk from NGCODEC about that work(NGCodec was acquired by Xilinx in July 2019) https://www.youtube.com/watch?v=vcuQuQAX4gU

    Not sure if AV1 as Live streaming codecs(Software encoding on the CPU) is the right choice yet https://openbenchmarking.org/test/pts/svt-av1 That are big CPUs with a lot of cores for 1080p in this test(this are results for svt-av1 0.8.0 not sure how the speed of it changed since that)

    Leave a comment:


  • aksdb
    replied
    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
    https://www.xda-developers.com/googl...hotos-meet-tv/
    https://www.blog.google/products/duo...tay-connected/

    Leave a comment:


  • MadeUpName
    replied
    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.

    Leave a comment:


  • bug77
    replied
    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

    Leave a comment:


  • BlueSwordM
    replied
    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.



    Leave a comment:


  • Toggleton
    replied
    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

    Leave a comment:


  • MadeUpName
    replied
    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.

    Leave a comment:


  • DiDiDi
    replied
    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.

    Leave a comment:

Working...
X