From c9aa8b2d3714bd63cf0c99622b6cbb13f48905a8 Mon Sep 17 00:00:00 2001 From: q3aql Date: Fri, 10 Feb 2023 18:38:08 +0100 Subject: [PATCH] Update deprecated -vsync to -fps_mode --- src/ks-avi | 4 ++-- src/ks-crop | 4 ++-- src/ks-mix | 22 +++++++++++----------- src/ks-mp4 | 4 ++-- src/ks-mp4k | 4 ++-- src/ks-mp4s | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/ks-avi b/src/ks-avi index c4d60a1..d875fca 100755 --- a/src/ks-avi +++ b/src/ks-avi @@ -198,8 +198,8 @@ fi p_ffmpeg="ffmpeg -i" p_ffmpeg_patched="-max_muxing_queue_size 9999" # f_conversion="-vsync 1 -async 1" # Deprecated method -#f_conversion="-vsync cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f_conversion="-vsync cfr -af aresample=async=1" +#f_conversion="-fps_mode cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" +f_conversion="-fps_mode cfr -af aresample=async=1" # Check if video input uses H265 (HEVC) codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265") codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc") diff --git a/src/ks-crop b/src/ks-crop index 191cae4..01d2c14 100755 --- a/src/ks-crop +++ b/src/ks-crop @@ -137,8 +137,8 @@ function errorReadingFile() { p_ffmpeg="ffmpeg -i" p_ffmpeg_patched="-max_muxing_queue_size 9999" # f_conversion="-vsync 1 -async 1" # Deprecated method -f_conversion="-vsync cfr" -f_conversion_crop="-vsync cfr -async 1" +f_conversion="-fps_mode cfr" +f_conversion_crop="-fps_mode cfr -async 1" # Check if video input uses H265 (HEVC) codec_h265=$(${p_ffmpeg} "${2}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265") codec_hevc=$(${p_ffmpeg} "${2}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc") diff --git a/src/ks-mix b/src/ks-mix index 255a800..573edfd 100755 --- a/src/ks-mix +++ b/src/ks-mix @@ -135,7 +135,7 @@ elif [ "${1}" == "-evid" ] ; then echo -n "* Starting extract video track (${2}) " sleep 3 ffmpeg -y -i "${2}" -map ${video_track} -c:v copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir}" sleep 2 @@ -208,7 +208,7 @@ elif [ "${1}" == "-ev25" ] ; then if [ "${codec_encoded}" == "h264_encoded" ] ; then ffmpeg -y -i "${2}" -map ${video_track} -c copy -f h264 "${current_dir}/seeing_noaudio.h264" ffmpeg -y -r 25 -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -221,7 +221,7 @@ elif [ "${1}" == "-ev25" ] ; then ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264" rm -rf "${current_dir}/temp-h265.mkv" ffmpeg -y -r 25 -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -235,7 +235,7 @@ elif [ "${1}" == "-ev25" ] ; then ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264" rm -rf "${current_dir}/temp-h265.mkv" ffmpeg -y -r 25 -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -248,7 +248,7 @@ elif [ "${1}" == "-ev25" ] ; then ffmpeg -y -i "${current_dir}/temp-mpeg4.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264" rm -rf "${current_dir}/temp-mpeg4.mkv" ffmpeg -y -r 25 -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -330,7 +330,7 @@ elif [ "${1}" == "-evpf" ] ; then if [ "${codec_encoded}" == "h264_encoded" ] ; then ffmpeg -y -i "${2}" -map ${video_track} -c copy -f h264 "${current_dir}/seeing_noaudio.h264" ffmpeg -y -r ${frames_default} -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -343,7 +343,7 @@ elif [ "${1}" == "-evpf" ] ; then ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264" rm -rf "${current_dir}/temp-h265.mkv" ffmpeg -y -r ${frames_default} -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -357,7 +357,7 @@ elif [ "${1}" == "-evpf" ] ; then ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264" rm -rf "${current_dir}/temp-h265.mkv" ffmpeg -y -r 25 -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -370,7 +370,7 @@ elif [ "${1}" == "-evpf" ] ; then ffmpeg -y -i "${current_dir}/temp-mpeg4.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264" rm -rf "${current_dir}/temp-mpeg4.mkv" ffmpeg -y -r ${frames_default} -i "${current_dir}/seeing_noaudio.h264" -c copy "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir} (25 fps)" sleep 2 @@ -613,7 +613,7 @@ elif [ "${1}" == "-evti" ] ; then echo -n "* Starting extract video track (${2}) " sleep 3 ffmpeg -y -i "${2}" -map ${video_track} -c:v copy -ss ${hourCut}:${minuteCut}:${secondCut} "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir}" sleep 2 @@ -723,7 +723,7 @@ elif [ "${1}" == "-evti" ] ; then echo -n "* Starting extract video track (${2}) " sleep 3 ffmpeg -y -i "${2}" -map ${video_track} -c:v copy -ss ${hourCut}:${minuteCut}:${secondCut} -t ${hourCutAfter}:${minuteCutAfter}:${secondCutAfter} "${current_dir}/seeing.mp4" - ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -vsync cfr -c:v copy "${video_file_dir}" + ffmpeg -y -i "${current_dir}/seeing.mp4" -map 0:0 -fps_mode cfr -c:v copy "${video_file_dir}" echo "" echo -n "* Extracted video into ${video_file_dir}" sleep 2 diff --git a/src/ks-mp4 b/src/ks-mp4 index e72b72c..94f0ba3 100755 --- a/src/ks-mp4 +++ b/src/ks-mp4 @@ -198,8 +198,8 @@ fi p_ffmpeg="ffmpeg -i" p_ffmpeg_patched="-max_muxing_queue_size 9999" # f_conversion="-vsync 1 -async 1" # Deprecated method -#f_conversion="-vsync cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f_conversion="-vsync cfr -af aresample=async=1" +#f_conversion="-fps_mode cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" +f_conversion="-fps_mode cfr -af aresample=async=1" # Check if video input uses H265 (HEVC) codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265") codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc") diff --git a/src/ks-mp4k b/src/ks-mp4k index a6b5d15..a8c8062 100755 --- a/src/ks-mp4k +++ b/src/ks-mp4k @@ -198,8 +198,8 @@ fi p_ffmpeg="ffmpeg -i" p_ffmpeg_patched="-max_muxing_queue_size 9999" # f_conversion="-vsync 1 -async 1" # Deprecated method -#f_conversion="-vsync cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f_conversion="-vsync cfr -af aresample=async=1" +#f_conversion="-fps_mode cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" +f_conversion="-fps_mode cfr -af aresample=async=1" # Check if video input uses H265 (HEVC) codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265") codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc") diff --git a/src/ks-mp4s b/src/ks-mp4s index a00d992..392b94f 100755 --- a/src/ks-mp4s +++ b/src/ks-mp4s @@ -198,8 +198,8 @@ fi p_ffmpeg="ffmpeg -i" p_ffmpeg_patched="-max_muxing_queue_size 9999" # f_conversion="-vsync 1 -async 1" # Deprecated method -#f_conversion="-vsync cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f_conversion="-vsync cfr -af aresample=async=1" +#f_conversion="-fps_mode cfr -af aresample=async=1:min_hard_comp=0.100000:first_pts=0" +f_conversion="-fps_mode cfr -af aresample=async=1" # Check if video input uses H265 (HEVC) codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265") codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc")