wed.chaptors package¶
Submodules¶
Module contents¶
- wed.chaptors.get(identifier: Union[str, wed.chaptors.base_editor.BaseWedOPEditor], **kwargs) → wed.chaptors.base_editor.BaseWedOPEditor[source]¶
Get an instance of
BaseWedOPEditor
- Parameters
identifier (Union[str, BaseWedOPEditor]) – An identifier for
BaseWedOPEditor
.- Raises
TypeError – When
identifier
is not astr
or an instance ofBaseWedOPEditor
- Returns
An instance of
BaseWedOPEditor
- Return type
- class wed.chaptors.Administorator(video_path: str)[source]¶
Bases:
wed.chaptors.base_editor.BaseVideoHandler
Administrator in charge of Editors.
- editors¶
List containing each editor
- Type
List[BaseWedOPEditor]
- set_editor(identifier: str, **kwargs) → None[source]¶
Set an editor.
- Parameters
identifier (str) – An identifier for
BaseWedOPEditor
.
- append(editor: wed.chaptors.base_editor.BaseWedOPEditor) → None[source]¶
Append an editor.
- Parameters
editor (BaseWedOPEditor) – An instance of
BaseWedOPEditor
.
- edit(frame: numpy.ndarray[Any, numpy.dtype[numpy.uint8]], pos: int) → numpy.ndarray[Any, numpy.dtype[numpy.uint8]][source]¶
Edit the image if it is an assigned chapter (
pos
)- Parameters
frame (npt.NDArray[np.uint8]) – Current frame (BGR image) in the video.
pos (int) – Current position in the video.
- Returns
Edited frame.
- Return type
npt.NDArray[np.uint8]
- export(out_path: Optional[str] = None, codec: str = 'H264')[source]¶
Create a video with each editor in
editors
.- Parameters
out_path (Optional[str], optional) – The path to the created silence video file. Defaults to
None
.codec (str, optional) – Video codec for the created video file. Defaults to
"H264"
.
- Returns
The path to the created video file.
- Return type
str