FFMPEG Convert YUV444p to YUV420p (BASH)

Recently I've been using Kazam to create screencasts.

Although it's simple and convenient to use, it does have one drawback, in it's recordings it uses YUV444 as the colour encoding. That's almost fine for videos that are going to be played back on a desktop (depending on player support etc), but means that the majority of mobile devices will not play the content back.

It's therefore essential to convert to YUV420 before publishing. This snippet details how to do that using FFMPEG

Details

  • Language: BASH

Snippet

ffmpeg -i [input file] -c:v libx264 -pix_fmt yuv420p [output file]

Usage Example

ffmpeg -i Kazam_screencast_00003.mp4 -c:v libx264 -pix_fmt yuv420p example.mp4

Video