ffmpeg -i molecule.%5d.ppm -c:v libx264 -preset slow -crf 18 molecule.mkv # -i input filenames # -c:v codec (libx264 --> H.264) # -preset duh # -crf quality factor, lower = better, 18 = practically lossless # output filename # For colors, make sure you're using yuv444 which should be the default in newer ffmpeg # Note: you can use either the vmd ppm or tga image files