def process_video_and_subtitles(video_path, subtitle_path, output_folder):
    """
    Full processing of video and subtitles.
    """
    if not os.path.exists(output_folder):
        os.makedirs(output_folder)

    base_name = os.path.splitext(os.path.basename(video_path))[0]
    adjusted_subtitle_path = os.path.join(output_folder, base_name + '_adjusted.srt')
    utf8_subtitle_path = os.path.join(output_folder, base_name + '_utf8.srt')
    output_video_path = os.path.join(output_folder, base_name + '_subtitled.mp4')

    adjust_subtitle_timing(subtitle_path, adjusted_subtitle_path)
    convert_to_utf8(adjusted_subtitle_path, utf8_subtitle_path)
    burn_subtitles(video_path, utf8_subtitle_path, output_video_path)

    os.remove(adjusted_subtitle_path)
    os.remove(utf8_subtitle_path)
    logging.info("Temporary subtitle files removed.")

    Full processing of video and subtitles.
    
subtitler.py