Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Simple PSP Video converter script
- # Converts some common, and optionally not so common formats to something that should play on a psp.
- # Made by Jennifer "bunnytaur" Stears ([email protected])
- # TODO: Find and fix bugs. Add functonality. Correct spelling.
- # NOTES: Mplayer's lavf muxer is apparently broken... this should work, if not let me know.
- # You will need mplayer and the required libraries.
- # This should work on ubuntu and debian.
- # sudo aptitude install nasm yasm libfaac libfaac-dev libxvidcore libxvidcore-dev liba52 liba52-dev gtk+2.0-dev build-essential subversion
- # If you do not have aptitude installed, use apt-get instead.
- # The above will(should) get all the libraries you need at minium to get mplayer to install from source.
- # Grab mplayer using svn: svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
- # Go to the newly created mplayer directory: cd mplayer
- # Then type: sh configure
- # If there isn't any problems, now run make -jX where X is the number of cores/cpu(s) in your system. If you have a quad core you would run make -j4
- # After that is finished and there is no errors install it by doing sudo make install.
- # There you have it, an awesome media player and media encoder.
- # If you have problems, look on the ubuntu forums, or use google. You can try to email me, and I will try to help if I can.
- # USAGE: pspconvert.sh indir outdir threads
- count=`ls "$1" | wc -l`;
- filen=0;
- for file in *{.mpg,.mpeg,.mp2,.mp4,.AVI,.xvid,.mkv,.wmv,.rmvb};
- do filen=`expr $filen + 1`;
- mencoder -ovc lavc -oac lavc -of lavf \
- -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:\
- vbitrate=1000:threads=4:acodec=libfaac -af \
- lavcresample=24000 -vf scale=480:272,harddup \
- -lavfopts format=psp -ofps 30000/1001 \
- "$1"$file -o "$2/${file%.*}.mp4";
- echo "RAWR!";
- done
Add Comment
Please, Sign In to add comment