06.02.2023, 16:51
filename="*.mp4"
for i in $filename; do
echo $i
if [[ ! -d ./out_mp4 ]];then
mkdir ./out_mp4
fi
pwd
echo
ffmpeg.exe -i "$i" -map 0:v -c:v copy -bsf:v h264_mp4toannexb raw.h264 -y
ffmpeg.exe -fflags +genpts -r 24 -i raw.h264 -i "$i" -map 0:v -c:v copy -map 1:a -af atempo=0.8 -movflags faststart ./out_mp4/"$i" -y
rm raw.h264
done
for i in $filename; do
echo $i
if [[ ! -d ./out_mp4 ]];then
mkdir ./out_mp4
fi
pwd
echo
ffmpeg.exe -i "$i" -map 0:v -c:v copy -bsf:v h264_mp4toannexb raw.h264 -y
ffmpeg.exe -fflags +genpts -r 24 -i raw.h264 -i "$i" -map 0:v -c:v copy -map 1:a -af atempo=0.8 -movflags faststart ./out_mp4/"$i" -y
rm raw.h264
done