From 4d1ae63689b2a492960a7b961c2be734ca6063d1 Mon Sep 17 00:00:00 2001 From: Ditin2 Mk 3 Date: Tue, 23 Dec 2025 02:36:57 +0100 Subject: [PATCH] Fix multiple video filters not applying --- .gitignore | 1 + ReencodeFfmpeg.pb | 21 +++++++++++++++++---- ReencodeFfmpeg.pbp | 6 +++--- 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adb36c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.exe \ No newline at end of file diff --git a/ReencodeFfmpeg.pb b/ReencodeFfmpeg.pb index f043004..eef73b3 100644 --- a/ReencodeFfmpeg.pb +++ b/ReencodeFfmpeg.pb @@ -386,6 +386,7 @@ Procedure.s BuildFFmpegArgs() Debug("Running") filters$ = "" preset$= "" + NewList VidFilters.s() videofilter$ = "" start$ = "" duration$ = "" @@ -423,13 +424,25 @@ Procedure.s BuildFFmpegArgs() Debug(height) Debug(width) If height <> -1 Or width <> -1 - videofilter$ + "-vf scale=" + Str(width) + ":" + Str(height) + " " + AddElement(VidFilters()) + VidFilters() = "scale=" + Str(width) + ":" + Str(height) EndIf ; ----------------- FPS Changing ----------------- fps = GetGadgetState(fps_spin) If fps <> -1 - videofilter$ + "-vf fps=" + Str(fps) + " " + AddElement(VidFilters()) + VidFilters() = "fps=" + Str(fps) + EndIf + + ; ----------------- Actually construct the video filter arg ----------------- + If ListSize(VidFilters()) > 0 + videofilter$ = ~"-vf \"" + ForEach VidFilters() + videofilter$ + VidFilters() + videofilter$ + "," + Next + videofilter$ = Left(videofilter$, Len(videofilter$) - 1) + ~"\" " EndIf ; ----------------- Cutting ----------------- @@ -1004,8 +1017,8 @@ Repeat Until Event = #PB_Event_CloseWindow ; Quit on any window close ; IDE Options = PureBasic 6.20 (Windows - x64) -; CursorPosition = 583 -; FirstLine = 459 +; CursorPosition = 427 +; FirstLine = 302 ; Folding = Beug0 ; EnableXP ; DPIAware \ No newline at end of file diff --git a/ReencodeFfmpeg.pbp b/ReencodeFfmpeg.pbp index 0d6b06e..8a30b64 100644 --- a/ReencodeFfmpeg.pbp +++ b/ReencodeFfmpeg.pbp @@ -7,16 +7,16 @@
- +
- + - +