shell 写的 jrottenberg/ffmpeg 转码

#!/bin/bash
if [ $# -ne 2 ];then
    echo "The argument must be 2"
    exit;
else
  echo "$1 $2"
fi
VIDEOPATH=/data/golang/videode
INPUTPATH=${1}
OUTPATH=${2}
#checkout file
DECODEFILE=${VIDEOPATH}/${OUTPATH}
NEWDIR=${DECODEFILE%/*}
if [ ! -d ${NEWDIR} ]; then
  mkdir -p ${NEWDIR}
fi
echo $DECODEFILE
#if [ ! -f "$DECODEFILE" ]; then
#    rm -rf $DECODEFILE
#fi
docker run -i --name ffepmge -v ${VIDEOPATH}:/tmp/workdir jrottenberg/ffmpeg -i ${INPUTPATH} -c:v libx264 -crf 28 -strict -2 ${OUTPATH}
docker rm ffepmge
curl -connect-timeout 2 -m 5 "http://xxxx/$OUTPATH"

 

上一篇:【Elastic Engineering】Elasticsearch:Elasticsearch 中索引映射的非规范化


下一篇:一周AI最火论文 | 给你的AI模型一张名片,谷歌发布MCT