mirror of
https://github.com/lrenaud/burnSubs.git
synced 2025-06-17 12:53:01 -07:00
Compare commits
No commits in common. "master" and "v0.13.2" have entirely different histories.
1 changed files with 7 additions and 11 deletions
18
burnSubs
18
burnSubs
|
@ -5,7 +5,7 @@ set -o errexit
|
|||
|
||||
################################################################################
|
||||
# burnSubs
|
||||
# version 0.13.3
|
||||
# version 0.13.2
|
||||
#################
|
||||
# Wishlist:
|
||||
# queue encodes
|
||||
|
@ -13,9 +13,11 @@ set -o errexit
|
|||
# finish help flag
|
||||
# audio recode flag
|
||||
#
|
||||
# Changes
|
||||
# automatically select JPN audio if more than one audio channel found.
|
||||
################################################################################
|
||||
|
||||
DEFAULTS_OPTS_CRF=18
|
||||
DEFAULTS_OPTS_CRF=20
|
||||
|
||||
function machineSetup() {
|
||||
# Default setup
|
||||
|
@ -173,7 +175,6 @@ function doCleanup() {
|
|||
echo "=> Cleaning up."
|
||||
rm -r "$TMP"
|
||||
else
|
||||
set +x
|
||||
echo "tmp dir: $TMP"
|
||||
fi
|
||||
|
||||
|
@ -313,7 +314,7 @@ function setupAudioTranscode() {
|
|||
if [[ "${OPTS_SURROUND_PRESERVE}" == false ]]; then
|
||||
# From https://superuser.com/questions/852400/properly-downmix-5-1-to-stereo-using-ffmpeg
|
||||
# Nightmode Formula
|
||||
FILT_AUDIO="-filter:a pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR ${FILT_AUDIO}"
|
||||
FILT_AUDIO="-filter:a pan=stereo|FL<FC+0.30*FL+0.30*BL|FR<FC+0.30*FR+0.30*BR ${FILT_AUDIO}"
|
||||
fi
|
||||
else
|
||||
FILT_AUDIO="-c:a copy"
|
||||
|
@ -385,9 +386,9 @@ function selectSubs() {
|
|||
# try to avoid a signs and lyrics track
|
||||
LANG_SINGLE_SELECT=$($JQ '[.[].lang] | index("'${OPTS_SELSUB_LANG}'")' "$STREAMS_SUB")
|
||||
echo "Multiple english tracks found."
|
||||
export SUBTITLE_INDEX=$($JQ 'reduce .[] as $trk ([]; if ($trk.lang == "'${OPTS_SELSUB_LANG}'" and (( ($trk.t | test("lyrics";"i")) or ($trk.t | test("signs";"i")) or ($trk.t | test("dub";"i")) )|not) ) then [.[],{t:$trk.t,i:$trk.i}] else . end) | .[].i' "$STREAMS_SUB")
|
||||
export SUBTITLE_INDEX=$($JQ 'reduce .[] as $trk ([]; if ($trk.lang == "'${OPTS_SELSUB_LANG}'" and ( ($trk.t | test("lyrics";"i") or ($trk.t | test("signs";"i")) ) | not ) ) then [.[],{t:$trk.t,i:$trk.i}] else . end) | .[].i' "$STREAMS_SUB")
|
||||
# And display rejected subtitles too.
|
||||
SUBTITLE_REJECT_LIST=($($JQ 'reduce .[] as $trk ([]; if ($trk.lang == "'${OPTS_SELSUB_LANG}'" and (( ($trk.t | test("lyrics";"i")) or ($trk.t | test("signs";"i")) or ($trk.t | test("dub";"i")) )) ) then [.[],{t:$trk.t,i:$trk.i}] else . end) | .[].t' "$STREAMS_SUB"))
|
||||
SUBTITLE_REJECT_LIST=($($JQ 'reduce .[] as $trk ([]; if ($trk.lang == "'${OPTS_SELSUB_LANG}'" and ( ($trk.t | test("lyrics";"i") or ($trk.t | test("signs";"i")) ) ) ) then [.[],{t:$trk.t,i:$trk.i}] else . end) | .[].t' "$STREAMS_SUB"))
|
||||
for REJECT_SUB in ${SUBTITLE_REJECT_LIST[@]}; do
|
||||
echo " > rejecting ${REJECT_SUB}"
|
||||
done
|
||||
|
@ -735,11 +736,6 @@ elif [[ ${OPTS_VERBOSITY} -eq 1 ]]; then
|
|||
else # ie [[ ${OPTS_VERBOSITY} -ge 2 ]]; then
|
||||
FF_VERBOSITY="-hide_banner"
|
||||
fi
|
||||
|
||||
if [[ "$OPTS_DEBUG" == "true" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
###############
|
||||
# Configure the encoder based upon the hostname
|
||||
machineSetup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue