summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-01-04 04:20:42 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-01-04 04:20:42 +0530
commit4839471e4f508b507259645e1ba38f1b414cd789 (patch)
tree02f3e3b379253a39dd42423539df779e1123909e
Initial CommitHEADmain
-rw-r--r--ffvhs.py18
1 files changed, 18 insertions, 0 deletions
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)