Skip to content

Probe

🛈 DocStrings

What the container says about the (first) video track.

Source code in src/framesheet/media.py
@dataclass
class Probe:
    """What the container says about the (first) video track."""

    container: str
    codec: str | None = None
    width: int | None = None
    height: int | None = None
    fps: float | None = None
    frame_count: int | None = None
    duration: float | None = None

    @property
    def mime(self) -> str:
        return MIME_TYPES[self.container]

    @property
    def animated_image(self) -> bool:
        return self.container in {"gif", "webp"}

:fa-brands-github: Show source on GitHub