Wednesday, August 29, 2007

x264 (H.264) encoding for Pocket PC

I encode a lot of my music videos for viewing on my PPC. I used to encode to wmv until recently trying out x264. It gives much better quality at the same filsize. However you'll need a player such as CorePlayer v1.1 (commercial) to play them. (Anybody know of any good open-source PPC player for x264?)

I use MediaCoder (superb new open-source tool) for encoding. here are the settings I use:

- size=320x240; fps=15
- Audio: Nero HE-AAC, Target Quality; quality=25 (20-25 ok)
- Video: H.264,mp4, x264, quality based, quality=45 (40-50 ok)

video encoding command line:
".\codecs\x264.exe" "$(SourceFile)" --progress --no-psnr --no-ssim --thread-input --keyint 250 --bframes 3 --level 51 --direct spatial --crf 27 --threads auto --subme 5 --ref 1 --weightb --trellis 1 --me hex --merange 16 -o "$(DestFile)"

audio encoding command line:
codecs\neroAacEnc_SSE2.exe -q 0.25 -he -ignorelength -if - -of "$(DestFile)"

(please share any settings you might be using for your encodes..)

Friday, August 24, 2007

MediaCoder - the best video conversion,encoding,transcoding tool

If you have tried out video transcoding, you know how painful the task can be.

Commercial tools are easy to use, but the formats supported and their configurability aren't very good. I have used BlazeMedia, MPEG4 Direct Maker, Xilisoft Video Converter 3, divX convertor etc, which are good to start with, but soon you'll find limitations.

Free tools are much more configurable, but have steeper learning curves, and their own limitations. Another problem is that most tools are developed by single programmers in their free time, hence not actively developed and improved.

VirtualDub , the mostly used free tool, is pretty good, but supports only VFW and doesn't support DirectShow filters, which limits it's input video flexibility. It's such a pain when it says it can't open a file or crashes on you. Recently I came across a Xvid file which played perfectly in Windows Media Player (using ffdshow), but crashed VirtualDub. I'm not sure how difficult it is for VirtualDub to support DirectShow, but it's a badly needed feature for sure.
Other free tools I have used are "SUPER", which is easy to use but less configurable, "StaxRip" for x264 encoding, etc.

Recently I came across MediaCoder, which is open source, free, and is actively developed. It has a bit of a learning curve, but it's simply the best tool I have used so far. It's unbelievably configurable with almost all parameters of all codecs being configurable, and seems to be quite fault tolerant and stable too. It's actually a front-end for many other command line tools. It's surprising that it took me so long to know about this tool, and even a google search for encoding tools doesn't show this. So if you are into video transcoding, MediaCoder is definitely worth a try.

Please share your knowledge about any other tools, encoding formats, encoding settings etc.