#!/bin/bash


for file in `ls $1`
do
        echo "--------------------------------------------------------------"
        echo $file
        num=${file:0-5:1}
        num1=`expr $num + 1`
        num1=${num1:0-1:1}
        file=$1"/"$file
        file1=${file%$num.mp4}"$num1.mp4" # 更改视频名称
        `ffmpeg -ss 00:00:05 -i $file -c copy $file1` # 裁剪视频
        `rm $file`
done
