def rotate_video(filename, angle):
    """
    Rotates a video by an `angle` using ffmpeg.

    Parameters
    ----------
    - filename : str

        The path to the input video.
    - angle : int or float

        The angle (in degrees) specifying the amount of rotation. Positive values rotate clockwise.

    Outputs
    -------
    - `filename`_rot.avi

        The rotated video file.

    Returns
    -------
    - str

        The path to the output (rotated) video file.
    """
    import os
    import math
    of = os.path.splitext(filename)[0]
    fex = os.path.splitext(filename)[1]
    if os.path.isfile(of + '_rot.avi'):
        os.remove(of + '_rot.avi')
    cmds = ' '.join(['ffmpeg', '-i', filename, '-c:v', 'mjpeg', '-q:v', '3',
        '-vf', f'rotate={math.radians(angle)}', of + '_rot.avi'])
    os.system(cmds)
    return of + '_rot', fex
