Browse Source

Update media.sh

MoeClub 5 years ago
parent
commit
eb0d214fde
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ffmpeg/media.sh

+ 1 - 1
ffmpeg/media.sh

@@ -35,7 +35,7 @@ mkdir -p "${MediaFolder}"
 BitRate=`ffprobe -v error -show_entries format=bit_rate -of default=noprint_wrappers=1:nokey=1 "${Media}"`
 BitRate=`ffprobe -v error -show_entries format=bit_rate -of default=noprint_wrappers=1:nokey=1 "${Media}"`
 echo "media bitrate: ${BitRate}"
 echo "media bitrate: ${BitRate}"
 if [ "$ForceH264" -eq 0 ]; then
 if [ "$ForceH264" -eq 0 ]; then
-  ForceH264=`awk 'BEGIN{print 2 * '${ForceRate}' / '${BitRate}'}' |cut -d'.' -f1`
+  ForceH264=`awk 'BEGIN{print '${BitRate}' / (2 * '${ForceRate}')}' |cut -d'.' -f1`
 fi
 fi
 if [ "$ForceH264" -ne 0 ]; then
 if [ "$ForceH264" -ne 0 ]; then
   ForceMaxRate=`awk 'BEGIN{print '${ForceRate}' * '${ForceMaxRadio}'}' |cut -d'.' -f1`
   ForceMaxRate=`awk 'BEGIN{print '${ForceRate}' * '${ForceMaxRadio}'}' |cut -d'.' -f1`