X-Face Sanka
Channel: Dave Rice
Date: 2013-01-11

Example of x-face as a video codec.

This is a video that I converted to late-1980's era x-face email images using ffmpeg and then back to something useful. The xface format is a 48 x 48 pixel bitmap image of mono data (more info: http://en.wikipedia.org/wiki/X-Face). I then scaled it to 480x480 using a scaling method to preserve the pixelization and padded it to 720x480 so that hopefully YouTube's transcoder won't wrangle it too much further.

The source video is available at: http://archive.org/details/sanka_coffee.

Here's the steps I used:
ffmpeg -i input.mp4 -c:v xface -s 48x48 xface-%05d.bmp
ffmpeg -i input.mp4 audio.wav
ffmpeg -c:v xface -f image2 -i xface-%05d.bmp -f nut - | ffmpeg -i - -i audio.wav -map 0 -map 1 -c:v rawvideo -s 48x48 -pix_fmt monow -c:v ffv1 -c:a pcm_s16le xface-48x48.mov
ffmpeg -i xface-48x48.mov -c:v ffv1 -sws_flags neighbor+full_chroma_inp -vf scale=480:480,pad=720:480:120:0 -c:a libfaac xface.mov