Skip to main content

VVenC

Software (CPU-based) Encoding of VVC (Versatile Video Codec) with libvvenc

The VVenC encoder encodes to VVC/H.266, which currently offers the most efficient compression while synthetically restoring film grain better than AOMENC or SVT-AV1. Film grain analysis and synthesis also is automatically calculated, so no trial and error is needed! Slower, CPU-based encoding offers superior compression efficiency compared to hardware-accelerated encoding, at the cost of longer processing time.

  1. Ensure you already have installed FFmpeg and understand basic usage. If not, read: Tool Installation & Preparation.

  2. The following encoding command is a starting point that provides high-quality encoding for most videos, preserving detail efficiently while keeping encoding time reasonable and synthesizes the original look of film grain from the source:

ffmpeg -i input.mkv -map 0 -c:v libvvenc -preset medium -qp 30 -vvenc-params Threads=22:MTProfile=2:fga=1 -an encoded_output.mkv

Breakdown of the Command

Base Command & Input

  • ffmpeg: The command-line tool for processing multimedia files.
  • -i input.mkv: Specifies the input file. Replace input.mkv with your actual video file path.

Encoder Selection

  • c:v libvvenc: Uses the VVenC encoder backend. Developed by Fraunhofer HHI, VVenC is a fast, easy-to-use H.266/VVC encoder offering quality/speed presets, perceptual optimization, strong parallelization, and flexible single- or two-pass rate control.

Video Encoding Settings

These options are passed directly to the VVenC encoder:

  • -preset medium: Balanced speed/quality preset. Lower presets (slow, slower) improve compression efficiency but require more time. Higher presets (fast, faster) trade quality for speed.
  • -qp 30: Quantization Parameter mode (constant QP). Lower values = higher quality/larger files; higher values = more compression. QP ~22–32 is typical for good quality; 30 is moderate/lean compression. This setting will influence your encoding speed dramatically.
  • Threads=22: Manually sets the number of worker threads VVenC should use. Higher thread counts increase speed, especially with task-based parallelization, but may slightly reduce determinism. I chose this based on my 24 thread AMD 7900X3D. 24 works as well, but can cause some system instability for a tiny inscrease in encoding speed. If omitted, the dafault of only 8 threads is used! Do multiple tests to see how encoding speed is impacted.
  • MTProfile=2: Selects the multithreading profile. 2 = Task-based parallelism, giving the best scalability on high-core CPUs. On my AMD 7900X3D I get ≈6.5 fps encoding speed for 1080p 24 fps SDR video.
  • fga=1: Enables Film Grain Analysis. It lets VVenC analyze the source for film grain and generate SEI parameters for later synthesis during playback in MPV. If you don't have grain in your source video or don't want grain, exclude this parameter. It is so nice to not have to denoise externally before encoding or tinker with grain size settings like AV1 requires!

Audio Handling

  • -an: Removes audio from the output file so you can process the audio seperately then/or mux in a different audio track you may have. For my personal videos I have filmed, edited encoded I just keep the audio as lossless format and let Youtube encode it when I upload it there:

  • -c:a copy: Copies over the source audio into the new encoded video.

But you may want to just encode the audio during the video encoding process, to a codec like Opus. See, Audio Format for other audio options and if you would like help determining what format and bitrate is suitable for your stereo or surround audio.

Output File

  • encoded_output.mkv: Specifies the name of the output file, and output file path.

📘 [View Full VVenC Parameter list] by typing `` in the terminal (CMD). Or visit: (https://github.com/fraunhoferhhi/vvenc/wiki/Usage)

Comparisons

Coming soon.