mirror of
https://github.com/vondas-network/videobeaux.git
synced 2025-12-11 18:35:01 +01:00
added looper_pro
This commit is contained in:
@@ -49,6 +49,13 @@ frame_delay_pro2:
|
|||||||
planes: "7"
|
planes: "7"
|
||||||
output_file: 'outputs/frame_delay_pro2.mp4'
|
output_file: 'outputs/frame_delay_pro2.mp4'
|
||||||
|
|
||||||
|
looper_pro:
|
||||||
|
input_file: 'inputs/input.mp4'
|
||||||
|
loop_count: '3'
|
||||||
|
size_in_frames: '20'
|
||||||
|
start_frame: '10'
|
||||||
|
output_file: 'outputs/looper_pro.mp4'
|
||||||
|
|
||||||
lsd_feedback:
|
lsd_feedback:
|
||||||
input_file: 'inputs/input.mp4'
|
input_file: 'inputs/input.mp4'
|
||||||
#frame_weights: 1 1 -3 2 1 1 -3 1
|
#frame_weights: 1 1 -3 2 1 1 -3 1
|
||||||
|
|||||||
12
programs/looper_pro.py
Normal file
12
programs/looper_pro.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||||
|
|
||||||
|
def looper_pro(input_file, loop_count, size_in_frames, start_frame, output_file):
|
||||||
|
command = [
|
||||||
|
"ffmpeg",
|
||||||
|
"-i", input_file,
|
||||||
|
"-filter_complex", f"[0:v]loop=loop={loop_count}:size={size_in_frames}:start={start_frame}[out_v]",
|
||||||
|
"-map", "[out_v]",
|
||||||
|
output_file
|
||||||
|
]
|
||||||
|
run_ffmpeg_command(command)
|
||||||
|
print(f"Video processed with looper_pro and file is {output_file}")
|
||||||
@@ -17,6 +17,7 @@ from programs import (
|
|||||||
extract_sound,
|
extract_sound,
|
||||||
frame_delay_pro1,
|
frame_delay_pro1,
|
||||||
frame_delay_pro2,
|
frame_delay_pro2,
|
||||||
|
looper_pro,
|
||||||
lsd_feedback,
|
lsd_feedback,
|
||||||
mirror_delay,
|
mirror_delay,
|
||||||
nostalgic_stutter,
|
nostalgic_stutter,
|
||||||
@@ -214,6 +215,28 @@ def lsd_feedback_vb(
|
|||||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||||
lsd_feedback.lsd_feedback(**params)
|
lsd_feedback.lsd_feedback(**params)
|
||||||
|
|
||||||
|
#################
|
||||||
|
# looper-pro
|
||||||
|
#################
|
||||||
|
@app.command('looper-pro', help='Apply scrolling pro effect to video file.')
|
||||||
|
def scrolling_pro_video(
|
||||||
|
input_file: str = typer.Argument(None, help="Input video file"),
|
||||||
|
loop_count: str = typer.Argument(None, help="Horizontal scroll parameter"),
|
||||||
|
size_in_frames: str = typer.Argument(None, help="Vertical scroll parameter"),
|
||||||
|
start_frame: str = typer.Argument(None, help="Vertical scroll parameter"),
|
||||||
|
output_file: str = typer.Argument(None, help="Output video file")
|
||||||
|
):
|
||||||
|
params = {
|
||||||
|
"input_file": input_file,
|
||||||
|
"loop_count": loop_count,
|
||||||
|
"size_in_frames": size_in_frames,
|
||||||
|
"start_frame": start_frame,
|
||||||
|
"output_file": output_file
|
||||||
|
}
|
||||||
|
defaults = config['looper_pro']
|
||||||
|
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||||
|
looper_pro.looper_pro(**params)
|
||||||
|
|
||||||
################
|
################
|
||||||
# mirror-delay
|
# mirror-delay
|
||||||
################
|
################
|
||||||
@@ -372,7 +395,7 @@ def scrolling_pro_video(
|
|||||||
params = {
|
params = {
|
||||||
"input_file": input_file,
|
"input_file": input_file,
|
||||||
"horizontal": horizontal,
|
"horizontal": horizontal,
|
||||||
"verticla": vertical,
|
"vertical": vertical,
|
||||||
"output_file": output_file
|
"output_file": output_file
|
||||||
}
|
}
|
||||||
defaults = config['scrolling_pro']
|
defaults = config['scrolling_pro']
|
||||||
|
|||||||
Reference in New Issue
Block a user