#!/usr/bin/env python

"""
very rough. will improve
"""

import subprocess
import sys

files = 'mf://*.png'
if len(sys.argv) > 1:
    files = 'mf://'+sys.argv[1]+'*.png'

command = ('mencoder',
           files,
           '-mf',
           'type=png:w=800:h=600:fps=15',
           '-ovc',
           'lavc',
           '-lavcopts',
           'vcodec=mpeg4',
           '-oac',
           'copy',
           '-o',
           'output.avi')

print "\n\nabout to execute:\n%s\n\n" % ' '.join(command)
subprocess.check_call(command)
