Browse Source

Logic for determine foreign audio now actually will work when foreign audio present, and doesn't just pass all through.

master
rbeck4 3 years ago
parent
commit
0e4c12594f
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      transcode.sh

+ 4
- 3
transcode.sh View File

@ -178,16 +178,17 @@ do
done
unset SUBTITLEINDEX
SUBTITLEINDEX=$(expr $minINDEX - ${streamNUMBERS[0]})
#TEST FRAMES IN SUB TRACK, IF < 50% MAX MOST LIKELY ISN'T FOR. AUD.
#TEST FRAMES IN SUB TRACK, IF < 15% MAX MOST LIKELY ISN'T FOR. AUD.
#15% as LOTR dir. comm included, blows up the max number for them...
currFrames=$( ffprobe -loglevel error -select_streams s:$SUBTITLEINDEX \
-show_entries stream_tags=NUMBER_OF_FRAMES-eng -of csv=p=0 \
"$tmpDIR/$fileNAME")
if [ $( echo "($currFrames / $maxFrames) < 0.50"|bc -l ) ]
if [ $( echo "($currFrames / $maxFrames) < 0.15"|bc -l ) -gt 0 ]
then
echo "BURNING STREAM $SUBTITLEINDEX (STREAM $minINDEX) from $fileNAME"
burnSubs "$tmpDIR/$fileNAME" "$tmpDIR/TMP$fileNAME" "$workDIR/$fileNAME" $SUBTITLEINDEX
else
echo "MIN. SUB TRACK ($SUBTITLEINDEX [$minINDEX])) DUR. > 50% FILM, NOT BURNING"
echo "MIN. SUB TRACK ($SUBTITLEINDEX [$minINDEX])) DUR. > 15% FILM, NOT BURNING"
encode "$tmpDIR/$fileNAME" "$workDIR/$fileNAME"
fi

Loading…
Cancel
Save