mini_arcade_core.runtime.capture.encode_worker¶
Encode worker thread for processing video encoding jobs.
Classes¶
Job for encoding a sequence of PNG frames into a video file. |
|
Result of an encoding job. |
|
Configuration options for the EncodeWorker. |
|
Encode worker thread for processing video encoding jobs asynchronously. |
Module Contents¶
- class mini_arcade_core.runtime.capture.encode_worker.EncodeJob¶
Bases:
mini_arcade_core.runtime.capture.base_worker.BaseJobJob for encoding a sequence of PNG frames into a video file.
- Variables:
(str) (preset) – Unique identifier for the encoding job.
(str) – Path to the ffmpeg executable.
(Path) (output_path) – Directory containing the PNG frames to encode.
(Path) – Destination path for the encoded video file.
(int) (crf) – Frames per second of the input PNG sequence.
None) (output_fps (int |) – Frames per second for the output video file.
(str) – Video codec to use for encoding.
(int) – Constant Rate Factor for video quality.
(str) – Preset for video encoding speed/quality tradeoff.
(bool) (keep_frames) – Whether to keep raw frames after encoding.
- ffmpeg_path: str¶
- frames_dir: pathlib.Path¶
- output_path: pathlib.Path¶
- input_fps: int¶
- output_fps: int | None¶
- codec: str¶
- crf: int¶
- preset: str¶
- keep_frames: bool¶
- video_interpolate: bool = True¶
- class mini_arcade_core.runtime.capture.encode_worker.EncodeResult¶
Result of an encoding job.
- Variables:
- job_id: str¶
- ok: bool¶
- output_path: pathlib.Path | None = None¶
- error: str | None = None¶
- class mini_arcade_core.runtime.capture.encode_worker.EncodeWorkerConfig¶
Configuration options for the EncodeWorker.
- Variables:
(int) (queue_size) – Maximum number of jobs to queue.
None]]) (on_done (Optional[Callable[[EncodeResult],) – Optional callback invoked when a job is done.
(str) (name) – Name of the worker thread.
(bool) (daemon) – Whether the thread is a daemon thread.
- queue_size: int = 4¶
- on_done: Callable[[EncodeResult], None] | None = None¶
- name: str = 'encode-worker'¶
- daemon: bool = True¶
- class mini_arcade_core.runtime.capture.encode_worker.EncodeWorker(cfg: EncodeWorkerConfig | None = None)¶
Bases:
mini_arcade_core.runtime.capture.base_worker.BaseWorkerEncode worker thread for processing video encoding jobs asynchronously.