From aac321458be9262eb79270b822826680af1363df Mon Sep 17 00:00:00 2001 From: Alex <15526962+AlexPresso@users.noreply.github.com> Date: Sun, 19 May 2024 16:54:42 +0200 Subject: [PATCH] fix vaapi args (#128) * fix vaapi args --- wrappers/ffmpeg.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wrappers/ffmpeg.sh b/wrappers/ffmpeg.sh index 34ab2ce..8c23ebc 100644 --- a/wrappers/ffmpeg.sh +++ b/wrappers/ffmpeg.sh @@ -60,6 +60,11 @@ handle_error() { fix_args() { while [[ $# -gt 0 ]]; do case "$1" in + -ss) + shift + args+=("-ss" "$1" "-noaccurate_seek") + ;; + -acodec) shift if [[ "$1" = "libfaac" ]]; then @@ -78,9 +83,9 @@ fix_args() { scale_h=$(echo "$arg" | sed -n 's/.*w=\([0-9]\+\):h=\([0-9]\+\).*/\2/p') if (( scale_w && scale_h )); then - arg="scale_vaapi=w=$scale_w:h=$scale_h:format=nv12,hwupload,setsar=sar=1" + arg="format=nv12|vaapi,hwupload,scale_vaapi=w=$scale_w:h=$scale_h:format=nv12,setsar=sar=1" else - arg="scale_vaapi=format=nv12,hwupload,setsar=sar=1" + arg="format=nv12|vaapi,hwupload,scale_vaapi=format=nv12,setsar=sar=1" fi fi