Note: December 2008 -- apparently the newest versions of VLC media player don't work with this (that's bad), but the newest versions also come with an "iPod" profile that should be able to simply save to iPod/iPhone compatible formats! (that's good) But apparently it doesn't work (that's bad). I am just about to downgrade my VLC media player here, in a minute. What happens is that VLC encodes it, but then the iPhone won't play it. I intend to get this figured out, but I've been on the road for three weeks (Jan/Feb 2009) and it may be a bit before I get back to it.
Below is a bash script that I use to invoke VLC under Linux to make an iPhone compatible mp4 from some other format. It's very very simple, even to the extent that if your input file name doesn't end in ".mpg", you'll need to change the script to change the extension you got, rather than ".mpg". The output of this conversion will play on iPhone and PSP.

If you simply want to invoke the conversion from the command line, use the line beginning with "vlc", change "$1" to the input filename, and "$OUT" to the output filename.

Either way, you will see little output from VLC, possibly for many minutes, and then it will exit. One way to monitor progress would be to open another terminal window (or ALT-F2 on Linux console if not in a GUI), and do a "watch ls -l ", to see whether the file is still getting bigger.

(I updated from my original version by using the fake input target "vlc:quit", which you specify as if it's an input to the player, but what the player does when it reaches it, is it quits.


OUT=`echo $1 |sed -e 's/\.mpg/.mp4/i'`

vlc "$1" vlc:quit --no-show-intf  --sout "#transcode{width=320, height=240, canvas-aspect
=1.5:1, vcodec=mp4v, vb=384, acodec=mp4a, ab=96,channels=1,audio-sync}:duplicate

The tricky bit, apparently, that cannot be done with the VLC Media Player GUI is the width, height, canvas-aspect, or at least as far as I remember. The above invocation is probably adaptable to Windows XP Command Line, as well as Mac OSX.

Two more files (for the (MSDOS-like) Windows Command-Line:

You need to use the command line to use these.

1) to re-encode anything that your MS Windows VLC can play to iPod/iPhone, use vlc-iphone.bat. In order to use it, right click the link, and save as, but save it as "vlc-iphone.bat". The name has been changed to avoid your browser or your virus software doing something odd with it. It's a very simple batch file, you can just click on the link and see that it doesn't do anything questionable. Syntax is "vlc-iphone.bat ". It will output an iPod-compatible MP4 file, with the same name as input, except adding "mp4" on the end.

2) to rip and re-encode the primary feature from a DVD for iPod/iPhone, use DVD-iPhone.bat. In order to use it, right click the link, and save as, but save it as "DVD-iPhone.bat". This one, in its current form, needs to be edited to change the drive letter of your inputting DVD drive. You can also change the output file to taste, although I would just leave it as "dvdrip.mp4" and change each to what you want when you're done. It will output an iPod-compatible MP4 file.