Update deprecated -vsync to -fps_mode
This commit is contained in:
parent
573f92e978
commit
c9aa8b2d37
|
@ -198,8 +198,8 @@ fi
|
||||||
p_ffmpeg="ffmpeg -i"
|
p_ffmpeg="ffmpeg -i"
|
||||||
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
||||||
# f_conversion="-vsync 1 -async 1" # Deprecated method
|
# 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="-fps_mode 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"
|
||||||
# Check if video input uses H265 (HEVC)
|
# Check if video input uses H265 (HEVC)
|
||||||
codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265")
|
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")
|
codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc")
|
||||||
|
|
|
@ -137,8 +137,8 @@ function errorReadingFile() {
|
||||||
p_ffmpeg="ffmpeg -i"
|
p_ffmpeg="ffmpeg -i"
|
||||||
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
||||||
# f_conversion="-vsync 1 -async 1" # Deprecated method
|
# f_conversion="-vsync 1 -async 1" # Deprecated method
|
||||||
f_conversion="-vsync cfr"
|
f_conversion="-fps_mode cfr"
|
||||||
f_conversion_crop="-vsync cfr -async 1"
|
f_conversion_crop="-fps_mode cfr -async 1"
|
||||||
# Check if video input uses H265 (HEVC)
|
# Check if video input uses H265 (HEVC)
|
||||||
codec_h265=$(${p_ffmpeg} "${2}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265")
|
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")
|
codec_hevc=$(${p_ffmpeg} "${2}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc")
|
||||||
|
|
22
src/ks-mix
22
src/ks-mix
|
@ -135,7 +135,7 @@ elif [ "${1}" == "-evid" ] ; then
|
||||||
echo -n "* Starting extract video track (${2}) "
|
echo -n "* Starting extract video track (${2}) "
|
||||||
sleep 3
|
sleep 3
|
||||||
ffmpeg -y -i "${2}" -map ${video_track} -c:v copy "${current_dir}/seeing.mp4"
|
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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir}"
|
echo -n "* Extracted video into ${video_file_dir}"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -208,7 +208,7 @@ elif [ "${1}" == "-ev25" ] ; then
|
||||||
if [ "${codec_encoded}" == "h264_encoded" ] ; 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 -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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
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"
|
ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264"
|
||||||
rm -rf "${current_dir}/temp-h265.mkv"
|
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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
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"
|
ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264"
|
||||||
rm -rf "${current_dir}/temp-h265.mkv"
|
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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
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"
|
ffmpeg -y -i "${current_dir}/temp-mpeg4.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264"
|
||||||
rm -rf "${current_dir}/temp-mpeg4.mkv"
|
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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -330,7 +330,7 @@ elif [ "${1}" == "-evpf" ] ; then
|
||||||
if [ "${codec_encoded}" == "h264_encoded" ] ; 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 -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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
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"
|
ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264"
|
||||||
rm -rf "${current_dir}/temp-h265.mkv"
|
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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
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"
|
ffmpeg -y -i "${current_dir}/temp-h265.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264"
|
||||||
rm -rf "${current_dir}/temp-h265.mkv"
|
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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
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"
|
ffmpeg -y -i "${current_dir}/temp-mpeg4.mkv" -c copy -f h264 "${current_dir}/seeing_noaudio.h264"
|
||||||
rm -rf "${current_dir}/temp-mpeg4.mkv"
|
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 -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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
echo -n "* Extracted video into ${video_file_dir} (25 fps)"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -613,7 +613,7 @@ elif [ "${1}" == "-evti" ] ; then
|
||||||
echo -n "* Starting extract video track (${2}) "
|
echo -n "* Starting extract video track (${2}) "
|
||||||
sleep 3
|
sleep 3
|
||||||
ffmpeg -y -i "${2}" -map ${video_track} -c:v copy -ss ${hourCut}:${minuteCut}:${secondCut} "${current_dir}/seeing.mp4"
|
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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir}"
|
echo -n "* Extracted video into ${video_file_dir}"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -723,7 +723,7 @@ elif [ "${1}" == "-evti" ] ; then
|
||||||
echo -n "* Starting extract video track (${2}) "
|
echo -n "* Starting extract video track (${2}) "
|
||||||
sleep 3
|
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 "${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 ""
|
||||||
echo -n "* Extracted video into ${video_file_dir}"
|
echo -n "* Extracted video into ${video_file_dir}"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
|
@ -198,8 +198,8 @@ fi
|
||||||
p_ffmpeg="ffmpeg -i"
|
p_ffmpeg="ffmpeg -i"
|
||||||
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
||||||
# f_conversion="-vsync 1 -async 1" # Deprecated method
|
# 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="-fps_mode 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"
|
||||||
# Check if video input uses H265 (HEVC)
|
# Check if video input uses H265 (HEVC)
|
||||||
codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265")
|
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")
|
codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc")
|
||||||
|
|
|
@ -198,8 +198,8 @@ fi
|
||||||
p_ffmpeg="ffmpeg -i"
|
p_ffmpeg="ffmpeg -i"
|
||||||
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
||||||
# f_conversion="-vsync 1 -async 1" # Deprecated method
|
# 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="-fps_mode 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"
|
||||||
# Check if video input uses H265 (HEVC)
|
# Check if video input uses H265 (HEVC)
|
||||||
codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265")
|
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")
|
codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc")
|
||||||
|
|
|
@ -198,8 +198,8 @@ fi
|
||||||
p_ffmpeg="ffmpeg -i"
|
p_ffmpeg="ffmpeg -i"
|
||||||
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
p_ffmpeg_patched="-max_muxing_queue_size 9999"
|
||||||
# f_conversion="-vsync 1 -async 1" # Deprecated method
|
# 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="-fps_mode 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"
|
||||||
# Check if video input uses H265 (HEVC)
|
# Check if video input uses H265 (HEVC)
|
||||||
codec_h265=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "h265")
|
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")
|
codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "hevc")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user