transcode : fix ffmpeg to keep all formats.

This commit is contained in:
Dmitry Voronin 2023-12-01 00:44:25 +03:00
parent 9a36482087
commit ed822f2fcc
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ _ffprobe_keyint()
_ffprobe_ba()
{
local ba=$(ffprobe -v error -select_streams a:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 "${1}")
echo $((ba/1024))
[[ "${ba}" != "N/A" ]] && echo $((ba/1024)) || echo 128
}
export -f _ffprobe_keyint _ffprobe_ba _ffprobe_fps

View file

@ -122,7 +122,7 @@ _transcode_mkv()
[[ ${braudio} -gt 128 ]] && braudio=128
# 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:s srt -ac 2 -c:a libopus -b:a ${braudio}k -c:v libsvtav1 -crf 30 -svtav1-params "fast-decode=1:tune=0" -pix_fmt yuv420p10le -g ${keyint} -vf "scale=-2:min'(1080,ih)'" "${2}"
ffmpeg -n -i "${1}" -map 0 -c:s srt -ac 2 -c:a libopus -b:a ${braudio}k -c:v libsvtav1 -crf 30 -svtav1-params "fast-decode=1:tune=0" -pix_fmt yuv420p10le -g ${keyint} -vf "scale=-2:min'(1080,ih)'" "${2}"
}
# Export.