def make_movie(stim, outfile, fps=15, size='640x480'):
    """Makes an .ogv movie

    A simple wrapper for ffmpeg. Calls:
    "ffmpeg -r {fps} -i {infile} -b 4800k -g 30 -s {size} -vcodec libtheora {outfile}.ogv"

    Parameters
    ----------
    stim :

    outfile : str

    fps : float
        refresh rate of the stimulus
    size : str
        resolution of the movie out

    Returns
    -------

    """
    import shlex
    import subprocess as sp
    cmd = (
        'ffmpeg -r {fps} -i {infile} -b 4800k -g 30 -s {size} -vcodec libtheora {outfile}.ogv'
        )
    fcmd = cmd.format(infile=stim, size=size, fps=fps, outfile=outfile)
    sp.call(shlex.split(fcmd))
