#!/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"

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-12-06
  • 2021-05-25
  • 2022-02-27
  • 2021-10-27
猜你喜欢
  • 2021-12-10
  • 2021-12-02
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
相关资源
相似解决方案