# AV1 encoder

Media Blocks SDK .Net

AV1 (AOMedia Video 1): Developed by the Alliance for Open Media, AV1 is an open, royalty-free video coding format designed for video transmissions over the Internet. It is known for its high compression efficiency and better quality at lower bit rates compared to its predecessors, making it well-suited for high-resolution video streaming applications.

Use classes that implement the IAV1EncoderSettings interface to set the parameters.

# Settings

# AOMAV1EncoderSettings

AOM AV1 encoder settings. CPU encoder.

Platforms: Windows, Linux, macOS.

# QSVAV1EncoderSettings

Intel GPU AV1 video encoder.

Platforms: Windows, Linux, macOS.

# RAV1EEncoderSettings

RAV1E AV1 encoder settings.

Platforms: Windows, Linux, macOS.

# Block info

Name: AV1EncoderBlock.

Pin direction Media type Pins count
Input Uncompressed video 1
Output AV1 1

# The sample pipeline

graph LR;
    UniversalSourceBlock-->AV1EncoderBlock;
    AV1EncoderBlock-->MP4SinkBlock;

# Sample code

var pipeline = new MediaBlocksPipeline();

var filename = "test.mp4";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));

var videoEncoderBlock = new AV1EncoderBlock(new QSVAV1EncoderSettings());
pipeline.Connect(fileSource.VideoOutput, videoEncoderBlock.Input);

var mp4SinkBlock = new MP4SinkBlock(new MP4SinkSettings(@"output.mp4"));
pipeline.Connect(h264EncoderBlock.Output, mp4SinkBlock.CreateNewInput(MediaBlockPadMediaType.Video));

await pipeline.StartAsync();

# Platforms

Windows, macOS, Linux, iOS, Android.