Thursday, December 17, 2009

Playing Videos on Android

Here's a quick and dirty way to get video playing on your Android phone from Linux.

These instructions are for Jeff Hamilton's free "Video Player" available on the Android Market.
I copied the mencoder command from here.

First encode the video in a format that the player can understand.

mencoder input.avi -o output.mp4 -vf dsize=480:352:2,scale=-8:-8,harddup -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=mp4 -ovc x264 -sws 9 -x264encopts nocabac:level_idc=30:bframes=0:bitrate=512:threads=auto:turbo=1:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh


Plug your phone into the computer using the USB cable.

Mount the SD card by pulling down the top bar USB notification and pressing the "USB connected/Mount" button.

Mount the drive in Linux.

Copy the output.mp4 to the SD drive mounted in linux.

Unmount the drive in the phone by pulling down the top bar USB notification and pressing the "Turn of USB Storage" button.

Run the Video Player app on the phone.

Select your video, and enjoy.