AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part IV - Decode

In this part, we tested the decoding speed. Especially for video coding formats designed for video transmissions over the Internet, decoding speed could be much more important than encoding speed. We tried to encode in 2-pass vibrate bitrate mode (VBR) to get almost the same file sizes and counted the time needed for converting the encoded videos into raw video files. we decoded in RAM, because decoding is fast and the raw video could be very large. We also encoded in RAM this time, but the improvement of encoding speed, if any, wasn't very impressive.


Conclusion

  • At of June 2018, the AV1 decoder can only decode in a single thread. Decoders for H.264, H265, and VP9 utilize multi-threads.
  • We were not able to play videos encoded with AV1 in Chrome, Firefox Nightly, VLC, both on Windows and LINUX, though those are claimed to be able to.
  • To decode the files encoded with AV1, the CPU time was approximately 3.5-6x longer than that to decode files encoded with x264. This means that it required 3.5-6x more CPU power to decode files encoded with AV1.
  • H.265 and VP9 also require more CPU power to decode than H.264. H.265 is the second most demanding among the codecs tested.
  • In our tests, we encoded with "vbr equals 500k", the bitrate of files encoded with x264 and x265 was more accurate.
  • 2-pass mode of x264 and x265 could be double slower than their 1-pass CRF mode.

Note

  • At of June 2018, AV1 is still experimental.
  • We are talking about software decode.
  • We used x264 as the AVC encoder.
  • We used x265 as the HEVC encoder.
  • The AV1 encoder ran with "--cpu-used=4" for "medium" speed, "--tile-columns=4" to enabling multi-threading. We encode in the 2-liass vibrate bitrate mode (VBR), all other settings were as default.

Test 1:

Source video


sintel_trailer_2k_480p24.y4m
© copyright Blender Foundation | durian.blender.org.
downloaded from https://xiph-media.net/

Results

Codec Decode Encode
real time vs x264 CPU time vs x264 real time vs x264 CPU time vs x264
x264 0.631s 1:1 1.856s 1:1 8.370s 1:1 26.776s 1:1
x265 1.190s 1.89:1 3.024s 1.63:1 46.928s 5.61:1 2m39.733s 5.97:1
VP9 0.780s 1.24:1 2.095s 1.13:1 1m50.934s 13.25:1 3m04.823s 6.90:1
AV1 11.750s 18.62:1 11.703s 6.31:1 51m13.259s 367.18:1 100m9.202s 224.42:1

Test 2:

source video


First 1000 frames of big_buck_bunny_360p24.y4m
(c) copyright 2008, Blender Foundation /
www.bigbuckbunny.org
.
downloaded from https://xiph-media.net/

Results

Codec Decode Encode
real time vs x264 CPU time vs x264 real time vs x264 CPU time vs x264
x264 0.409s 1:1 1.059s 1:1 4.613s 1:1 14.580s 1:1
x265 0.980s 2.40:1 1.813s 1.71:1 26.374s 5.72:1 1m15.657s 5.19:1
VP9 0.761s 1.86:1 1.253s 1.18:1 1m23.756s 18.16:1 2m19.795s 9.59:1
AV1 4.178s 10.22:1 3.993s 3.77:1 43m39.688s 567.89:1 115m9.137s 473.88:1

Commands

Encode

AV1: aomenc --end-usage=vbr --target-bitrate=kilobitrate --tile-columns=4 --cpu-used=4 --webm -o output source
VP9: ffmpeg -i source -y -c:v libvpx-vp9 -pass 1 -b:v bitrate -f webm /dev/null
     ffmpeg -i source    -c:v libvpx-vp9 -pass 2 -b:v bitrate output
x264: ffmpeg -i source -y -c:v libx264 -pass 1 -b:v bitrate -f mp4 /dev/null
      ffmpeg -i source    -c:v libx264 -pass 2 -b:v bitrate output
x265: ffmpeg -i source -y -c:v libx265 -x265-params pass=1 -b:v bitrate -f mp4 /dev/null
      ffmpeg -i source    -c:v libx265 -x265-params pass=2 -b:v bitrate output

Decode

ffmpeg -i output -f rawvideo output.raw

Get the first 1000 frames

ffmpeg -i source -vframes 1000 -f yuv4mpegpipe output

Codec version

AV1: aomenc 1.0.0-21-g96ee0eb45, source files downloaded from https://aomedia.googlesource.com/aom, Jun 28 2018
VP9: LAVC (h264)58.20.104 libvpx-vp9, source files downloaded from https://chromium.googlesource.com/webm/libvpx.git, Jun 28 2018
x264: core 155, source files downloaded from http://git.videolan.org/git/x264, Jun 28 2018
x265: 2.8+24-289b8a3730ae:[Linux][GCC 8.0.1][64 bit] 8bit, source file downloaded from https://bitbucket.org/multicoreware/x265, Jun 28 2018
ffmpeg: N-91378-g3f95337, source files downloaded from https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2, Jun 28 2018
LZMA: Parallel PXZ 4.999.9beta (build 20180209), Fedora 28
      liblzma: 5.2.3, Fedora 28

Environment

  • OS: GNU/Linux (Fedora 28)
  • CPU: Intel Core i5 @ 4.0GHz
  • RAM: DDR3 @ 1600MHz dual channel


Related

Comments

Popular

Intel 7th and 8th generation processor graphics driver for Windows 7/8/8.1

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part II - Fidelity

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part I - Lossless

OBS Studio settings for best quality (loseless) recording

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part III - Quality

YouTube starts delivering videos in AV1 format