Live data from Hacker News

Guide to Adopting AV1 Encoding

bitmovin.com

11–20 of 95 posts

Re: Guide to Adopting AV1 Encoding

#11
post #2

Maybe this is not such a concern to audience of this article, but at least for me I'm stuck with h264 because VP9/AV1 encoding is really really slow. I'd love to use the codecs that are open and technically better, but when the video encodes at 1fps, it's too just too convenient to use the magnitudes faster h264. I'm probably not up to date with newer/hardware encoders and please let me know if my view is outdated.

How are you getting 1fps encoding? I see 332fps on my 12900K with preset 10.

    -vf scale=1280:720 -c:v libsvtav1 -crf 30 -preset 7 -c:a libopus -b:a 96k -ac 2

Re: Guide to Adopting AV1 Encoding

#12
post #7

> YouTube for example, encodes content in H.264/AVC, VP9 and AV1 Why don't I see AV1 in many Youtube videos though? Checking with yt-dlp. It looks like they were planning to use it, but didn't really roll it out.

Av1 is almost always present in >2k videos

Re: Guide to Adopting AV1 Encoding

#13
post #7

> YouTube for example, encodes content in H.264/AVC, VP9 and AV1 Why don't I see AV1 in many Youtube videos though? Checking with yt-dlp. It looks like they were planning to use it, but didn't really roll it out.

the new codecs tend to only get deployed for higher resolution. 5% better 360p video doesn't help if you are also sending 4k video.

Re: Guide to Adopting AV1 Encoding

#14
post #6
post #2

Maybe this is not such a concern to audience of this article, but at least for me I'm stuck with h264 because VP9/AV1 encoding is really really slow. I'd love to use the codecs that are open and technically better, but when the video encodes at 1fps, it's too just too convenient to use the magnitudes faster h264. I'm probably not up to date with newer/hardware encoders and please let me know if my view is outdated.

Tricks of the trade: why have one computer compress the file when you can split it up into logical segments and have each segment sent to its own encoder?

Back when I still cared about saving disk space, I made a cluster of NVidia Jetson Nanos running in a docker swarm configuration [1] to compress my blu-ray rips, but honestly even when you have six computers working at once, H264 on a single computer is still often faster.

On the Jetson Nanos I was lucky to get maybe 1fps in ffmpeg using VP9. Multiply that by six boards and that's about 6fps in total; ffmpeg running x264 in software mode was getting around 11fps on a single board, not even counting using the onboard encoder chip, meaning that I was getting better performance from one board using x264 than all six using VP9.

Now obviously this is a single anecdote on specific hardware, so I'm not saying that this applies to every single case, but it's a big reason why I personally have not used VP9 for anything substantial yet.

[1] https://gitlab.com/tombert/distributed-transcode

Re: Guide to Adopting AV1 Encoding

#16
post #2

Maybe this is not such a concern to audience of this article, but at least for me I'm stuck with h264 because VP9/AV1 encoding is really really slow. I'd love to use the codecs that are open and technically better, but when the video encodes at 1fps, it's too just too convenient to use the magnitudes faster h264. I'm probably not up to date with newer/hardware encoders and please let me know if my view is outdated.

The hardware encoders are very fast and generally better than x264 (but not by as much as you'd think with the x264 slow preset). In addition, there are fast threaded AV1 encoders you may be overlooking, like SVT-AV1. For non-realtime, my favorite is av1an, which also yields better quality than is possible from aomenc and works with pretty much any encoder/codec: https://github.com/master-of-zen/Av1an

Hardware encoders are fine for streaming but not archiving. A CPU encoder can produce a file that is half the size or less for the same quality.

Re: Guide to Adopting AV1 Encoding

#17
post #16

Earlier quoted context omitted.

The hardware encoders are very fast and generally better than x264 (but not by as much as you'd think with the x264 slow preset). In addition, there are fast threaded AV1 encoders you may be overlooking, like SVT-AV1. For non-realtime, my favorite is av1an, which also yields better quality than is possible from aomenc and works with pretty much any encoder/codec: https://github.com/master-of-zen/Av1an

Hardware encoders are fine for streaming but not archiving. A CPU encoder can produce a file that is half the size or less for the same quality.

Yes, but AV1 hardware encoding beats x264 software encoding, if thats the only other option (albeit not by much).

Re: Guide to Adopting AV1 Encoding

#18
post #2

Maybe this is not such a concern to audience of this article, but at least for me I'm stuck with h264 because VP9/AV1 encoding is really really slow. I'd love to use the codecs that are open and technically better, but when the video encodes at 1fps, it's too just too convenient to use the magnitudes faster h264. I'm probably not up to date with newer/hardware encoders and please let me know if my view is outdated.

AV1 hardware encode just started rolling out with the most recent GPU architectures so the majority of hardware still has to do software encoding. I'd also guess that a very large fraction of the hardware out there doesn't even have hardware decode for AV1 since it was only the last generation of GPUs that got that. AV1 is mainly solving problems for the platform owners (google/netflix/facebook etc) and h264 will probably serve typical users for years to come especially if they have that one device they want to keep using that only supports h264.

Re: Guide to Adopting AV1 Encoding

#19
post #2

Maybe this is not such a concern to audience of this article, but at least for me I'm stuck with h264 because VP9/AV1 encoding is really really slow. I'd love to use the codecs that are open and technically better, but when the video encodes at 1fps, it's too just too convenient to use the magnitudes faster h264. I'm probably not up to date with newer/hardware encoders and please let me know if my view is outdated.

I care mainly about archiving, so 1FPS encodes for 24fps content is within the range that I consider okay.

However, I ran into issues with decoder speed too; whatever codec Kodi was using 18 months ago struggled to decode high-bitrate 1080p AV1 video last time I tried. Maybe this weekend I'll try again on the current version of Kodi.

Re: Guide to Adopting AV1 Encoding

#20
post #14
post #6

Earlier quoted context omitted.

Tricks of the trade: why have one computer compress the file when you can split it up into logical segments and have each segment sent to its own encoder?

Back when I still cared about saving disk space, I made a cluster of NVidia Jetson Nanos running in a docker swarm configuration [1] to compress my blu-ray rips, but honestly even when you have six computers working at once, H264 on a single computer is still often faster. On the Jetson Nanos I was lucky to get maybe 1fps in ffmpeg using VP9. Multiply that by six boards and that's about 6fps in total; ffmpeg running…

h.264 is from the 90s, so of course it's fast after ~30 years of use. hell, when I first got into encoding, we had dedicated expansion cards to do MPEG-1/MPEG-2 encoding because it was so difficult at the time. New codecs always take time in the beginning while the encoding software is tweaked/optimized. Eventually, it becomes part of the CPU hardware and then we all make comments like "remember when ____ was so slow?" one day, you'll regale the young whiper snappers on internet forums about how painfully slow AV1 encodes were when they start complaining how newHotnessEncoder5000 is so slow.
Post reply on HN