diff options
-rw-r--r-- | ffvhs.py | 18 |
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) |