Fix framerate and audio sync issues

This commit is contained in:
henryruhs 2023-06-11 12:16:49 +02:00
parent 1bf2c37675
commit 3e12f2a5c1

View File

@ -42,7 +42,7 @@ def extract_frames(target_path: str) -> None:
def create_video(target_path: str, fps: int) -> None:
temp_output_path = get_temp_output_path(target_path)
temp_directory_path = get_temp_directory_path(target_path)
run_ffmpeg(['-i', os.path.join(temp_directory_path, '%04d.png'), '-framerate', str(fps), '-c:v', roop.globals.video_encoder, '-crf', str(roop.globals.video_quality), '-pix_fmt', 'yuv420p', '-y', temp_output_path])
run_ffmpeg(['-r', str(fps), '-i', os.path.join(temp_directory_path, '%04d.png'), '-c:v', roop.globals.video_encoder, '-crf', str(roop.globals.video_quality), '-pix_fmt', 'yuv420p', '-y', temp_output_path])
def restore_audio(target_path: str, output_path: str) -> None: