Skip to content

System Config F Fmpeg Dto

immichpy.client.generated.models.system_config_f_fmpeg_dto.SystemConfigFFmpegDto pydantic-model

Bases: BaseModel

SystemConfigFFmpegDto

Show JSON schema:
{
  "$defs": {
    "AudioCodec": {
      "description": "Target audio codec",
      "enum": [
        "mp3",
        "aac",
        "libopus",
        "opus",
        "pcm_s16le"
      ],
      "title": "AudioCodec",
      "type": "string"
    },
    "CQMode": {
      "description": "CQ mode",
      "enum": [
        "auto",
        "cqp",
        "icq"
      ],
      "title": "CQMode",
      "type": "string"
    },
    "ToneMapping": {
      "description": "Tone mapping",
      "enum": [
        "hable",
        "mobius",
        "reinhard",
        "disabled"
      ],
      "title": "ToneMapping",
      "type": "string"
    },
    "TranscodeHWAccel": {
      "description": "Transcode hardware acceleration",
      "enum": [
        "nvenc",
        "qsv",
        "vaapi",
        "rkmpp",
        "disabled"
      ],
      "title": "TranscodeHWAccel",
      "type": "string"
    },
    "TranscodePolicy": {
      "description": "Transcode policy",
      "enum": [
        "all",
        "optimal",
        "bitrate",
        "required",
        "disabled"
      ],
      "title": "TranscodePolicy",
      "type": "string"
    },
    "VideoCodec": {
      "description": "Target video codec",
      "enum": [
        "h264",
        "hevc",
        "vp9",
        "av1"
      ],
      "title": "VideoCodec",
      "type": "string"
    },
    "VideoContainer": {
      "description": "Accepted containers",
      "enum": [
        "mov",
        "mp4",
        "ogg",
        "webm"
      ],
      "title": "VideoContainer",
      "type": "string"
    }
  },
  "description": "SystemConfigFFmpegDto",
  "properties": {
    "accel": {
      "$ref": "#/$defs/TranscodeHWAccel"
    },
    "accelDecode": {
      "description": "Accelerated decode",
      "title": "Acceldecode",
      "type": "boolean"
    },
    "acceptedAudioCodecs": {
      "description": "Accepted audio codecs",
      "items": {
        "$ref": "#/$defs/AudioCodec"
      },
      "title": "Acceptedaudiocodecs",
      "type": "array"
    },
    "acceptedContainers": {
      "description": "Accepted containers",
      "items": {
        "$ref": "#/$defs/VideoContainer"
      },
      "title": "Acceptedcontainers",
      "type": "array"
    },
    "acceptedVideoCodecs": {
      "description": "Accepted video codecs",
      "items": {
        "$ref": "#/$defs/VideoCodec"
      },
      "title": "Acceptedvideocodecs",
      "type": "array"
    },
    "bframes": {
      "description": "B-frames",
      "maximum": 16,
      "minimum": -1,
      "title": "Bframes",
      "type": "integer"
    },
    "cqMode": {
      "$ref": "#/$defs/CQMode"
    },
    "crf": {
      "description": "CRF",
      "maximum": 51,
      "minimum": 0,
      "title": "Crf",
      "type": "integer"
    },
    "gopSize": {
      "description": "GOP size",
      "minimum": 0,
      "title": "Gopsize",
      "type": "integer"
    },
    "maxBitrate": {
      "description": "Max bitrate",
      "title": "Maxbitrate",
      "type": "string"
    },
    "preferredHwDevice": {
      "description": "Preferred hardware device",
      "title": "Preferredhwdevice",
      "type": "string"
    },
    "preset": {
      "description": "Preset",
      "title": "Preset",
      "type": "string"
    },
    "refs": {
      "description": "References",
      "maximum": 6,
      "minimum": 0,
      "title": "Refs",
      "type": "integer"
    },
    "targetAudioCodec": {
      "$ref": "#/$defs/AudioCodec"
    },
    "targetResolution": {
      "description": "Target resolution",
      "title": "Targetresolution",
      "type": "string"
    },
    "targetVideoCodec": {
      "$ref": "#/$defs/VideoCodec"
    },
    "temporalAQ": {
      "description": "Temporal AQ",
      "title": "Temporalaq",
      "type": "boolean"
    },
    "threads": {
      "description": "Threads",
      "minimum": 0,
      "title": "Threads",
      "type": "integer"
    },
    "tonemap": {
      "$ref": "#/$defs/ToneMapping"
    },
    "transcode": {
      "$ref": "#/$defs/TranscodePolicy"
    },
    "twoPass": {
      "description": "Two pass",
      "title": "Twopass",
      "type": "boolean"
    }
  },
  "required": [
    "accel",
    "accelDecode",
    "acceptedAudioCodecs",
    "acceptedContainers",
    "acceptedVideoCodecs",
    "bframes",
    "cqMode",
    "crf",
    "gopSize",
    "maxBitrate",
    "preferredHwDevice",
    "preset",
    "refs",
    "targetAudioCodec",
    "targetResolution",
    "targetVideoCodec",
    "temporalAQ",
    "threads",
    "tonemap",
    "transcode",
    "twoPass"
  ],
  "title": "SystemConfigFFmpegDto",
  "type": "object"
}

