6 ms·
What's the state of encoding? I'd like to try moving some videos to AV1, but I'm not willing to wait... IIRC, it was literally days of encode time for minutes o
by yjftsjthsd-h 5y ago
What's the state of encoding? I'd like to try moving some videos to AV1, but I'm not willing to wait... IIRC, it was literally days of encode time for minutes of video last time I tried.
- kasabali 5y agoAFAIK state of the art is using fast presets of SVT-AV1, combined with Av1an [0] for parallelism. [0] https://github.com/master-of-zen/Av1an https://github.com/master-of-zen/Av1an
- lynguist 5y agoSee here for performance benchmarks on dav1d (av1 e̶n̶c̶o̶d̶e̶r̶): https://openbenchmarking.org/test/pts/dav1d#results https://openbenchmarking.org/test/pts/dav1d#results Edit: It’s false! This is just a decoder, not an encoder! I just learned it. Here is the link for the performance benchmarks for SVT-AV1, the most popular encoder as I just learned: https://openbenchmarking.org/test/pts/svt-av1 https://openbenchmarking.org/test/pts/svt-av1
- cogman10 5y agodav1d is an av1 decoder
- ______-_-______ 5y agoWe just need to hold out hope for the release of dav1e
- lynguist 5y agoDoes Team Videolan have anything like it on their roadmap?
- sp332 5y agoIt's not a videolan project, but is rav1e the kind of thing you're looking for?
- lynguist 5y agoBut is the psychovisual output any good or do they only target, say, speed? Because back in the days, both Videolan projects x264 and x265 (especially x264) had much better psychovisual quality than commercial encoders. Back in those days, x264 felt to me like a software written by aliens from the future.
- sp332 5y agoDark Shikari's blog was great. Defunct now, but I think it's all on the Internet Archive. https://web.archive.org/web/20100104193513/http://x264dev.multimedia.cx/?p=201 https://web.archive.org/web/20100104193513/http://x264dev.mu... I don't know of any benchmarks, but rav1e does have --tune psychovisual, and there are issues raised against it, so it seems they take it seriously.
- kasabali 5y ago(sorry for venting time :) > Back in those days, x264 felt to me like a software written by aliens from the future. Indeed it may be :) H.264 might not be the latest and best video coding standard anymore, but in my opinion x264 is, and will always be by far the best encoder ever written for a video format. Which brings me to... > Because back in the days, both Videolan projects x264 and x265 (especially x264) had much better psychovisual quality than commercial encoders. Unfortunately x265 isn't a Videolan project (its developed by MulticoreWare Inc.) and it's a very mediocre encoder which doesn't hold a candle to x264 and IMO kind of a shame considering its legacy. Also after 2018 it's practically became maintainenance-only and was surpassed by proprietary encoders in MSU encoder tests in the following years. That's a big loss considering x264 was still seeing significant efficiency and performance improvements as late as 2013 (when the H.264 format was 10 years old), so when compared to x264 I assume a good 4-5 years of potential improvements have been left at the table for x265.
- post-factum 5y agosvt-av1 is pretty fast. Well, depending on crf/preset etc of course, but in general, the more cores you have, the easier it is to get realtime encoding with decent quality. You may want to try ab-av1 first, and then go and play with ffmpeg manually if the result does not satisfy your needs. For other encoders that do not do parallel encoding that well there are things like av1an.
- cogman10 5y agoThe current preferred encoder is SVT-AV1 [1]. It has pretty good CPU/space tradeoffs, so you can pick how long you are willing to wait for a video to encode. [1] https://github.com/AOMediaCodec/SVT-AV1 https://github.com/AOMediaCodec/SVT-AV1
- Ameo 5y agoI've used this with FFmpeg with great success. Encoding time and video quality is comparable to other encoders, and file size almost always smaller.
- SemanticStrengh 5y agoThis chart is well know, has kt been reproduced on other datasets?
- mikenew 5y agoWith ffmpeg 5 using libaom it's actually reasonable. Obviously it depends on quality and whatnot, but I'm able to get about .25X of realtime playback speed with AV1 encoding. The magic switch is setting -cpu-used to something higher than the default of 1, which is go-on-vacation-and-maybe-it-will-finish slow. Rough example: `ffmpeg -i video.mkv -c:v libaom-av1 -cpu-used 5 av1_test.mkv`
- mrb 5y agoOn my PC I get .329x of realtime playback speed with AV1, and 4.85x with libx264. So AV1 encoding is 15 times slower than H.264 encoding ! I used ffmpeg "-cpu-used 8" for AV1 (higher than this and I get "Error setting option cpu-used to value X"). I removed the -cpu-used command for H.264 as the encoder defaults to autodetecting the number of threads to max out CPU usage. My CPU is an 8-core 16-thread AMD Ryzen 7 PRO 5750G. My source material was the first 20 seconds of the H.264 blu-ray rip of Titanic. top(1) shows the AV1 encoder uses around 500% CPU (meaning only 5 of the 16 hardware threads are utilized) while the H.264 encoder uses around 1600% (exactly 16 of 16 threads utilized). So there is a lot of potential parallelization optimization that could be exploited. But even assuming perfect scaling from 5 to 16 threads, the AV1 encoder would get to 1.1x of realtime playback speed. It would still be about 5 times slower than the H.264 encoder.
- ShockedUnicorn 5y agocpu-used is (somewhat confusingly) not for how many threads it uses, but how good the quality of the video should be in a scale from 0 to 9, where 0 is best quality and slowest, and 9 is worst quality and fastest. Very similar to how -preset was used for x264. https://github.com/AOMediaCodec/community/wiki#how-to-make-encoding-faster https://github.com/AOMediaCodec/community/wiki#how-to-make-e... explains the different settings that most change the speed of encoding.
- mikenew 5y agoTry adding `-row-mt 1 -tiles 2x2`. That will essentially tile the video into parallel streams that can be encoded on different threads. You should get better CPU utilization that way. I don't think AV1 will ever get to the encoding speed of a codec like h264, because in a very general sense; simpler math is easier to do. AV1 can encode the same information into fewer bits, but that efficiency has a computational cost. It really depends on what you're doing. If you're trying to livestream it could be a big issue. If you're going to encode a video once and then store it for years, it's probably not a big deal. Totally up to you. For me AV1 has become a pretty good option.
- out_of_protocol 5y agohttps://people.videolan.org/~unlord/SVT-AV1_BD-rate.png https://people.videolan.org/~unlord/SVT-AV1_BD-rate.png Comparation between codecs and encoder presets. At the same speed SVT-AV1 gives better quality vs h264, h265. M10-M8 look like nice spot
- ZeroGravitas 5y agoWorth highlighting the hardware used for that graph had 96 logical cores. Newer codecs can generally take better advantage of that parallelism and SVT in particular has this as a core design element. Still cool, but might not fully apply depending on your use case.
- ummonk 5y agoCan you really save much space by re-encoding an already encoded video in AV1? Wouldn’t the efficiency improvement be offset by the doubling up of compression artifacts?
- layer8 5y agoI just googled a bit to see how much space could be saved by converting Blu-ray AVC content (1080p non-HDR) to AV1 with subjectively same-ish quality, and from what I gathered one can expect to save 40-50% storage space on average (with a spread of maybe more like 20-80% depending on the video). So it’s substantial, but maybe not substantial enough to run and reencode all your movies, unless moving to a free codec is the important motivation.
- zanny 5y agoThat seems like a cq based encode. Try av1an in its target quality mode - I've gotten some movies to a tenth the Blu-ray size with 98 vmafs and with only smudged detail at pixel level scrutiny. The trick is if your encoder can adapt the quantizer based off a metric to compare the encode quality you can save a ton more space without visual degradation.
- windowsrookie 5y agoYou wouldn't save much going from h.265 -> AV1 but h.264 -> AV1 should be a significant savings. AV1 is ~30% more efficient than h.265. And h.265 is ~40% more efficient than h.264. The lower the resolution of the video, the less savings you will get. I personally will wait until more devices support hardware AV1 decoding. I believe only Intel 12th gen, and Nvidia 3000 support AV1 currently. I don't plan on purchasing a new laptop or smartphone for 3-4 years, at that point I may start encoding in AV1.
- tim-- 5y agoAMD 6000 series cards also support hardware decoding of AV1.
- powersnail 5y agoI tried a few days before (libaom, svt, and rav1e), and I'm getting much slower speed than with vp9, at comparable quality.
- Cadwhisker 5y agoYou can see nVidia's hardware support here: https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new https://developer.nvidia.com/video-encode-and-decode-gpu-sup... The take-away is that nVidia only has hardware support for AV1 on the RTX 3000 Ampere series cards. Intel supported AV-1 decoding in its Xe-LP GPUs in 2020. Intel also reached v1.0.0 of its open-source codec 2 weeks ago, here: https://github.com/AOMediaCodec/SVT-AV1 https://github.com/AOMediaCodec/SVT-AV1 I am not aware of any other CPU or GPU that has an AV-1 codec built in.