def METHOD_NAME(tmpdir, fmt):
    """largest fitting dimension is width"""
    base, ext = os.path.splitext(TEST_VIDEO)
    dstfile = str(tmpdir.join(base + "." + fmt))
    settings = create_settings(video_size=(125, 50), video_format=fmt)
    generate_video(SRCFILE, dstfile, settings)
    size_src = video_size(SRCFILE)
    size_dst = video_size(dstfile)
    assert size_dst[1] == 50
    # less than 2% error on ratio
    assert abs(size_dst[0] / size_dst[1] - size_src[0] / size_src[1]) < 2e-2