INNER CODE UNIT · Python

Demo

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

class Demo:
    """Demo 定义一段演示视频的固定时长及输出文件名。"""

    source: Path
    duration: int
    output_name: str


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

    command = [
        "ffprobe",
        "-v",
        "error",
        "-show_entries",
        "format=duration:stream=width,height",
        "-of",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…