From 2b0a5674f217644d249218bd36c2620cc7ac884c Mon Sep 17 00:00:00 2001 From: Zen <46526140+master-of-zen@users.noreply.github.com> Date: Tue, 21 Jan 2020 19:27:33 +0200 Subject: [PATCH] Added Video Filter option --- av1an.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/av1an.py b/av1an.py index e6667d6..8fda2cb 100755 --- a/av1an.py +++ b/av1an.py @@ -96,18 +96,22 @@ class Av1an: parser.add_argument('--encode_pass', '-p', type=int, default=self.encode_pass, help='Specify encoding passes') parser.add_argument('--output_file', '-o', type=str, default='', help='Specify output file') parser.add_argument('--force_fps', '-fps', type=int, default=0, help='Force fps of output file') + parser.add_argument('--video_filter', '-vf', type=str, default=self.video_filter, help='FFmpeg video options') # Pass command line args that were passed self.args = parser.parse_args() self.encode_pass = self.args.encode_pass + if self.args.video_filter != self.video_filter: + self.video_filter = f' -vf {self.args.video_filter} ' + if self.args.force_fps == 0: self.force_fps = '' else: self.force_fps = f' -r {self.args.force_fps}' - self.ffmpeg_pipe = f' {self.force_fps} -pix_fmt yuv420p -f yuv4mpegpipe - |' + self.ffmpeg_pipe = f' {self.video_filter} {self.force_fps} -pix_fmt yuv420p -f yuv4mpegpipe - |' # Setting logging depending on OS if self.logging != self.args.logging: