#!/bin/bash

convert -size 16x16 xc:black black.bmp
for i in $(seq -w 1 3) ; do
    ln -sfn black.bmp $i.bmp
done

mplayer -frames 3 'mf://?.bmp' -vo yuv4mpeg:file=3frame.yuv

for i in 1 3 ; do mencoder 3frame.yuv -ovc x264 -x264encopts pass=$i:threads=1:bitrate=300 -ofps 24000/1001 -o /dev/null -frames $i &> pass$i.log ; done

