Transcode : Mkv limit to 30 fps max.
This commit is contained in:
parent
33004cdd1b
commit
35cd601e45
|
@ -77,7 +77,7 @@ function ffmpeg_music_meta() {
|
||||||
# Get video FPS.
|
# Get video FPS.
|
||||||
function _ffprobe_fps() {
|
function _ffprobe_fps() {
|
||||||
local fps=$(ffprobe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate "${1}")
|
local fps=$(ffprobe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate "${1}")
|
||||||
[[ "${fps}" = "" ]] && fps=24 || fps=$((fps))
|
[[ "${fps}" = "" ]] && fps=30 || fps=$((fps))
|
||||||
echo "${fps}"
|
echo "${fps}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,9 +88,10 @@ function _transcode_mka() {
|
||||||
function _transcode_mkv() {
|
function _transcode_mkv() {
|
||||||
local keyint=$(_ffprobe_keyint "${1}")
|
local keyint=$(_ffprobe_keyint "${1}")
|
||||||
local braudio=$(_ffprobe_ba "${1}")
|
local braudio=$(_ffprobe_ba "${1}")
|
||||||
|
local fps=$(_ffprobe_fps "${1}")
|
||||||
[[ ${braudio} -gt 128 ]] && braudio=128
|
[[ ${braudio} -gt 128 ]] && braudio=128
|
||||||
[[ ${braudio} -lt 32 ]] && braudio=32
|
[[ ${fps} -gt 30 ]] && fps=30
|
||||||
|
|
||||||
# ffmpeg -n -i "${1}" -c:a libopus -b:a ${braudio}k -c:v libsvtav1 -crf 30 -svtav1-params "fast-decode=1:tune=0" -preset 8 -pix_fmt yuv420p10le -g ${keyint} -vf "scale=-2:min'(1080,ih)'" "${2}"
|
# ffmpeg -n -i "${1}" -c:a libopus -b:a ${braudio}k -c:v libsvtav1 -crf 30 -svtav1-params "fast-decode=1:tune=0" -preset 8 -pix_fmt yuv420p10le -g ${keyint} -vf "scale=-2:min'(1080,ih)'" "${2}"
|
||||||
ffmpeg -n -i "${1}" -map 0 -map -v -map V -map -t -dn -c:s srt -ac 2 -c:a libopus -b:a ${braudio}k -c:v libsvtav1 -crf 30 -svtav1-params "tune=0" -pix_fmt yuv420p10le -g ${keyint} -vf "scale=-2:min'(1080,ih)'" "${2}"
|
ffmpeg -n -i "${1}" -map 0 -map -v -map V -map -t -dn -c:s srt -ac 2 -c:a libopus -b:a ${braudio}k -c:v libsvtav1 -crf 30 -svtav1-params "tune=0" -pix_fmt yuv420p10le -g ${keyint} -vf "scale=-2:min'(1080,ih)'" -vf "fps=${fps}" "${2}"
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue