Skip to content

y5gfunc.source.wobbly.types

types

Advanced type definitions for Wobbly parser.

Classes:

Name Description
FieldMatchOrder

Field match order enumeration

ProcessPosition

Processing position enumeration

VideoFormat

Video format types

ResizeFilterType

Resize filter type

FrameProperties

Frame property dictionary type

ProjectKey

Project key constants

VFMParametersKey

VFM parameters key constants

SectionsKey

Sections key constants

PresetsKey

Presets key constants

CustomListsKey

Custom lists key constants

ResizeKey

Resize key constants

CropKey

Crop key constants

DepthKey

Depth key constants

InterlacedFadesKey

Interlaced fades key constants

WobblyKeys

Key constant collection for Wobbly project JSON structure

InterlacedFade

Interlaced fade information

CropSettings

Crop settings

ResizeSettings

Resize settings

DepthSettings

Depth settings

SectionInfo

Section information

PresetInfo

Preset information

CustomListInfo

Custom list information

FrozenFrameInfo

Frozen frame information

DecimationRange

Decimation range

OrphanFieldInfo

Orphan field information

TimecodeVersion
VideoResult

Video processing result protocol

Result

Operation result container

Attributes:

Name Type Description
T
R
PathLike
PresetFunction
ProjectData
FrameMap
FramePropertyMap
DecimatedFrameSet
MatchString
PresetDict
OrphanFieldDict
CycleDecimationDict
DecimationRangeList
CustomListRanges

T module-attribute

T = TypeVar('T')

R module-attribute

R = TypeVar('R')

PathLike module-attribute

PathLike = Union[str, Path]

PresetFunction module-attribute

PresetFunction = Callable[[VideoNode], VideoNode]

ProjectData module-attribute

ProjectData = dict[str, Any]

FrameMap module-attribute

FrameMap = dict[int, int]

FramePropertyMap module-attribute

FramePropertyMap = dict[int, FrameProperties]

DecimatedFrameSet module-attribute

DecimatedFrameSet = set[int]

MatchString module-attribute

MatchString = str

PresetDict module-attribute

PresetDict = dict[str, PresetFunction]

OrphanFieldDict module-attribute

OrphanFieldDict = dict[int, OrphanFieldInfo]

CycleDecimationDict module-attribute

CycleDecimationDict = dict[int, set[int]]

DecimationRangeList module-attribute

DecimationRangeList = list[DecimationRange]

CustomListRanges module-attribute

CustomListRanges = list[tuple[int, int, str, str]]

FieldMatchOrder

Bases: Enum

Field match order enumeration

Attributes:

Name Type Description
TFF
BFF

TFF class-attribute instance-attribute

TFF = 1

BFF class-attribute instance-attribute

BFF = 0

ProcessPosition

Bases: Enum

Processing position enumeration

Attributes:

Name Type Description
POST_SOURCE
POST_FIELD_MATCH
POST_DECIMATE

POST_SOURCE class-attribute instance-attribute

POST_SOURCE = 'post source'

POST_FIELD_MATCH class-attribute instance-attribute

POST_FIELD_MATCH = 'post field match'

POST_DECIMATE class-attribute instance-attribute

POST_DECIMATE = 'post decimate'

VideoFormat

Bases: Enum

Video format types

Attributes:

Name Type Description
INTEGER
FLOAT

INTEGER class-attribute instance-attribute

INTEGER = INTEGER

FLOAT class-attribute instance-attribute

FLOAT = FLOAT

ResizeFilterType

Bases: Enum

Resize filter type

Attributes:

Name Type Description
BILINEAR
BICUBIC
LANCZOS
SPLINE16
SPLINE36
POINT

BILINEAR class-attribute instance-attribute

BILINEAR = 'Bilinear'

BICUBIC class-attribute instance-attribute

BICUBIC = 'Bicubic'

LANCZOS class-attribute instance-attribute

LANCZOS = 'Lanczos'

SPLINE16 class-attribute instance-attribute

SPLINE16 = 'Spline16'

SPLINE36 class-attribute instance-attribute

SPLINE36 = 'Spline36'

POINT class-attribute instance-attribute

POINT = 'Point'

