zoukankan      html  css  js  c++  java
  • 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"
  • 相关阅读:
    alpha冲刺9
    alpha冲刺8
    alpha冲刺7
    alpha冲6
    随堂小测-同学录
    alpha冲刺5
    任务3
    任务2
    任务1
    网站用户行为分析
  • 原文地址:https://www.cnblogs.com/jackluo/p/7479113.html
Copyright © 2011-2022 走看看