muxtools.utils.ffprobe
ProbeStream
pydantic-model
ProbeStream(*, raw: dict[str, Any] = dict(), index: int | None = None, codec_name: str | None = None, codec_long_name: str | None = None, codec_type: str | None = None, profile: str | None = None, width: int | None = None, height: int | None = None, sample_aspect_ratio: str | None = None, pix_fmt: str | None = None, color_range: str | None = None, color_space: str | None = None, color_transfer: str | None = None, color_primaries: str | None = None, chroma_location: str | None = None, avg_frame_rate: str | None = None, sample_fmt: str | None = None, sample_rate: int | None = None, channels: int | None = None, channel_layout: str | None = None, bits_per_sample: int | None = None, bits_per_raw_sample: int | None = None, bit_rate: int | None = None, tags: dict[str, str] = dict(), disposition: dict[str, int] = dict(), side_data_list: list[dict[str, Any]] = list())
Bases: _ProbeModel
Show JSON schema:
{
"properties": {
"raw": {
"additionalProperties": true,
"title": "Raw",
"type": "object"
},
"index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Index"
},
"codec_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Codec Name"
},
"codec_long_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Codec Long Name"
},
"codec_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Codec Type"
},
"profile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Profile"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Width"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Height"
},
"sample_aspect_ratio": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sample Aspect Ratio"
},
"pix_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pix Fmt"
},
"color_range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Range"
},
"color_space": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Space"
},
"color_transfer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Transfer"
},
"color_primaries": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Primaries"
},
"chroma_location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Chroma Location"
},
"avg_frame_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Avg Frame Rate"
},
"sample_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sample Fmt"
},
"sample_rate": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sample Rate"
},
"channels": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Channels"
},
"channel_layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Channel Layout"
},
"bits_per_sample": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Bits Per Sample"
},
"bits_per_raw_sample": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Bits Per Raw Sample"
},
"bit_rate": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Bit Rate"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"title": "Tags",
"type": "object"
},
"disposition": {
"additionalProperties": {
"type": "integer"
},
"title": "Disposition",
"type": "object"
},
"side_data_list": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Side Data List",
"type": "array"
}
},
"title": "ProbeStream",
"type": "object"
}
Fields:
-
raw(dict[str, Any]) -
index(int | None) -
codec_name(str | None) -
codec_long_name(str | None) -
codec_type(str | None) -
profile(str | None) -
width(int | None) -
height(int | None) -
sample_aspect_ratio(str | None) -
pix_fmt(str | None) -
color_range(str | None) -
color_space(str | None) -
color_transfer(str | None) -
color_primaries(str | None) -
chroma_location(str | None) -
avg_frame_rate(str | None) -
sample_fmt(str | None) -
sample_rate(int | None) -
channels(int | None) -
channel_layout(str | None) -
bits_per_sample(int | None) -
bits_per_raw_sample(int | None) -
bit_rate(int | None) -
tags(dict[str, str]) -
disposition(dict[str, int]) -
side_data_list(list[dict[str, Any]])
Validators:
-
_keep_raw -
_validate_optional_int→index,width,height,sample_rate,channels,bits_per_sample,bits_per_raw_sample,bit_rate
ProbeFormat
pydantic-model
ProbeFormat(*, raw: dict[str, Any] = dict(), nb_streams: int | None = None, format_name: str | None = None, format_long_name: str | None = None, tags: dict[str, str] = dict())
Bases: _ProbeModel
Show JSON schema:
{
"properties": {
"raw": {
"additionalProperties": true,
"title": "Raw",
"type": "object"
},
"nb_streams": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Nb Streams"
},
"format_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Format Name"
},
"format_long_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Format Long Name"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"title": "Tags",
"type": "object"
}
},
"title": "ProbeFormat",
"type": "object"
}
Fields:
-
raw(dict[str, Any]) -
nb_streams(int | None) -
format_name(str | None) -
format_long_name(str | None) -
tags(dict[str, str])
Validators:
-
_keep_raw -
_validate_optional_int→nb_streams
ProbeResult
pydantic-model
ProbeResult(*, raw: dict[str, Any] = dict(), format: ProbeFormat, streams: list[ProbeStream] = list(), chapters: list[dict[str, Any]] = list())
Bases: _ProbeModel
Show JSON schema:
{
"$defs": {
"ProbeFormat": {
"properties": {
"raw": {
"additionalProperties": true,
"title": "Raw",
"type": "object"
},
"nb_streams": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Nb Streams"
},
"format_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Format Name"
},
"format_long_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Format Long Name"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"title": "Tags",
"type": "object"
}
},
"title": "ProbeFormat",
"type": "object"
},
"ProbeStream": {
"properties": {
"raw": {
"additionalProperties": true,
"title": "Raw",
"type": "object"
},
"index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Index"
},
"codec_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Codec Name"
},
"codec_long_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Codec Long Name"
},
"codec_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Codec Type"
},
"profile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Profile"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Width"
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Height"
},
"sample_aspect_ratio": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sample Aspect Ratio"
},
"pix_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pix Fmt"
},
"color_range": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Range"
},
"color_space": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Space"
},
"color_transfer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Transfer"
},
"color_primaries": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Color Primaries"
},
"chroma_location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Chroma Location"
},
"avg_frame_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Avg Frame Rate"
},
"sample_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sample Fmt"
},
"sample_rate": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sample Rate"
},
"channels": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Channels"
},
"channel_layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Channel Layout"
},
"bits_per_sample": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Bits Per Sample"
},
"bits_per_raw_sample": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Bits Per Raw Sample"
},
"bit_rate": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Bit Rate"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"title": "Tags",
"type": "object"
},
"disposition": {
"additionalProperties": {
"type": "integer"
},
"title": "Disposition",
"type": "object"
},
"side_data_list": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Side Data List",
"type": "array"
}
},
"title": "ProbeStream",
"type": "object"
}
},
"properties": {
"raw": {
"additionalProperties": true,
"title": "Raw",
"type": "object"
},
"format": {
"$ref": "#/$defs/ProbeFormat"
},
"streams": {
"items": {
"$ref": "#/$defs/ProbeStream"
},
"title": "Streams",
"type": "array"
},
"chapters": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Chapters",
"type": "array"
}
},
"required": [
"format"
],
"title": "ProbeResult",
"type": "object"
}
Fields:
-
raw(dict[str, Any]) -
format(ProbeFormat) -
streams(list[ProbeStream]) -
chapters(list[dict[str, Any]])
Validators:
-
_keep_raw