FrameProperties

Bases: TypedDict

Frame property dictionary type

Attributes:

Name Type Description
WobblyProject str
WobblyVersion str
WobblySourceFilter str
WobblyCustomList str
WobblyCustomListPreset str
WobblyCustomListPosition str
WobblySectionStart int
WobblySectionEnd int
WobblySectionPresets str
WobblyMatch str
WobblyCombed bool
WobblyInterlacedFade bool
WobblyFieldDifference float
WobblyOrphan bool
WobblyOrphanType str
WobblyOrphanDecimated bool
WobblyFrozenFrame bool
WobblyFrozenSource int
WobblyDecimated bool
WobblyCropEarly bool
WobblyCropLeft int
WobblyCropTop int
WobblyCropRight int
WobblyCropBottom int
WobblyResizeEnabled bool
WobblyResizeWidth int
WobblyResizeHeight int
WobblyResizeFilter str
WobblyDepthEnabled bool
WobblyDepthBits int
WobblyDepthFloat bool
WobblyDepthDither str
WobblyTrimStart int
WobblyTrimEnd int

WobblyProject instance-attribute

WobblyProject: str

WobblyVersion instance-attribute

WobblyVersion: str

WobblySourceFilter instance-attribute

WobblySourceFilter: str

WobblyCustomList instance-attribute

WobblyCustomList: str

WobblyCustomListPreset instance-attribute

WobblyCustomListPreset: str

WobblyCustomListPosition instance-attribute

WobblyCustomListPosition: str

WobblySectionStart instance-attribute

WobblySectionStart: int

WobblySectionEnd instance-attribute

WobblySectionEnd: int

WobblySectionPresets instance-attribute

WobblySectionPresets: str

WobblyMatch instance-attribute

WobblyMatch: str

WobblyCombed instance-attribute

WobblyCombed: bool

WobblyInterlacedFade instance-attribute

WobblyInterlacedFade: bool

WobblyFieldDifference instance-attribute

WobblyFieldDifference: float

WobblyOrphan instance-attribute

WobblyOrphan: bool

WobblyOrphanType instance-attribute

WobblyOrphanType: str

WobblyOrphanDecimated instance-attribute

WobblyOrphanDecimated: bool

WobblyFrozenFrame instance-attribute

WobblyFrozenFrame: bool

WobblyFrozenSource instance-attribute

WobblyFrozenSource: int

WobblyDecimated instance-attribute

WobblyDecimated: bool

WobblyCropEarly instance-attribute

WobblyCropEarly: bool

WobblyCropLeft instance-attribute

WobblyCropLeft: int

WobblyCropTop instance-attribute

WobblyCropTop: int

WobblyCropRight instance-attribute

WobblyCropRight: int

WobblyCropBottom instance-attribute

WobblyCropBottom: int

WobblyResizeEnabled instance-attribute

WobblyResizeEnabled: bool

WobblyResizeWidth instance-attribute

WobblyResizeWidth: int

WobblyResizeHeight instance-attribute

WobblyResizeHeight: int

WobblyResizeFilter instance-attribute

WobblyResizeFilter: str

WobblyDepthEnabled instance-attribute

WobblyDepthEnabled: bool

WobblyDepthBits instance-attribute

WobblyDepthBits: int

WobblyDepthFloat instance-attribute

WobblyDepthFloat: bool

WobblyDepthDither instance-attribute

WobblyDepthDither: str

WobblyTrimStart instance-attribute

WobblyTrimStart: int

WobblyTrimEnd instance-attribute

WobblyTrimEnd: int

ProjectKey dataclass

ProjectKey(wobbly_version: str = 'wobbly version', project_format_version: str = 'project format version', input_file: str = 'input file', input_frame_rate: str = 'input frame rate', input_resolution: str = 'input resolution', trim: str = 'trim', source_filter: str = 'source filter', user_interface: str = 'user interface', vfm_parameters: str = 'vfm parameters', matches: str = 'matches', original_matches: str = 'original matches', sections: str = 'sections', presets: str = 'presets', frozen_frames: str = 'frozen frames', combed_frames: str = 'combed frames', interlaced_fades: str = 'interlaced fades', decimated_frames: str = 'decimated frames', custom_lists: str = 'custom lists', resize: str = 'resize', crop: str = 'crop', depth: str = 'depth')

