浏览代码

Update media.sh

MoeClub 5 年之前
父节点
当前提交
443a6cfe9a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ffmpeg/media.sh

+ 1 - 1
ffmpeg/media.sh

@@ -29,7 +29,7 @@ mkdir -p "${MediaFolder}"
 
 
 ## m3u8
 ## m3u8
 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}"`
-VideoTime=`awk 'BEGIN{print ('${MaxSize}' * 1024 * 1024)/( '${bitrate}' * '${BitRadio}' / 8) }' |cut -d'.' -f1`
+VideoTime=`awk 'BEGIN{print ('${MaxSize}' * 1024 * 1024)/( '${BitRate}' * '${BitRadio}' / 8) }' |cut -d'.' -f1`
 [ -n "$VideoTime" ] || exit 1
 [ -n "$VideoTime" ] || exit 1
 ffmpeg -i "${Media}" -threads ${Thread} -thread_type slice -vcodec copy -acodec aac -bsf:v h264_mp4toannexb -map 0 -f segment -segment_list ${OutPutM3u8} -segment_time ${VideoTime} "${MediaFolder}/output_%04d.ts"
 ffmpeg -i "${Media}" -threads ${Thread} -thread_type slice -vcodec copy -acodec aac -bsf:v h264_mp4toannexb -map 0 -f segment -segment_list ${OutPutM3u8} -segment_time ${VideoTime} "${MediaFolder}/output_%04d.ts"