From 4839471e4f508b507259645e1ba38f1b414cd789 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Wed, 4 Jan 2023 04:20:42 +0530 Subject: Initial Commit --- ffvhs.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ffvhs.py diff --git a/ffvhs.py b/ffvhs.py new file mode 100644 index 0000000..70889eb --- /dev/null +++ b/ffvhs.py @@ -0,0 +1,18 @@ +import subprocess + +# prompt user for input video +input_file = input("Enter the input video file name: ") + +# set overlay file +overlay_file = "overlay.mp4" + +# Append output file with -vhs +output_file = input_file+"-vhs.mp4" + +# run ffmpeg command to resize the video to 480x480, add overlay, and create VHS effect +ffmpeg_command = f"ffmpeg -i {input_file} -i {overlay_file} -filter_complex \ +'[0:v]scale=480:480[v]; [1:v]scale=480:480[i]; [v][i]overlay[out]; \ +[out]curves=vintage,curves=preset=vintage,curves=vintage[out]' -map '[out]' {output_file}" + +# execute the ffmpeg command +subprocess.run(ffmpeg_command, shell=True) -- cgit v1.2.3