Video Codecs

Video codec configurations for MemVid.

This module provides optimized configurations for different video codecs.

class langchain_memvid.video.codecs.CodecParameters(**data)[source]

Bases: BaseModel

Base configuration for video codecs.

Parameters:
  • video_file_type (str)

  • video_fps (int)

  • frame_height (int)

  • frame_width (int)

  • video_crf (int)

  • video_preset (str)

  • video_profile (str)

  • pix_fmt (str)

  • extra_ffmpeg_args (str | None)

extra_ffmpeg_args: Optional[str]
frame_height: int
frame_width: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

pix_fmt: str
video_crf: int
video_file_type: str
video_fps: int
video_preset: str
video_profile: str
langchain_memvid.video.codecs.get_codec_parameters(codec)[source]

Get codec parameters for a given codec.

Parameters:

codec (str) – The codec to get parameters for

Return type:

Tuple[CodecParameters, bool]

Returns:

Tuple containing the codec parameters and a boolean indicating if the codec is supported