def test_ffmpeg_resizing():
    """Test FFmpeg resizing, to include downscaling."""
    video_file = "media/big_buck_bunny_432_433.webm"
    target_resolutions = [(128, 128), (128, None), (None, 128), (None, 256)]
    for target_resolution in target_resolutions:
        video = VideoFileClip(video_file, target_resolution=target_resolution)
        frame = video.get_frame(0)
        for target, observed in zip(target_resolution[::-1], frame.shape):
            if target is not None:
                assert target == observed
        video.close()
Test FFmpeg resizing, to include downscaling.
tests/test_VideoFileClip.py