vsmuxtools.video.hdr.helpers
Reusable Dolby Vision and HDR10+ metadata sidecar builders.
DolbyVision
DolbyVision(source: PathLike | src_file | FileMixin | GlobSearch, *, track: int = 0, metadata_path: PathLike = None, profile: str | int | float | None = None)
Bases: _DynamicMetadata
Build Dolby Vision RPU sidecars with dovi_tool.
Source code in
vsmuxtools/video/hdr/helpers.py
resolved_profile
property
Return the canonical source or explicitly requested Dolby Vision profile.
Returns:
| Type | Description |
|---|---|
str
|
A canonical profile string, preserving unknown Profile 8 compatibility. |
from_file
classmethod
Create a helper from an existing Dolby Vision RPU sidecar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
PathLike
|
Existing RPU sidecar. |
required |
track
|
int
|
Source video-track index, retained for compatibility; no extraction occurs. |
0
|
profile
|
str | int | float | None
|
Optional source profile, e.g. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
A lazy metadata helper backed by the sidecar. |
Source code in
vsmuxtools/video/hdr/helpers.py
convert_profile
Request an explicit RPU conversion to Dolby Vision Profile 8.1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile
|
str | int | float
|
Target profile; only P5/P7 to 8.1 is supported. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
This helper, with conversion deferred until P5 conversion changes RPU signaling only; the caller must convert pixels separately. P7 FEL handling likewise remains the caller's responsibility. |
Source code in
vsmuxtools/video/hdr/helpers.py
crop_active_area
Reset active-area offsets to zero for all or selected frames.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frames
|
Trim | list[int | None] | Sequence[Trim] | None
|
Optional current-timeline ranges receiving the crop. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
This helper, with the active-area edit queued for |
Source code in
vsmuxtools/video/hdr/helpers.py
active_area
active_area(left: int, top: int, right: int, bottom: int, *, frames: Trim | list[int | None] | Sequence[Trim] | None = None) -> Self
Set explicit active-area offsets for all or selected frames.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
left
|
int
|
Active-area left offset in pixels. |
required |
top
|
int
|
Active-area top offset in pixels. |
required |
right
|
int
|
Active-area right offset in pixels. |
required |
bottom
|
int
|
Active-area bottom offset in pixels. |
required |
frames
|
Trim | list[int | None] | Sequence[Trim] | None
|
Optional current-timeline ranges receiving the offsets. |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
This helper, with the active-area edit queued for |
Source code in
vsmuxtools/video/hdr/helpers.py
HDR10Plus
HDR10Plus(source: PathLike | src_file | FileMixin | GlobSearch, *, track: int = 0, metadata_path: PathLike = None)
Bases: _DynamicMetadata
Build HDR10+ JSON sidecars with hdr10plus_tool.