Here is a simple script for converting video files for use on the GP2X, videos are scaled to 320×240 to save storage space. No error checking is included.
In a Linux console cut and paste the following code into a file and call it say gp2x-convert:
#!/bin/sh if [ -z "$1" ]; then echo usage: $0 source_video_file gp2x_dest_file.avi exit fi INFILE=$1 OUTFILE=$2 echo $INFILE echo $OUTFILE /usr/bin/mencoder “$INFILE” -o “$OUTFILE” -ovc xvid -xvidencopts bitrate=320 -vop scale=320:240 -oac mp3lame -lameopts abr:br=128
Make the script executable and then run it as shown in the following example:
chmod +x gp2x-convert ./gp2x-convert sourcefile.avi destfile.avi
I would appreciate your feedback if you have comments, corrections or additions to this article, Thanks.