LINUXUSER PSP Movies www.photocase. You can use to load movies on your a Playstation Portable

(PSP) gaming console. BY KRISTIAN KISSLING com

lthough Sony doesn’t like to grading their PSPs to the older 1.0 and ory stick. The stick attaches to the inte- admit it, one of the reasons for 1.5 firmware versions to keep the ability grated USB port, which gives Linux Athe success of Portable Playsta- to copy movies to their consoles. The users an entry vector. tions (PSPs) is that creative users can firmware is available from the usual sus- Use a USB cable to connect your com- teach the gaming console new tricks. pects [1], with downloading and instal- puter to the PSP, and then pop up a con- One of these tricks gives you the ability lation tips at [2]. But beware of a nasty sole window and become root. Type tail to copy movies to the PSP and take them piece of malware by the name of “Tro- -f /var/log/messages to discover the de- with you on trips. This trick is possible jan.PSPBrick,” which exploits down- vice file that Linux uses to mount the because another Sony product, the grade attempts by unsuspecting users PSP on your system. The first time you “Memory Stick PRO,” which Sony de- and destroys the existing firmware, try this, you might draw a blank, as you signed for storing music and images, will rather than installing the older version, need to enable USB transfer mode on the also store movies. thus making the console unusable. PSP first. To do so, press the HOME but- Of course, Sony would prefer to sell Sony has put a temporary end to the you DVDs of the movies, but a few in- downgrade party with the introduction ventive hackers have discovered how to of firmware version 2.01: antivirus soft- convert movies to PSP format. The sticks ware treats all attempts to install older with two or even four GB storage capac- firmware as attacks and prevents them. ity give you enough space to store a At this time of writing, you can only whole movie. To do this, you need the downgrade from version 2.0 to 1.5 and “right” firmware (that is the older ver- 1.0, but make sure you check the firm- sion), and an application for converting ware with an up-to-date virus scanner movies to PSP format. before you start to install. Firmware Hack Pictures and Music In an attempt to prevent some of the Sony actually approves of users transfer- Figure 1: After setting up the USB connec- more creative applications, Sony has ring certain types of content to the PSP. tion between the PSP and Suse, Suse auto- now introduced new firmware. As a re- The manual explains how to copy pho- matically pops up a window showing you the action, users have now started down- tos and music to the PSP using a mem- directories on the memory stick.

86 ISSUE 64 MARCH 2006 WWW.LINUX - MAGAZINE.COM PSP Movies LINUXUSER

ton on your PSP to enter the main menu. SALSA or JAZZ, for ex- Press the left arrow key to move the cur- ample. sor to the suitcase icon with the Settings label on the left of the main menu. And… Action! Use the up and down arrow keys to Before you can copy a navigate the Settings menu until you see movie to the PSP, the USB Connection icon. Press the right there are a few prepa- hand side of (x) to enable USB mode for ratory steps to com- your PSP. plete. Again, the direc- Now check the tail dialog on your PC : tories need to honor special conventions: Nov 14 15:24:07 U create a directory linux kernel: sda: sda1 named MP_ROOT in the root directory of This line tells you that Linux uses the the PSP, and then cre- device file /dev/sda1 to address the PSP. ate a 100MVN01 subdi- Figure 2: The Simpsons up to their tricks on the PSP. Make sure Suse automatically pops up a Konqueror rectory. This is the - you use uppercase letters for the file name. window displaying the Playstation files get directory for mov- (Figure 1), and you can work with the ies. To allow movies to run on the PSP, -i test.avi -f U files, just like on any USB stick. Debian your movies must have the right resolu- psp -r 14.985 -s 320x240 -b U users can mount the PSP manually by tion, format, and frame rate. Luckily, the 768 -ar 24000 -ab 32 U typing the following as root: Ffmpeg tool has an option for simpler M4V00001.MP4 conversion of movies to PSP format. mkdir /mnt/psp You need an Ffmpeg version from This command converts your AVI file to mount -t auto /dev/sda1 /mnt/psp the CVS, which in turn requires a Faac a file titled M4V00001.MP4. The cryptic installation. Start by downloading parameters specify that the PSP can han- For test purposes, let’s start by copying a faac-18102004.tar.gz from the website dle resolutions (-s) of max. 320 by 240 few photos to the memory stick. The at [3] and then installing the package. pixels and the video bit-rate (-b) must PSP only recognizes images as such if Type tar xvfz faac-18102004.tar.gz to not exceed 768 kbps. If you select a they are in the appropriate directory. You unpack the archive, change to the subdi- frame rate (-r) different from 14 985, you can use Konqueror or a shell to create rectory created by this step, and then may experience problems. The audio the directory. type chmod u+x bootstrap to modify the sampling frequency (-ar) has to be permissions for the bootstrap script. 24 000 Hz, and the audio bit rate (-ab) mkdir /mnt/psp/PSP When you type sh ./bootstrap to run the 32 Kbps. If Ffmpeg complains about mkdir /mnt/psp/PSP/PHOTO script, it will tell you which files you missing libraries, become root, then add need for the build, and – after you pro- the /usr/lib and /usr/local/lib paths to Now move your photos to the PHOTO di- vide the missing files – create a configure the /etc/ld.so.conf file, save the results, rectory you just created. file. You can then follow proce- and run ldconfig again. dure to complete the build and install: The next step is to copy the movie to cp testfoto.jpg U ./configure, make, make install. the PSP. You can now type cp M4V00001. /mnt/psp/PSP/PHOTO This finishes the Faac install, and you MP4 /mnt/psp/MP_ROOT/100MVN01 to can now download Ffmpeg from the copy the movie to the PSP. Make sure It is very important to use uppercase let- CVS: you use uppercase letters! ters for folder names and filenames; if On the PSP, move to the Video entry in you do not, the PSP will not see your im- cvs -z9 -d:pserver:U the main menu, and press (x) twice (Fig- ages or movies. Unfortunately, the PSP [email protected]:U ure 2) to launch the movie. ■ can only display JPG formated images, /cvsroot/ffmpeg co ffmpeg so you will need to convert any PNG or INFO GIF images first. You may need to install the cvs tool [1] Wiki on PSP: http:// en. wikipedia. org/ The procedure for copying MP3 for- using your distribution’s package man- wiki/ PlayStation_Portable_homebrew mated music files to the PSP is similar – ager. Change to the ffmpeg subdirectory, [2] Downgrading your PSP: again you need an appropriately named and configure the program by entering http:// www. hackaday. com/ entry/ directory: ./configure --enable-shared --enable-faac. 1234000687060851/ Then run make and make install to com- [3] FAAC website: mkdir /mnt/psp/PSP plete the install. http:// www. audiocoding. com/ Now it’s time to tackle an AVI file to mkdir /mnt/psp/PSP/MUSIC modules/ mydownloads/ convert it into a PSP movie. We’ll call [4] KDE integration: http:// www. kde-apps. You can create subdirectories for albums the file test.avi, which gives us the fol- org/ content/ show. php?content=31679 or genres if you need to: MADONNA or lowing Ffmpeg command:

WWW.LINUX - MAGAZINE.COM ISSUE 64 MARCH 2006 87