mirror of
https://github.com/vondas-network/videobeaux.git
synced 2025-12-20 06:40:02 +01:00
initial commit
This commit is contained in:
11
programs/extract_frames.py
Normal file
11
programs/extract_frames.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||
|
||||
def extract_frames(input_file, output_folder, frame_rate):
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", input_file,
|
||||
"-vf", f"fps={frame_rate}",
|
||||
f"{output_folder}/frame_%04d.png"
|
||||
]
|
||||
run_ffmpeg_command(command)
|
||||
print(f"Frames extracted from {input_file} at {frame_rate} fps and saved to {output_folder}")
|
||||
Reference in New Issue
Block a user