u/robinechuca

[OC] Open benchmark (140k tests) of energy, quality and complexity across video codecs
▲ 17 r/AV1

[OC] Open benchmark (140k tests) of energy, quality and complexity across video codecs

One surprising result: On CPU with ffmpeg, decoding with VVC consumed on average 10x more energy than h264, h265, vp9 and av1 on the same videos / same machines!

To get there, I ran 4 months of video encoding/decoding tests on 7 different machines.

The result is a fully open dataset with 140k+ encode/decode runs with measurements for time, power (real wattmeter + RAPL), CPU/RAM usage, temperature, bitrate, metrics and ffprobe.

Setup:

  • 10 encoders (libx264, h264_vaapi, h264_nvenc, libx265, hevc_nvenc, vvc, libaom-av1, libsvtav1, libvpx-vp9, av1_nvenc)
  • 5 decoders (CPU only)
  • 30 videos from JVET CTC x 4 resolutions (SD/HD/FHD/UHD4K)
  • 24 quality points per encoder
  • 3 efforts per encoder (fast/medium/slow)
  • 5 quality metrics (PSNR/SSIM/VIF/VMAF/LPIPS_ALEX)
  • 4 complexity metrics (SI/TI)

The data was collected with mendevi.

Here is an example of how to use the dataset to visualise the energy required to decode a video stream on a CPU, depending on the codec.

https://reddit.com/link/1wz5lu3/video/t8etai3b8vth1/player

Here is another example comparing the bitrate and distortion performance of AV1 versus H.264, regardless of the duration.

https://preview.redd.it/64f9fand8vth1.png?width=1920&format=png&auto=webp&s=7e8e0490e423aec39fb678482be57ac10703fc55

Which analysis would you like to see?

If you’d like to explore the dataset yourself, a lightweight JSON version is available here, while the full 50 GB SQLite dataset can be downloaded via torrent here.

reddit.com
u/robinechuca — 9 days ago

CutCutCodec: Streamlined Video Processing – A Signal Processing Oriented MoviePy Alternative

After two years of work, entierly hand-coded, the audio and video editing library is finally up and running!
Here is the project documentation: https://cutcutcodec.readthedocs.io/latest/

This project is aimed at developers and the signal processing and machine learning community. It is based on Torch and rigorously implements the standards of the International Telecommunication Union.

Unlike moviepy, which is based on the concept of clips, CutCutCodec is based on the concepts of media streams and editing graphs, which are more powerful, but slightly more verbose.

Let see a little basic example:

import cutcutcodec
container = cutcutcodec.read("input_video.mp4")  # open the file
stream = (
    container.out_select("video")[0]  # first video stream
    .apply_video_subclip(0, 10)  # keep the 10 first seconds
    .apply_video_equation("r0", "g0", ".5*b0*sin(2*pi*0.5*t)+.5")  # blink blue
)
streams_settings = [{"encodec": "libx264", "rate": 30, "shape": (480, 720)}]  # optional
cutcutcodec.write([stream], "output_video.mp4", streams_settings=streams_settings)

If you have any feedback on the usage or the source code for me, I would love to hear it!

u/robinechuca — 22 days ago