Config:

  • populate_by_name: True
  • validate_assignment: True
  • protected_namespaces: ()

Fields:

accel pydantic-field

accel: TranscodeHWAccel

Transcode hardware acceleration

accel_decode pydantic-field

accel_decode: StrictBool

Accelerated decode

accepted_audio_codecs pydantic-field

accepted_audio_codecs: List[AudioCodec]

Accepted audio codecs

accepted_containers pydantic-field

accepted_containers: List[VideoContainer]

Accepted containers

accepted_video_codecs pydantic-field

accepted_video_codecs: List[VideoCodec]

Accepted video codecs

bframes pydantic-field

bframes: Annotated[int, Field(le=16, strict=True, ge=-1)]

B-frames

cq_mode pydantic-field

cq_mode: CQMode

CQ mode

crf pydantic-field

crf: Annotated[int, Field(le=51, strict=True, ge=0)]

CRF

gop_size pydantic-field

gop_size: Annotated[int, Field(strict=True, ge=0)]

GOP size

max_bitrate pydantic-field

max_bitrate: StrictStr

Max bitrate

preferred_hw_device pydantic-field

preferred_hw_device: StrictStr

Preferred hardware device

preset pydantic-field

preset: StrictStr

Preset

refs pydantic-field

refs: Annotated[int, Field(le=6, strict=True, ge=0)]

References

target_audio_codec pydantic-field

target_audio_codec: AudioCodec

Target audio codec

target_resolution pydantic-field

target_resolution: StrictStr

Target resolution

target_video_codec pydantic-field

target_video_codec: VideoCodec

Target video codec

temporal_aq pydantic-field

temporal_aq: StrictBool

Temporal AQ

threads pydantic-field

threads: Annotated[int, Field(strict=True, ge=0)]

Threads

tonemap pydantic-field

tonemap: ToneMapping

Tone mapping

transcode pydantic-field

transcode: TranscodePolicy

Transcode policy

two_pass pydantic-field

two_pass: StrictBool

Two pass

from_dict classmethod

from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]

Create an instance of SystemConfigFFmpegDto from a dict

Source code in immichpy/client/generated/models/system_config_f_fmpeg_dto.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SystemConfigFFmpegDto from a dict"""
    if obj is None:
        return None

    if not isinstance(obj, dict):
        return cls.model_validate(obj)

    _obj = cls.model_validate(
        {
            "accel": obj.get("accel"),
            "accelDecode": obj.get("accelDecode"),
            "acceptedAudioCodecs": obj.get("acceptedAudioCodecs"),
            "acceptedContainers": obj.get("acceptedContainers"),
            "acceptedVideoCodecs": obj.get("acceptedVideoCodecs"),
            "bframes": obj.get("bframes"),
            "cqMode": obj.get("cqMode"),
            "crf": obj.get("crf"),
            "gopSize": obj.get("gopSize"),
            "maxBitrate": obj.get("maxBitrate"),
            "preferredHwDevice": obj.get("preferredHwDevice"),
            "preset": obj.get("preset"),
            "refs": obj.get("refs"),
            "targetAudioCodec": obj.get("targetAudioCodec"),
            "targetResolution": obj.get("targetResolution"),
            "targetVideoCodec": obj.get("targetVideoCodec"),
            "temporalAQ": obj.get("temporalAQ"),
            "threads": obj.get("threads"),
            "tonemap": obj.get("tonemap"),
            "transcode": obj.get("transcode"),
            "twoPass": obj.get("twoPass"),
        }
    )
    return _obj

from_json classmethod

from_json(json_str: str) -> Optional[Self]

Create an instance of SystemConfigFFmpegDto from a JSON string

Source code in immichpy/client/generated/models/system_config_f_fmpeg_dto.py
120
121
122
123
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SystemConfigFFmpegDto from a JSON string"""
    return cls.from_dict(json.loads(json_str))

to_dict

to_dict() -> Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
Source code in immichpy/client/generated/models/system_config_f_fmpeg_dto.py
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
def to_dict(self) -> Dict[str, Any]:
    """Return the dictionary representation of the model using alias.

    This has the following differences from calling pydantic's
    `self.model_dump(by_alias=True)`:

    * `None` is only added to the output dict for nullable fields that
      were set at model initialization. Other fields with value `None`
      are ignored.
    """
    excluded_fields: Set[str] = set([])

    _dict = self.model_dump(
        by_alias=True,
        exclude=excluded_fields,
        exclude_none=True,
    )
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/system_config_f_fmpeg_dto.py
115
116
117
118
def to_json(self) -> str:
    """Returns the JSON representation of the model using alias"""
    # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
    return json.dumps(self.to_dict())

to_str

to_str() -> str

Returns the string representation of the model using alias

Source code in immichpy/client/generated/models/system_config_f_fmpeg_dto.py
111
112
113
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))