1
0
Fork 0

cutvid: add compatibility ffmpeg option for Android

This commit is contained in:
tastytea 2023-01-11 21:38:00 +01:00
parent 7233443ffe
commit 485aa7103c
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ local aencoder="copy"
[[ ${#o_vencoder} -eq 2 ]] && vencoder=${o_vencoder[2]}
[[ ${#o_aencoder} -eq 2 ]] && aencoder=${o_aencoder[2]}
local subtitle_options=(-codec:s copy)
local compat_options=(-pix_fmt yuv420p) # Android doesn't like yuv420p10le
if [[ ${#o_hardcode_subs} -ne 0 ]]; then
local tmpass=$(mktemp --suffix='.cutvid.ass')
@ -48,6 +49,6 @@ fi
ffmpeg -i ${input} \
-ss ${from} -to ${to} \
-codec:v ${vencoder} -codec:a ${aencoder} ${subtitle_options} \
${ffmpeg_options} ${output}
${compat_options} ${ffmpeg_options} ${output}
[[ ${#o_hardcode_subs} -ne 0 ]] && rm --verbose ${tmpass}