Results 1 to 3 of 3

Thread: My PSP video converter script

  
  1. #1
    jenny's Avatar
    jenny is offline -Hacks Enthusiast
    Join Date
    Feb 2011
    Location
    The Moon
    Posts
    302
    Rep Power
    8

    Default My PSP video converter script

    I made this script a while ago when I had a machine that could run Linux without lockups. It still needs a few tweaks and you are able to use change it. Just give credit where credit is due.

    Code:
    #!/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 (bunnytaur@gmail.com)
    
    # 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=$3:acodec=libfaac -af \
    lavcresample=24000 -vf scale=480:272,harddup \
    -lavfopts format=psp -ofps 30000/1001 \
    "$1"$file -o "$2/${file%.*}.mp4";
    echo "File Done!";
    done


  2. #2
    ZiNgABuRgA's Avatar
    ZiNgABuRgA is offline Senior Member -Hacks Titan
    Join Date
    Sep 2006
    Location
    4CHIN
    Posts
    11,044
    Rep Power
    24

    Default

    Doubting many here would use it, but anyway, I'd probably suggest encoding to H.264 instead of MPEG-4 ASP.
    FAAC unfortunately sucks as an AAC encoder, although I don't know how well it does if you use a really high bitrate. Probably wouldn't downsample to 24kHz unless it's required for ASP playback.

    I'd personally use ffmpeg+x264 (or just use ffmpeg-libx264) to convert to H.264, then ffmpeg pipe to neroAacEnc for audio, then mux with MP4Box.

  3. #3
    jenny's Avatar
    jenny is offline -Hacks Enthusiast
    Join Date
    Feb 2011
    Location
    The Moon
    Posts
    302
    Rep Power
    8

    Default

    I needed something quick and simple. Also mencoder doesn't like encoding to h.264 for some reason. Haven't been arsed to really improve upon the script either. When I get a new machine I'll have it use ffmpeg instead.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •