Encode movies for PDA

In next few days i will go to business trip to Amsterdam. Flight time is about 3.5 hours, so i will have chance to test my new PDA Battery. I have a few ideas how to spent flight time, and i descided to watch few movies. Following short how-to will help you encode movies for your PDA.

To encode movies you need mencoder (from MPlayer package) and at least xvid and mp3 codecs. I have this codec packages installed on my desktop:

libavcodec0d
libxvidcore4
w32codecs

Before start encoding you need to note few parameters:


  • video bitrate
  • resolution
  • fps (frames per second)
  • audio bitrate

Optimal values for my Pocket LOOX N520:

  • video bitrate = 400
  • resolution = 320×240
  • fps = 30
  • audio bitrate = 128 cbr

You may to try different values, but with that one i get best size/quality ratio.

Here is full command what i use for recoding:

mencoder Input_file.avi -ofps 30 -ovc lavc \
-oac mp3lame -lameopts br=128:cbr:mode=0 \
-vf pp,scale=-3:320 \
-lavcopts vcodec=mpeg4:vbitrate=400:vhq:vpass=1 \
-o Output_file.avi

Where:

  • ofps — frames per second
  • br — audio bitrate
  • vbitrate — video bitrate

But this is not finish yet ;-) I prefer two pass encoding, so next command you need to run are:


mencoder Input_file.avi -ofps 30 -ovc lavc \
-oac mp3lame -lameopts br=128:cbr:mode=0 \
-vf pp,scale=-3:320 \
-lavcopts vcodec=mpeg4:vbitrate=400:vhq:vpass=2 \
-o Output_file.avi

Where vpass value changed to 2. Two pass encoding are much longer but gives much better results.

Output file will be 4 times smaller:


1468551168 2007-01-09 05:24 Input_file.avi
391221710 2007-01-27 18:47 Output_file.avi

So on my 2GB Secure Digital card i can store about 5 movies with good quality. Its more that enough for my 3.5 hours flight.

Prev Post: How-to find broken symlinks
Next Post: Secure POP3 (pop3s) server using stunnel
Main Page: ZulusTips index

Leave a Reply

You must be logged in to post a comment.