Friday, June 5, 2009

WMV to FLV Conversion and Thumbnail Generation

Here are two handy command lines for converting WMV to FLV (which is a better format for hosted video), and generating thumbnails for those videos. Both use ffmpeg.

To convert from wmv to flv:
ffmpeg -i test_video_clip.wmv -ab 48 -ar 22050 -s 512x384 -g 50 -qblur 1 -pass 1 -b 800 -r 25 -y encodedvideo.flv

To generate the thumbnail:
ffmpeg -i test_video_clip.flv -an -ss 00:00:03 -an -r 1 -vframes 1 -y %d.jpg

Tuesday, May 12, 2009

Eclipse on Mac OS X

I don't know why Java support is so bad on Mac OS X. If you want to run Eclipse on Mac you may need to finagle it a bit. When I first tried to run Eclipse, I go the following error:
_NSJVMLoadLibrary: NSAddLibrary failed for /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Libraries/libjvm.dylib

To fix this, I first followed this blog post:
http://blog.kischuk.com/2008/05/08/running-eclipse-on-macbooks-with-java-6/

But, unfortunately I didn't have 1.5.0 installed. After a lot of googling, I found that Update 4 (available to registered developers through ADC) includes JDK 1.5.0

So, if you are having trouble getting Eclipse running, install Java for Mac OS X Update 4.