vikit.postprocessing.subtitles.simple_video_subtitle_renderer

Overview

Classes

SimpleVideoSubtitleRenderer

A subtitle renderer with sensible parameter defaults for simple use cases.

Classes

class vikit.postprocessing.subtitles.simple_video_subtitle_renderer.SimpleVideoSubtitleRenderer(font_path=ARIAL_TTF_PATH, font_size_pt=None, margin_bottom_ratio=0.04, margin_h_ratio=0.05)

A subtitle renderer with sensible parameter defaults for simple use cases.

Delegates the rendering to the VideoSubtitleRenderer class which can also be used directly if finer control is needed.

Overview

Methods

add_subtitles_to_video(input_video_path, subtitle_srt_filepath, output_video_path, text_color, highlight_color, highlight_opacity)

-

Members

add_subtitles_to_video(input_video_path: str, subtitle_srt_filepath: str, output_video_path: str, text_color: str = 'white', highlight_color: str = 'black', highlight_opacity: float = 0.7) None

Attributes

vikit.postprocessing.subtitles.simple_video_subtitle_renderer.FONT_SIZE_RATIO = 0.045
vikit.postprocessing.subtitles.simple_video_subtitle_renderer.PIXEL_TO_POINT = 0.75