Please feel free to download and give it a try. I have a couple other imrpovements coming soon when I get a chance to work on them. They should include:
Direct link for download is here: http://www.box.net/shared/un3x08ato4
Snowboarding and Open Source Tech
-Now uses optparse python module for command line argument process handling
-New option for iphone/ipod-touch in addition to ipod-video and default modes
-Uses ffmpeg for processing ipod/iphone videos (H.264 and AAC codecs encoded to mp4 format)
-General code cleanup and slight re-factoring
-More verbose help options
$ ./mini-encoder.py --help
./mini-encoder.py - Encodes and resizes video files (avi or mpg) to fit
small screen resolution pmp devices. Resolution and codec formulas:
default - 320x240 (preserves original codecs from source video file)
ipod - 320x240 (re-encodes to mp4 using H.264 and AAC codecs)
iphone - 480x320 (re-encodes to mp4 using H.264 and AAC codecs)
Supply a path to the movie file you wish to encode (required):
./mini-encoder.py [options] --movie /path/to/file.avi
Options:
--version Print the version number of this program
-m, --movie Path to video file you wish to encode
-p, --ipod Encodes to mp4 format for use with ipod-video
-i, --iphone Encodes to mp4 format for use with iphone/ipod-touch
Usage: mini-encoder.py [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-m INMOVIE, --movie=INMOVIE
Input video file to encode
-p, --ipod Encode to ipod-video format
-i, --iphone Encode to iphone/ipod-touch format
Example for encoding for iphone/ipod-touch:
./mini_encoder.py --iphone --movie /path/to/movie.avi
$ ./wav2mp3.sh /home/nmaxwell/foo/
/usr/bin/bladeenc
Performing mp3 conversion on: /home/nmaxwell/foo/
Old filename: /home/nmaxwell/foo/song.wav
New filename: /home/nmaxwell/foo/song.mp3
BladeEnc 0.94.2 (c) Tord Jansson Homepage: http://bladeenc.mp3.no
===============================================================================
BladeEnc is free software, distributed under the Lesser General Public License.
See the file COPYING, BladeEnc's homepage or www.fsf.org for more details.
Files to encode: 1
Encoding: /home/nmaxwell/foo/song.wav
Input: 44.1 kHz, 16 bit, stereo.
Output: 128 kBit, stereo.
Completed. Encoding time: 00:00:07 (21.71X)
All operations completed. Total encoding time: 00:00:07
$ ./mini-encoder.py --ipod /movie/pineapple_express.avi
Filecheck: OK
Input filename: pineapple_express.avi
Output filename: pineapple_express_mini.mp4
Now running command: ffmpeg -i /movie/pineapple_express.avi -s qvga -vcodec libx264 -b 800k -g 300 -acodec libfaac -ab 128k pineapple_express_mini.mp4
FFmpeg version SVN-r15615, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --disable-optimizations --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-demuxer=v4l --disable-demuxer=v4l2 --enable-x11grab --enable-libfaad --disable-ssse3 --disable-altivec --cpu=athlon64 --disable-vhook --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale --disable-stripping
...
frame=161231 fps= 65 q=8.0 Lsize= 768341kB time=6721.71 bitrate= 936.4kbits/s
video:659616kB audio:105001kB global headers:1kB muxing overhead 0.487023%
[libx264 @ 0x64e6b0]slice I:546 Avg QP:14.37 size: 17141
[libx264 @ 0x64e6b0]slice P:160685 Avg QP:16.54 size: 4145
[libx264 @ 0x64e6b0]mb I I16..4: 8.4% 0.0% 91.6%
[libx264 @ 0x64e6b0]mb P I16..4: 4.5% 0.0% 0.0% P16..4: 83.2% 0.0% 0.0% 0.0% 0.0% skip:12.3%
[libx264 @ 0x64e6b0]final ratefactor: 15.34
[libx264 @ 0x64e6b0]SSIM Mean Y:0.9895233
[libx264 @ 0x64e6b0]kb/s:803.5
Encoding complete! Filename is: pineapple_express_mini.mp4
<map from="mp3" to="audio/mpeg"/>
<map from="ogg" to="application/ogg"/>
<map from="asf" to="video/x-ms-asf"/>
<map from="asx" to="video/x-ms-asf"/>
<map from="wma" to="audio/x-ms-wma"/>
<map from="wax" to="audio/x-ms-wax"/>
<map from="wmv" to="video/x-ms-wmv"/>
<map from="wvx" to="video/x-ms-wvx"/>
<map from="wm" to="video/x-ms-wm"/>
<map from="wmx" to="video/x-ms-wmx"/>
<map from="m3u" to="audio/x-mpegurl"/>
<map from="pls" to="audio/x-scpls"/>
<map from="flv" to="video/x-flv"/>
<map from="avi" to="video/x-divx"/>
<map from="DivX" to="video/x-divx"/>
<map from="divx" to="video/x-divx"/>
<map from="AVI" to="video/x-divx"/>
<map from="vob" to="video/x-mpeg"/>
<map from="VOB" to="video/x-mpeg"/>
<map from="ts" to="video/x-mpeg"/>
<map from="TS" to="video/x-mpeg"/>
<map from="mpeg" to="video/x-divx"/>
<map from="mpg" to="video/x-mpeg"/>
<map from="MPG" to="video/x-mpeg"/>
<!-- Uncomment the line below for PS3 divx support -->
<map from="avi" to="video/divx"/>
<map from="divx" to="video/divx"/>
<!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
<!-- <map from="avi" to="video/avi"/> -->