diff --git a/README.md b/README.md index 6e6b2a5..1b894ec 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,18 @@ | Program | Description | | -------- | ------- | | bad_contrast | Apply a bad constrast effect | +| ball_point_pen | Apply a ball point pen style effect | | blur_pix | Extracting the silence out of a video file | | bad_predator | Apply bad Predator heat vision effect | | convert | Simple video file convert | +| digital_boss | Apply busted gameboy style digital boss effect | | double_cup | Apply the effect of purple drank | | download_yt | Video ripper | | extract_frames | Extract individuals frames from a video file as PNGs | | extract_sound | Extract audio from video file | | frame_delay_pro1 | Apply frame delay effect with parameter input | | frame_delay_pro2 | Apply frame delay effect with parameter input | +| ghostee | Apply a slight ghost effect | | looper_pro | Apply video looper effect base on frame size & start frame | | lsd_feedback | Apply LSD-like frame delay effect | | mirror_delay | Apply a frame delay plus a mirrored effect | @@ -35,6 +38,7 @@ | steel_wash | Apply steel blue filter to video | | stutter_pro | Apply frame stutter effect with definable parameters | | transraibe | AI-based transcription tool | +| zapruder | Apply zapruder-film like effect | ## Dependencies FFmpeg is required for the project. Install *ffmpeg* using [Homebrew](https://formulae.brew.sh/formula/ffmpeg) @@ -124,6 +128,10 @@ bad_predator https://github.com/vondas-network/videobeaux/assets/7625379/0968ad50-cc97-4336-938f-01b47d86a7bd +ball_point_pen + +https://github.com/user-attachments/assets/10e703a5-5036-4c3e-83f6-be04476ad089 + blur_pix https://github.com/vondas-network/videobeaux/assets/7625379/65403294-3e34-4ff8-816a-5de7c80c811d @@ -132,6 +140,10 @@ broken_scroll https://github.com/vondas-network/videobeaux/assets/7625379/4cdebccc-8519-45c6-aded-089db73d20d2 +digital_boss + +https://github.com/user-attachments/assets/23958066-f384-4801-9d91-5b2df6081a31 + double_cup https://github.com/vondas-network/videobeaux/assets/7625379/83d30a18-40d1-42e4-aff3-dbd50d67a7d1 @@ -164,6 +176,10 @@ frame_delay_pro2-3 https://github.com/vondas-network/videobeaux/assets/7625379/f717d419-687b-4cc3-ac07-64f45c763531 +ghostee + +https://github.com/user-attachments/assets/87c8b569-5165-485d-ae09-7a8bbbe74051 + lsd_feedback https://github.com/vondas-network/videobeaux/assets/7625379/9653929c-30ad-4c72-81c8-e3777c590783 @@ -235,3 +251,7 @@ https://github.com/vondas-network/videobeaux/assets/7625379/e6d8c14a-9f20-4365-b stutter_pro-3 https://github.com/vondas-network/videobeaux/assets/7625379/864835ba-dc9d-4392-aa77-2cc062e2b700 + +zapruder + +https://github.com/user-attachments/assets/cad79483-b21f-43b8-a1cd-91ed8406574a diff --git a/config.yaml b/config.yaml index 810b12a..6848282 100644 --- a/config.yaml +++ b/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' \ No newline at end of file + stt_model: 'vosk-models/vosk-model-en-us-0.42-gigaspeech' + +zapruder: + input_file: 'inputs/input.mp4' + output_file: 'outputs/zapruder.mp4' \ No newline at end of file diff --git a/programs/ball_point_pen.py b/programs/ball_point_pen.py new file mode 100644 index 0000000..8aa7e91 --- /dev/null +++ b/programs/ball_point_pen.py @@ -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 diff --git a/programs/digital_boss.py b/programs/digital_boss.py new file mode 100644 index 0000000..0ba2db3 --- /dev/null +++ b/programs/digital_boss.py @@ -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 diff --git a/programs/ghostee.py b/programs/ghostee.py new file mode 100644 index 0000000..4d540d9 --- /dev/null +++ b/programs/ghostee.py @@ -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 diff --git a/programs/zapruder.py b/programs/zapruder.py new file mode 100644 index 0000000..45d7d4c --- /dev/null +++ b/programs/zapruder.py @@ -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 diff --git a/videobeaux.py b/videobeaux.py index 747628d..e514fc4 100644 --- a/videobeaux.py +++ b/videobeaux.py @@ -10,9 +10,11 @@ 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 @@ fever, frame_delay_pro1, frame_delay_pro2, + ghostee, light_snow, looper_pro, lsd_feedback, @@ -39,7 +42,8 @@ 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()