HEVC Video Encoding Produces Interlaced Output from Non-Interlaced Input
When trying to reduce the size of a Blu-Ray rip (ripped to h264 mp4 format), some users might try encoding it to HEVC (h265) format using tools like FFmpeg or HandBrake. However, they might notice that the resulting video is interlaced, even though the input was non-interlaced.
Interlacing vs Non-Interlacing
Interlacing is a technique used in video technology, where two fields of a single frame are displayed in quick succession, creating the illusion of a single, complete frame. Non-interlacing, on the other hand, displays the entire frame in a single pass, also known as progressive scanning. Progressive videos generally have better quality than interlaced videos because each frame has complete image information.
HEVC Encoding Process
HEVC (High Efficiency Video Coding) is a video compression standard designed to provide better compression efficiency than its predecessor, h264. The compression process involves analyzing and dividing the input video into smaller blocks, called Coding Units (CUs), and applying various encoding techniques.
+-----------+
| Coding Unit|
+-----------+
| (CU) |
+-----------+
During this process, when an input frame contains both interlaced and non-interlaced content, the HEVC encoder might produce an interlaced output to maintain temporal consistency. This can be especially problematic when encoding a non-interlaced Blu-Ray rip to the HEVC format.
Forcing Non-Interlaced Output
To ensure that the output video remains non-interlaced, you can try passing the 'fieldorder=progressive' flag while encoding. For FFmpeg, this can be added as:
ffmpeg -i input.mp4 -c:v hevc -vf "fieldorder=progressive" output.mp4
For HandBrake, the 'Interlaced' option can be set to 'None' in the Video tab during the encoding process.
- HEVC encoding can produce interlaced output when input is non-interlaced.
- Interlacing and non-interlacing are different methods of displaying video frames.
- The HEVC encoding process involves analyzing input and dividing it into smaller blocks.
- By passing the 'fieldorder=progressive' flag in FFmpeg or disabling interlacing in HandBrake, non-interlaced output can be forced.
References
- Interlacing - https://en.wikipedia.org/wiki/Interlaced_video
- HEVC - https://en.wikipedia.org/wiki/High\_Efficiency\_Video\_Coding
- HandBrake Documentation - https://handbrake.fr/docs/en/latest/technical/video.html