当前位置: 首页 > 工具软件 > yamdi > 使用案例 >

linux mp4 加关键帧 工具,Linux下使用yamdi为flv视频批量添加关键帧

杨骁
2023-12-01

#!/bin/sh

echo -n "Please enter the path you want to convert the video:"

read path

if [ "$path" == "" ]

then

echo "ERROR: The input is empty."

exit 0

elif [ ! -d $path ]

then

echo "ERROR: Sorry,can't find this directory."

exit 0

else

cd $path

if [ $? != 0 ]

then

echo "ERROR: The path is in error, please check!"

exit 0

fi

fi

for d in `ls -d *`

do

cd $path/$d

if [ `ls *.flv | wc -l` -eq 0 ]

then

echo "ERROR: The path $path/$d is empty!"

break

fi

mkdir -p /outdir$path/$d

file=`ls *.flv`

for i in $file

do

/usr/bin/yamdi -i $i -o outfile

mv outfile /outdir$path/$d/$i

done

echo "$path/$d is OK!"

done

 类似资料: