cutcutcodec.core.analysis.video.properties.range.get_range¶
- cutcutcodec.core.analysis.video.properties.range.get_range(filename: Path | str | bytes, index: int = 0) str | None[source]¶
Read in the metadata, the color range.
Parameters¶
- filenamepathlike
The pathlike of the file containing a video stream.
- indexint
The relative index of the video stream being considered, by default the first stream encountered is selected.
Returns¶
- rangestr
The name of the color range
pc,tvor None.
Raises¶
- MissingStreamError
If the file does not contain a playable video stream.
- MissingInformation
If the information is unavailable.
Examples¶
>>> from cutcutcodec.core.analysis.video.properties.range import get_range >>> from cutcutcodec.utils import get_project_root >>> media = get_project_root() / "media" / "video" / "intro.webm" >>> get_range(media) 'tv' >>>