Skip to content

Commit

Permalink
Fix fps mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Jul 16, 2023
1 parent 855b8e2 commit e1d7f00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion roop/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def detect_fps(target_path: str) -> float:

def extract_frames(target_path: str) -> None:
temp_directory_path = get_temp_directory_path(target_path)
run_ffmpeg(['-i', target_path, '-pix_fmt', 'rgb24', os.path.join(temp_directory_path, '%04d.png')])
command = ['-i', target_path, '-pix_fmt', 'rgb24']
if not roop.globals.keep_fps:
command.extend(['-vf', 'fps=30'])
command.extend([os.path.join(temp_directory_path, '%04d.png')])
run_ffmpeg(command)


def create_video(target_path: str, fps: float = 30.0) -> None:
Expand Down

0 comments on commit e1d7f00

Please sign in to comment.