Project key constants

Attributes:

Name Type Description
wobbly_version str
project_format_version str
input_file str
input_frame_rate str
input_resolution str
trim str
source_filter str
user_interface str
vfm_parameters str
matches str
original_matches str
sections str
presets str
frozen_frames str
combed_frames str
interlaced_fades str
decimated_frames str
custom_lists str
resize str
crop str
depth str

wobbly_version class-attribute instance-attribute

wobbly_version: str = 'wobbly version'

project_format_version class-attribute instance-attribute

project_format_version: str = 'project format version'

input_file class-attribute instance-attribute

input_file: str = 'input file'

input_frame_rate class-attribute instance-attribute

input_frame_rate: str = 'input frame rate'

input_resolution class-attribute instance-attribute

input_resolution: str = 'input resolution'

trim class-attribute instance-attribute

trim: str = 'trim'

source_filter class-attribute instance-attribute

source_filter: str = 'source filter'

user_interface class-attribute instance-attribute

user_interface: str = 'user interface'

vfm_parameters class-attribute instance-attribute

vfm_parameters: str = 'vfm parameters'

matches class-attribute instance-attribute

matches: str = 'matches'

original_matches class-attribute instance-attribute

original_matches: str = 'original matches'

sections class-attribute instance-attribute

sections: str = 'sections'

presets class-attribute instance-attribute

presets: str = 'presets'

frozen_frames class-attribute instance-attribute

frozen_frames: str = 'frozen frames'

combed_frames class-attribute instance-attribute

combed_frames: str = 'combed frames'

interlaced_fades class-attribute instance-attribute

interlaced_fades: str = 'interlaced fades'

decimated_frames class-attribute instance-attribute

decimated_frames: str = 'decimated frames'

custom_lists class-attribute instance-attribute

custom_lists: str = 'custom lists'

resize class-attribute instance-attribute

resize: str = 'resize'

crop class-attribute instance-attribute

crop: str = 'crop'

depth class-attribute instance-attribute

depth: str = 'depth'

VFMParametersKey dataclass

VFMParametersKey(order: str = 'order')

VFM parameters key constants

Attributes:

Name Type Description
order str

order class-attribute instance-attribute

order: str = 'order'

SectionsKey dataclass

SectionsKey(start: str = 'start', presets: str = 'presets')

Sections key constants

Attributes:

Name Type Description
start str
presets str

start class-attribute instance-attribute

start: str = 'start'

presets class-attribute instance-attribute

presets: str = 'presets'

PresetsKey dataclass

PresetsKey(name: str = 'name', contents: str = 'contents')

Presets key constants

Attributes:

Name Type Description
name str
contents str

name class-attribute instance-attribute

name: str = 'name'

contents class-attribute instance-attribute

contents: str = 'contents'

CustomListsKey dataclass

CustomListsKey(name: str = 'name', preset: str = 'preset', position: str = 'position', frames: str = 'frames')

Custom lists key constants

Attributes:

Name Type Description
name str
preset str
position str
frames str

name class-attribute instance-attribute

name: str = 'name'

preset class-attribute instance-attribute

preset: str = 'preset'

position class-attribute instance-attribute

position: str = 'position'

frames class-attribute instance-attribute

frames: str = 'frames'

ResizeKey dataclass

ResizeKey(width: str = 'width', height: str = 'height', filter: str = 'filter', enabled: str = 'enabled')

Resize key constants

Attributes:

Name Type Description
width str
height str
filter str
enabled str

width class-attribute instance-attribute

width: str = 'width'

height class-attribute instance-attribute

height: str = 'height'

filter class-attribute instance-attribute

filter: str = 'filter'

enabled class-attribute instance-attribute

enabled: str = 'enabled'

CropKey dataclass

CropKey(early: str = 'early', left: str = 'left', top: str = 'top', right: str = 'right', bottom: str = 'bottom', enabled: str = 'enabled')

Crop key constants

Attributes:

Name Type Description
early str
left str
top str
right str
bottom str
enabled str

early class-attribute instance-attribute

early: str = 'early'

left class-attribute instance-attribute

left: str = 'left'

top class-attribute instance-attribute

top: str = 'top'

right class-attribute instance-attribute

right: str = 'right'

bottom class-attribute instance-attribute

bottom: str = 'bottom'

enabled class-attribute instance-attribute

enabled: str = 'enabled'

DepthKey dataclass

DepthKey(bits: str = 'bits', float_samples: str = 'float samples', dither: str = 'dither', enabled: str = 'enabled')

Depth key constants

Attributes:

Name Type Description
bits str
float_samples str
dither str
enabled str

bits class-attribute instance-attribute

bits: str = 'bits'

float_samples class-attribute instance-attribute

float_samples: str = 'float samples'

dither class-attribute instance-attribute

dither: str = 'dither'

enabled class-attribute instance-attribute

enabled: str = 'enabled'

InterlacedFadesKey dataclass

InterlacedFadesKey(frame: str = 'frame', field_difference: str = 'field difference')

Interlaced fades key constants

Attributes:

Name Type Description
frame str
field_difference str

frame class-attribute instance-attribute

frame: str = 'frame'

field_difference class-attribute instance-attribute

field_difference: str = 'field difference'

WobblyKeys dataclass

WobblyKeys(project: ProjectKey = ProjectKey(), vfm_parameters: VFMParametersKey = VFMParametersKey(), sections: SectionsKey = SectionsKey(), presets: PresetsKey = PresetsKey(), custom_lists: CustomListsKey = CustomListsKey(), resize: ResizeKey = ResizeKey(), crop: CropKey = CropKey(), depth: DepthKey = DepthKey(), interlaced_fades: InterlacedFadesKey = InterlacedFadesKey())

Key constant collection for Wobbly project JSON structure

Attributes:

Name Type Description
project ProjectKey
vfm_parameters VFMParametersKey
sections SectionsKey
presets PresetsKey
custom_lists CustomListsKey
resize ResizeKey
crop CropKey
depth DepthKey
interlaced_fades InterlacedFadesKey

project class-attribute instance-attribute

project: ProjectKey = field(default_factory=ProjectKey)

vfm_parameters class-attribute instance-attribute

vfm_parameters: VFMParametersKey = field(default_factory=VFMParametersKey)

sections class-attribute instance-attribute

sections: SectionsKey = field(default_factory=SectionsKey)

presets class-attribute instance-attribute

presets: PresetsKey = field(default_factory=PresetsKey)

custom_lists class-attribute instance-attribute

custom_lists: CustomListsKey = field(default_factory=CustomListsKey)

resize class-attribute instance-attribute

resize: ResizeKey = field(default_factory=ResizeKey)

crop class-attribute instance-attribute

crop: CropKey = field(default_factory=CropKey)

depth class-attribute instance-attribute

depth: DepthKey = field(default_factory=DepthKey)

interlaced_fades class-attribute instance-attribute

interlaced_fades: InterlacedFadesKey = field(default_factory=InterlacedFadesKey)

InterlacedFade dataclass

InterlacedFade(frame: int, field_difference: float = 0.0)

Interlaced fade information

Attributes:

Name Type Description
frame int
field_difference float

frame instance-attribute

frame: int

field_difference class-attribute instance-attribute

field_difference: float = 0.0

CropSettings dataclass

CropSettings(enabled: bool = False, early: bool = False, left: int = 0, top: int = 0, right: int = 0, bottom: int = 0)

Crop settings

Attributes:

Name Type Description
enabled bool
early bool
left int
top int
right int
bottom int

enabled class-attribute instance-attribute

enabled: bool = False

early class-attribute instance-attribute

early: bool = False

left class-attribute instance-attribute

left: int = 0

top class-attribute instance-attribute

top: int = 0

right class-attribute instance-attribute

right: int = 0

bottom class-attribute instance-attribute

bottom: int = 0

ResizeSettings dataclass

ResizeSettings(enabled: bool = False, width: int = 0, height: int = 0, filter: ResizeFilterType = BICUBIC)

Resize settings

Attributes:

Name Type Description
enabled bool
width int
height int
filter ResizeFilterType

