#!/bin/bash
# pspvideo.sh
# Create Psp Video From avi or others with ffmpeg
# Matrix86
if [ $# == 0 ]
then
echo "Use: make_psp_movie video1 video2 video3 ..."
fi
target="pspmovies"
mkdir -p "$target"
for m in "$@"
do
echo "--------------------"
echo "Inizio Conversione $m"
echo "--------------------"
output="10001"
while [ -f "$target/M4V${output}.MP4" ]
do
let "output += 1"
done
# Generate Video
ffmpeg -i "$m" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240 "${target}/M4V${output}.MP4"
# Generate thumbnail
ffmpeg -y -i "$m" -f image2 -ss 5 -vframes 1 -s 160x120 -an "${target}/M4V${output}.THM"
ls -l "${target}/M4V${output}.MP4" "${target}/M4V${output}.THM"
done
echo
echo "---------------------------------------------------------------------------"
echo "Generato Video PSP in:"
echo " ${target}"
echo
echo "Copiate il video nella cartella Video della vostra PSP"
echo
echo "---------------------------------------------------------------------------"