How rav1e Handles Interlaced Video
This article explains how the librav1e AV1 encoder
processes interlaced video sources. Because the AV1 video standard is
strictly progressive, we will explore why librav1e cannot
encode native interlaced streams, how it behaves when fed interlaced
content, and the necessary preprocessing steps to successfully encode
your footage.
The AV1 Standard is Progressive-Only
The primary reason librav1e (the library form of the
rav1e AV1 encoder) cannot handle interlaced video directly is due to the
AV1 specification itself. Unlike older codecs like MPEG-2 or H.264, the
Alliance for Open Media designed AV1 to be a modern, progressive-only
format. It completely lacks coding tools for interlaced fields.
Because the format standard does not support interlacing,
librav1e cannot flag or encode video as interlaced (such as
1080i).
What Happens If You Feed Interlaced Video to rav1e?
If you pass raw, interlaced video frames directly into
librav1e without any preprocessing, the encoder will treat
the input as standard progressive frames.
This causes two major issues:
- Severe Visual Artifacts: The encoder combines the two alternating fields (odd and even lines) into a single frame. When there is motion, this results in highly visible “combing” or “feathering” artifacts in the final output.
- Compression Inefficiency: AV1 relies heavily on temporal and spatial prediction to compress video. The sharp, high-frequency horizontal lines created by combing artifacts confuse the encoder’s motion estimation algorithms. This drastically increases the bitrate while simultaneously degrading visual quality.
How to Deal with Interlaced Sources
To encode interlaced video using librav1e, you must
deinterlace the video source before the frames reach the
encoder. This process converts the interlaced fields into progressive
frames.
This workflow is typically handled using a media framework like
FFmpeg, which can pipe the deinterlaced video directly into
librav1e.
Recommended Deinterlacing Methods
When setting up your encoding pipeline, you should apply a high-quality deinterlacing filter. Common options include:
- Yadif (Yet Another Deinterlacing Filter): A widely used, fast, and highly compatible filter.
- BWDIF (Bob Weaver Deinterlacing Filter): A modern filter based on Yadif that generally provides better edge interpolation and detail retention.
- NNEDI3: A high-quality neural network-based deinterlacer. While computationally expensive, it offers the best visual results for upscale and archive-quality conversions.
By deinterlacing your footage to a progressive format (such as
converting 60i to 60p or 30p) prior to encoding, librav1e
will be able to compress the video efficiently, resulting in a clean,
artifact-free AV1 stream.