INNER CODE UNIT · Python

MAX_SVG_BYTES

unitedrhino/things · scripts/generate-energy-demo-svg.py:20

MAX_SVG_BYTES = 5 * 1024 * 1024


@dataclass(frozen=True)
class Demo:
    """Demo 定义一段演示视频的固定时长及输出文件名。"""

    source: Path
    duration: int
    output_name: str


def probe_video(source: Path) -> tuple[float, int, int]:
    """probe_video 返回视频时长、宽度和高度,并在探测失败时终止生成。"""

    command = [
        "ffprobe",
        "-v",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…