mirror of
https://github.com/vondas-network/videobeaux.git
synced 2025-12-05 15:30:02 +01:00
added effects ball_point_pen, digital_boss, ghostee, and zapruder
This commit is contained in:
18
config.yaml
18
config.yaml
@@ -16,6 +16,10 @@ bad_predator:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/bad_predator.mp4'
|
||||
|
||||
ball_point_pen:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/ball_point_pen.mp4'
|
||||
|
||||
blur_pix:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/blur_pix.mp4'
|
||||
@@ -29,6 +33,10 @@ convert:
|
||||
output_file: 'outputs/output.mkv'
|
||||
format: "avi"
|
||||
|
||||
digital_boss:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/digital_boss.mp4'
|
||||
|
||||
double_cup:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/double_cup.mp4'
|
||||
@@ -65,6 +73,10 @@ frame_delay_pro2:
|
||||
planes: "7"
|
||||
output_file: 'outputs/frame_delay_pro2.mp4'
|
||||
|
||||
ghostee:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/ghostee.mp4'
|
||||
|
||||
light_snow:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/light_snow.mp4'
|
||||
@@ -165,4 +177,8 @@ stutter_pro:
|
||||
|
||||
transcraibe:
|
||||
input_file: '/Users/rr/Downloads/trumpbiden2024.webm'
|
||||
stt_model: 'vosk-models/vosk-model-en-us-0.42-gigaspeech'
|
||||
stt_model: 'vosk-models/vosk-model-en-us-0.42-gigaspeech'
|
||||
|
||||
zapruder:
|
||||
input_file: 'inputs/input.mp4'
|
||||
output_file: 'outputs/zapruder.mp4'
|
||||
22
programs/ball_point_pen.py
Normal file
22
programs/ball_point_pen.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||
|
||||
def ball_point_pen(input_file, output_file):
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", input_file,
|
||||
"-filter_complex", "[0:v]amplify=radius=6:factor=2,bwdif=mode=send_frame:parity=bff,colorbalance=gs=-0.34:bs=0.47:rm=-0.18:gm=-0.7:bm=0.5[out_v]",
|
||||
"-map", "[out_v]",
|
||||
"-map", "0:a",
|
||||
"-c:v", "libx264",
|
||||
"-profile:v", "high",
|
||||
"-level:v", "4.2",
|
||||
"-pix_fmt", "yuv420p",
|
||||
"-movflags", "+faststart",
|
||||
"-c:a", "aac",
|
||||
"-b:a", "128",
|
||||
output_file
|
||||
]
|
||||
run_ffmpeg_command(command)
|
||||
print(f"Video processed with ball_point_pen and file is {output_file}")
|
||||
|
||||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4
|
||||
22
programs/digital_boss.py
Normal file
22
programs/digital_boss.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||
|
||||
def digital_boss(input_file, output_file):
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", input_file,
|
||||
"-filter_complex", "[0:v]huesaturation=hue=-131.18:saturation=0.56:intensity=0.18:strength=57.81:rw=0.75:gw=0.81,amplify=factor=10[out_v]",
|
||||
"-map", "[out_v]",
|
||||
"-map", "0:a",
|
||||
"-c:v", "libx264",
|
||||
"-profile:v", "high",
|
||||
"-level:v", "4.2",
|
||||
"-pix_fmt", "yuv420p",
|
||||
"-movflags", "+faststart",
|
||||
"-c:a", "aac",
|
||||
"-b:a", "128",
|
||||
output_file
|
||||
]
|
||||
run_ffmpeg_command(command)
|
||||
print(f"Video processed with digital_boss and file is {output_file}")
|
||||
|
||||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4
|
||||
22
programs/ghostee.py
Normal file
22
programs/ghostee.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||
|
||||
def ghostee(input_file, output_file):
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", input_file,
|
||||
"-filter_complex", "[0:v]amplify=radius=8:factor=4,colorbalance[out_v]",
|
||||
"-map", "[out_v]",
|
||||
"-map", "0:a",
|
||||
"-c:v", "libx264",
|
||||
"-profile:v", "high",
|
||||
"-level:v", "4.2",
|
||||
"-pix_fmt", "yuv420p",
|
||||
"-movflags", "+faststart",
|
||||
"-c:a", "aac",
|
||||
"-b:a", "128",
|
||||
output_file
|
||||
]
|
||||
run_ffmpeg_command(command)
|
||||
print(f"Video processed with ghostee and file is {output_file}")
|
||||
|
||||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4
|
||||
22
programs/zapruder.py
Normal file
22
programs/zapruder.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from utils.ffmpeg_operations import run_ffmpeg_command
|
||||
|
||||
def zapruder(input_file, output_file):
|
||||
command = [
|
||||
"ffmpeg",
|
||||
"-i", input_file,
|
||||
"-filter_complex", "[0:v]amplify=radius=2:factor=13:threshold=61889.14:tolerance=0.2,colorbalance,colorcorrect=rl=0.61:rh=0.2:bh=0.16:analyze=minmax,dctdnoiz=sigma=498.03[out_v]",
|
||||
"-map", "[out_v]",
|
||||
"-map", "0:a",
|
||||
"-c:v", "libx264",
|
||||
"-profile:v", "high",
|
||||
"-level:v", "4.2",
|
||||
"-pix_fmt", "yuv420p",
|
||||
"-movflags", "+faststart",
|
||||
"-c:a", "aac",
|
||||
"-b:a", "128",
|
||||
output_file
|
||||
]
|
||||
run_ffmpeg_command(command)
|
||||
print(f"Video processed with zapruder and file is {output_file}")
|
||||
|
||||
# ffmpeg -i shoe.mp4 -filter_complex "[0:v]shuffleplanes=map1=0:map3=2,smartblur=luma_radius=1.6:lr=2.88:luma_strength=0.11:lt=-17:cr=0.93,amplify=radius=33:factor=4:threshold=10721.12:tolerance=12[out_v]" -map "[out_v]" -map 0:a out.mp4
|
||||
@@ -10,9 +10,11 @@ from pathlib import Path
|
||||
from programs import (
|
||||
bad_contrast,
|
||||
bad_predator,
|
||||
ball_point_pen,
|
||||
blur_pix,
|
||||
broken_scroll,
|
||||
convert,
|
||||
digital_boss,
|
||||
double_cup,
|
||||
download_yt,
|
||||
extract_frames,
|
||||
@@ -20,6 +22,7 @@ from programs import (
|
||||
fever,
|
||||
frame_delay_pro1,
|
||||
frame_delay_pro2,
|
||||
ghostee,
|
||||
light_snow,
|
||||
looper_pro,
|
||||
lsd_feedback,
|
||||
@@ -39,7 +42,8 @@ from programs import (
|
||||
stack_2x,
|
||||
steel_wash,
|
||||
stutter_pro,
|
||||
transcraibe)
|
||||
transcraibe,
|
||||
zapruder)
|
||||
|
||||
from utils import load_config
|
||||
from datetime import datetime
|
||||
@@ -78,6 +82,22 @@ def bad_contrast_vb(
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
bad_contrast.bad_contrast(**params)
|
||||
|
||||
#################
|
||||
# ball_point_pen
|
||||
#################
|
||||
@app.command('ball_point_pen', help='Apply a ball point pen effect.')
|
||||
def ball_point_pen_vb(
|
||||
input_file: str = typer.Argument(None, help="Input video file"),
|
||||
output_file: str = typer.Argument(None, help="Output video file")
|
||||
):
|
||||
params = {
|
||||
"input_file": input_file,
|
||||
"output_file": output_file
|
||||
}
|
||||
defaults = config['ball_point_pen']
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
ball_point_pen.ball_point_pen(**params)
|
||||
|
||||
############
|
||||
# blur-pix
|
||||
############
|
||||
@@ -146,6 +166,22 @@ def convert_vb(
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
convert.convert(**params)
|
||||
|
||||
###########
|
||||
# digital_boss
|
||||
###########
|
||||
@app.command('digital_boss', help='Apply fever effect to video.')
|
||||
def digital_boss_vb(
|
||||
input_file: str = typer.Argument(None, help="Input video file"),
|
||||
output_file: str = typer.Argument(None, help="Output video file")
|
||||
):
|
||||
params = {
|
||||
"input_file": input_file,
|
||||
"output_file": output_file
|
||||
}
|
||||
defaults = config['digital_boss']
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
digital_boss.digital_boss(**params)
|
||||
|
||||
###########
|
||||
# fever
|
||||
###########
|
||||
@@ -271,6 +307,22 @@ def frame_delay_pro2_vb(
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
frame_delay_pro2.frame_delay_pro2(**params)
|
||||
|
||||
###########
|
||||
# ghostee
|
||||
###########
|
||||
@app.command('ghostee', help='Ghosting effect.')
|
||||
def ghostee_vb(
|
||||
input_file: str = typer.Argument(None, help="Input video file"),
|
||||
output_file: str = typer.Argument(None, help="Output video file")
|
||||
):
|
||||
params = {
|
||||
"input_file": input_file,
|
||||
"output_file": output_file
|
||||
}
|
||||
defaults = config['ghostee']
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
ghostee.ghostee(**params)
|
||||
|
||||
###########
|
||||
# light_snow
|
||||
###########
|
||||
@@ -634,6 +686,22 @@ def transcraibe_vb(
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
transcraibe.vosk_stt(**params)
|
||||
|
||||
###############
|
||||
# zapruder
|
||||
###############
|
||||
@app.command('zapruder', help='Apply zapruder effect to video file.')
|
||||
def zapruder_vb(
|
||||
input_file: str = typer.Argument(None, help='Input video file'),
|
||||
output_file: str = typer.Argument(None, help="Output video file")
|
||||
):
|
||||
params = {
|
||||
"input_file": input_file,
|
||||
"output_file": output_file
|
||||
}
|
||||
defaults = config['zapruder']
|
||||
params = {key: params.get(key) or defaults[key] for key in defaults}
|
||||
zapruder.zapruder(**params)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user