NoPaste Service
DOWNLOAD
Language: Bash
Author: Matrix86
Description: PspVideo
Date: 21/09/08 20:41
  1. #!/bin/bash
  2. # pspvideo.sh
  3. # Create Psp Video From avi or others with ffmpeg
  4. # Matrix86
  5. if [ $# == 0 ]
  6. then
  7.     echo "Use: make_psp_movie video1 video2 video3 ..."
  8. fi
  9. target="pspmovies"
  10. mkdir -p "$target"
  11. for m in "$@"
  12. do
  13.     echo "--------------------"
  14.     echo "Inizio Conversione $m"
  15.     echo "--------------------"
  16.     output="10001"
  17.     while [ -f "$target/M4V${output}.MP4" ]
  18.     do
  19.         let "output += 1"
  20.     done
  21. # Generate Video
  22.     ffmpeg -i "$m" -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320x240  "${target}/M4V${output}.MP4"
  23. # Generate thumbnail
  24.     ffmpeg -y -i "$m" -f image2 -ss 5 -vframes 1 -s 160x120 -an "${target}/M4V${output}.THM"
  25.  
  26.     ls -l "${target}/M4V${output}.MP4" "${target}/M4V${output}.THM"
  27. done
  28. echo
  29. echo "---------------------------------------------------------------------------"
  30. echo "Generato Video PSP in:"
  31. echo "     ${target}"
  32. echo
  33. echo "Copiate il video nella cartella Video della vostra PSP"
  34. echo
  35. echo "---------------------------------------------------------------------------"