enabled class-attribute instance-attribute

enabled: bool = False

width class-attribute instance-attribute

width: int = 0

height class-attribute instance-attribute

height: int = 0

filter class-attribute instance-attribute

DepthSettings dataclass

DepthSettings(enabled: bool = False, bits: int = 8, float_samples: bool = False, dither: str = '')

Depth settings

Attributes:

Name Type Description
enabled bool
bits int
float_samples bool
dither str

enabled class-attribute instance-attribute

enabled: bool = False

bits class-attribute instance-attribute

bits: int = 8

float_samples class-attribute instance-attribute

float_samples: bool = False

dither class-attribute instance-attribute

dither: str = ''

SectionInfo dataclass

SectionInfo(start: int, presets: list[str] = list())

Section information

Attributes:

Name Type Description
start int
presets list[str]

start instance-attribute

start: int

presets class-attribute instance-attribute

presets: list[str] = field(default_factory=list)

PresetInfo dataclass

PresetInfo(name: str, contents: str)

Preset information

Attributes:

Name Type Description
name str
contents str

name instance-attribute

name: str

contents instance-attribute

contents: str

CustomListInfo dataclass

CustomListInfo(name: str, preset: str, position: ProcessPosition, frames: list[tuple[int, int]] = list())

Custom list information

Attributes:

Name Type Description
name str
preset str
position ProcessPosition
frames list[tuple[int, int]]

name instance-attribute

name: str

preset instance-attribute

preset: str

position instance-attribute

position: ProcessPosition

frames class-attribute instance-attribute

frames: list[tuple[int, int]] = field(default_factory=list)

FrozenFrameInfo dataclass

FrozenFrameInfo(first: int, last: int, replacement: int)

Frozen frame information

Attributes:

Name Type Description
first int
last int
replacement int

first instance-attribute

first: int

last instance-attribute

last: int

replacement instance-attribute

replacement: int

DecimationRange dataclass

DecimationRange(start: int, end: int, dropped: int)

Decimation range

Attributes:

Name Type Description
start int
end int
dropped int

start instance-attribute

start: int

end instance-attribute

end: int

dropped instance-attribute

dropped: int

OrphanFieldInfo dataclass

OrphanFieldInfo(type: str, decimated: bool)

Orphan field information

Attributes:

Name Type Description
type str
decimated bool

type instance-attribute

type: str

decimated instance-attribute

decimated: bool

TimecodeVersion

Methods:

Name Description
is_valid

Attributes:

Name Type Description
V1
V2

V1 class-attribute instance-attribute

V1 = 'v1'

V2 class-attribute instance-attribute

V2 = 'v2'

is_valid classmethod

is_valid(version: str) -> bool
Source code in y5gfunc/source/wobbly/types.py
@classmethod
def is_valid(cls, version: str) -> bool:
    return version in (cls.V1, cls.V2)

VideoResult

Bases: Protocol

Video processing result protocol

Attributes:

Name Type Description
clip VideoNode
frame_props FramePropertyMap
frame_mapping FrameMap

clip instance-attribute

clip: VideoNode

frame_props instance-attribute

frame_props: FramePropertyMap

frame_mapping instance-attribute

frame_mapping: FrameMap

Result dataclass

Result(success: bool, value: Optional[T] = None, error: Optional[str] = None)

Bases: Generic[T]

Operation result container

Methods:

Name Description
ok

Create success result

err

Create error result

Attributes:

Name Type Description
success bool
value Optional[T]
error Optional[str]

success instance-attribute

success: bool

value class-attribute instance-attribute

value: Optional[T] = None

error class-attribute instance-attribute

error: Optional[str] = None

ok classmethod

ok(value: T) -> Result[T]

Create success result

Source code in y5gfunc/source/wobbly/types.py
@classmethod
def ok(cls, value: T) -> 'Result[T]':
    """Create success result"""
    return cls(success=True, value=value)

err classmethod

err(error: str) -> Result[T]

Create error result

Source code in y5gfunc/source/wobbly/types.py
@classmethod
def err(cls, error: str) -> 'Result[T]':
    """Create error result"""
    return cls(success=False, error=error)