Recently I was looking for a small linux program to resize my avi and mpg files down to a smaller resolution to fit on my pmp device (Cowon D2), but didn't find much in the way of lightweight programs to do this. Up until now, I have just been using transcode on the cli with a bunch of options, but got tired of typing `history | grep transcode` or Ctrl+r to search my bash history for the exact params I used last time.
So, I just scripted this into a tiny python program to do what I wanted. Its called mini-encoder.py and simply resizes an avi or mpg file down to a resolution of 320x240, which is the native resolution on my Cowon D2 pmp player. The script also does some checks to make sure you are using the right input files, and that they actually exist!
The resolution is also hard-coded in the script itself, so if you want to use it and need a different resolution, just alter the resolution setting in the script. I am planning on adding a command line option to specify a resolution of choice, but haven't got around to doing it yet. Hope someone else finds this useful too. Enjoy!
Click on the link below to download the script (I have this hosted @ box.net):
Download mini-encoder.py
Wednesday, November 19, 2008
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment