Skip to content

Instantly share code, notes, and snippets.

@irvanalhaq9
irvanalhaq9 / 20240309_opencv.py
Created May 6, 2025 14:28 — forked from uwezi/20240309_opencv.py
[video inclusion in Manim] Include video objects picture-in-picture. #manim #animate #video #opencv #videomobject
import cv2 # needs opencv-python https://pypi.org/project/opencv-python/
from PIL import Image, ImageOps
from dataclasses import dataclass
@dataclass
class VideoStatus:
time: float = 0
videoObject: cv2.VideoCapture = None
def __deepcopy__(self, memo):
return self