Quality Video on Palm: Full guide
First, I want to explain the purpose of this guide. This guide explains in detail how you can prepare video to watch on you Palm handheld. It usable mostly for converting full-length 1.5-2 hour movies to be stored on even a small 128mb sd-card with uperior quality. But you can use it as well for preparing video taken with digital or video camera , tv-tuner captured video or another video from any other source which is stored in MPEG or AVI format , also Mpeg2. This includes most popular now-a-days DIVX and XVID videos. However it does not include converting a DVD – this is different process and I’m aiming to write another uide which explains it. (please tell me anybody if you need such guide.) .
This guide is targeted for an inexperienced users as well. So anybody which is not familiar with video conversion/compression issue could also prepare and watch movies. The text marked with /*….*/ is some additional advanced explanations, and comments. If you are new to all this and you just want to prepare quality video for your palm – you don’t need to read them.
This guide was inspired by my previous guide Here
on the Brighthand.
All programs mentioned in this guide are free , mostly open-source software best in their field.
The only program which is shareware – is a player for Palm – Mmplayer
. But it is the only player for palm which can directly play Divx/Xvid/Mpeg video.
/* If you know another such player – please tell me. */
Now , before we start doing anything, a reasonable request from your side would be to test the result immediately. So you can decide from the beginning whether it worth dealing with.
No problem at all. I prepared a couple of files – parts of movies already good for watching them on Palm. So all you need to do – is download a Mmplayer and one or more of the test video files and see by yourself. You can download any version of Mmplayer, the last for now is version 0.2.12. Get it here: MMPlayer0.2.12.zip
. I personally use version 0.2.8, here: MMPlayer0.2.8.zip
and 0.2.6 , MMPlayer0.2.6.zip
. The guide was tested on 0.2.6 and 0.2.8 version. Since everything works fine for me with these versions already – I see no reason to upgrade. Also there are rumors that newer version might be slower. OK, here are some examples for download. : These files were prepared to be watched on Zire71, so they should run smooth any other equivalent or faster OS5 machines, which means all other machines except Tungsten|E .
/* T|E users also can watch movies on their pda, but you need overclocking, just read ahead */
video type: Fast motion ( “The Matrix” fighting scene)
file length: 2min 6sec, file size: 5.5mb
video type: cartoon
file length: 1min 52 sec, file size: 5.5mb
-=Specially for Tungsten||T3 users or other with 480x320 screen.=-
video type: fast motion (StarWars space fight scene)
file length: 3min 4sec, file size: 8.8mb
All files were created using Xvid video codec (last version) and Mp3 audio codec.
P.s Of course you can watch files on your computer too, but they look MUCH better on Palm’s screen than on computer monitor.
P.s2: Some users said that they can’t download files. Well these are not direct link to the .avi files because the server I’m storing files on, doesn’t support direct download. (If anyone know better free server to store some 20mb – tell me) So after clicking on the file, you just need to click on “follow this link to save the file”
Well, I know this is silly to try to “show” how video looks on palm screen by pictures, but anyways, here’s a couple of screenshots of my zire71 screen :
If somebody has troubles playing those files, here’s short explanation. It depends whether you have or Don’t have card reader
A)you do have card-reader. Just copy the .avi files on your SD card, than, after launching MMplayer, you will see this window:
Than go to “Playlist” tab and add your file(s)
Than go back to “Main” and play the file(s).
B)You Don’t have card-reader. You can encounter some problems adding .avi file to your handheld. So I suggest using this simple technique: just rename the .avi file to .pdb file so, hotsync manager won’t complain. After you synchronized , you have to rename the file back to .avi on the palm itself using any file manager, like Filez (free) /Mcfile/Zlauncher…
/* OK, now, before I start the guide itself, some of you make ask the following question:
Why to use especially THIS solution? There are many programs like Kinoma/ Smartmovie/ PocketDVD/other?
Let me explain about this in couple of words. First, all these programs can be divided into 2 categories:
1) programs like Kinoma, which use their own format to play, It also includes a application for PC which will convert files.
2) Programs like Smartmovie just help you to convert the file to smaller .avi format – similar to what we will do in the guide.
1) Of course kinoma has it’s advantages – it is very fast, easy to use. If you have older M515 or other OS4 pda – kinoma is probably your only choice. But you can’t compare kinoma’s format to the most advanced video compression format in the world, which is Divx/Xvid, and other mpeg-4 (wmv9/rv10/vp6/sbc/…) There is no any other “special” format which will give you better quality/size that Divx, especially Xvid. So if you want to be able to put full movie on 128mb card having superior quality – you have to use Mpeg-4 (divx/xvid).
2) Most programs of this category will not give you access to some advanced codec parameters, which will give you even better quality/smaller size. I’m talking about things like amount of b-frames/ vhq mode, etc.
Bottom line: So why spending money on buying software , if you can do
everything by yourself, and even with maybe better result all for free? */
/* In this guide I will use Xvid codec, since imho it is currently the best of all other mpeg-4 codec, as you can see here in the most well-known Latest Codec Comparison
/* Xvid has another advantages: it enables you to use more b-frames (see explanation ahead) and it allows you to specify the file Size and not just bitrate, which is very useful. But this is a matter of choice. Differences are hot that huge and you of course can use any other Mpeg-4 compatible codec like Divx5/Sbc….. */
Finally, we can start the guide. OK, here’s the software you will or may need:
-=GUIDE STARTS HERE=-
1) Download and install necessary software VirtualDubMod
– the main program we will work with. Latest XVID codec Lame MP3 codec
. Most chances that you already have mp3 codec, but anyways.
Other various free video/audio tools can be found here
This is what we will need for the process. But you also may need another codecs (decoders) to be able to open some files.
For example files with AC3 sound. So if you having troubles opening some partiqulair files, download This Codec pack
, which contains: DivX3.11alpha, DivX5.11 Pro, XviD Koepi 1.0.1, Huffyuv 0.2.2.1, AC3Filter 0.70b, mpgaudioax, Morgan Stream Switcher and ffdshow
2)Opening file in VirtualDubMod.
After starting virtualdubmod, open file you want to convert by File->Open video file. It can be .Avi or Mpeg file mostly. In my case I will convert a Shrek2 video file which is 700mb – 1 cd (that I downloaded over P2P, but let’s not talk about this)
After loading file into virtualdubmod, you should see it opened:
If you want to see what codecs file is made of , you can go to File->File information:
this file is made using Xvid video codec and MP3 audio codec.
3) Video frame rete (fps):
Ok, Unless you file is somehow specially made , it will probably have about 20…30 fps (frames per second) – what most video files have. – you can see this info in previous picture. Most Palm’s can’t handle such huge framerate , maybe only those with 300mhz cpu or faster. And even than consider that leaving frame rate as is will require twice size to achieve same quality leve, which only possible for one movie on 256mb sd, and not 128. Anyway, set video framerate to a Half by Video->Frame rate->Process every other frame:
If your file is made by some digital camera, and is already 10 …15 fps or lower – no need to change anything.
4) Video resolution.
Well, this is most important part. Make sure you do everything right. First, make sure that black point is set to Video->Full processing mode
Go to Video->Filters->Add->Resize, you will see this window.
/* I know there are more advanced resize filters like vdmod_resize, just didn’t want to complicate things */
Ok, resolution depends on both input file and your device capabilities.
Device capabilities restrictions:
This is for slow pda users, like me which includes: Especially T|E (126mhz) Zire71/Tungsten|T2/Tungste|T (1447mhz) and Sony devices with similar speed. To all these users I would recommend using Overclocking programs,which is completely safe up to some degree. . See appendix A at the end of the guide called “Overclocking”. If you use Overclocking – you will not have any special restrictions: I’ll try to make it simple. Especially T|E users’ can’t playback video in full screen, since cpu is too slow. But most video is not “sqaare” so you won’t be needing full 320x320 pixels. You can leave X-resolution at 320 only if Y resolution will be very small (see below how to choose it) like 144 or 128. If Y-resolution will be large enough, like 176 or 208 – you will have to reduce Both X and Y resolution even more. For 144mhz cpu users, it is less critical, but for example you can’t play too large files, like 320x256 or 320x240.
Faster machines, 200mhz or more – don’t have these restrictions. No. So how do we choose output resolution? Fist, make sure you don’t change aspect ratio too much. /* Aspect ratio is relation between X resolution and Y resolution) */ otherwise picture will be stretched too much. Than Set the X-resolution to maximum of your screen dimensions, 320 for most or 480 for Hires+ TT3’s and others. Than calculate Y-resolution accordingly to the relation between X and Y. Here Shrek.2 has 608x320 resolution. So , 608/320=1.9. So If X-res will be 320, than Y-res will be calculated this way: new.Y-res = new.X.res)/(aspect ratio) = (320/1.9)=168. So we get 168.4 pixels as Y-resolution. Now it is VERY important that you will approximate the number to the nearest number which divides by 16 ( or at least by 8) This is because resolution has to be dividable by 16 in ANY video,not just for palm. So We can make Y-res to be 160 OR 176 – it’s your choose. For faster machines choose 176.
/* Now little back to slow cpu users: For Tungsten|E I woild choose 288x144 in this case. */
For T|T3 users it will be 480x256.
As a filter mode choose “precise bilinear”, finally it will look like this in my case:
5) Video Codec settings:
Go To video Video->Compression, you should see all you video codecs installed:
Xvid will be the last one in the list, choose it and “configure”
Change profile to “unrestricted”
In “encoding type choose “Two-pass – First pass”
Than click on the upper-right button (…)
Ok, here’s couple of things to explain:
You may put “adoptive quantization” to ON, but it’s not that important,
Make sure “closed GOV” is checked.
Now about BVops, aka B-frames:
In two words: B-frames will help reduce quality, but will require more power to play, so if you have 144mzh cpu or slower, and you are NOT going to use overclocking, than better don NOT choose to use bframes, otherwise put 1 or 2 in the “Max consecutive BVOP’s” .
/* What are b-frames? Most frames are P-frames, which means that the frame is decoded only using information from previous frame. espite it, B-frames are bi-directional frames that use information from both previous and next frames. As a result – they will be smaller than P-frames and you can get your video to be better quality when compressing high (and we ARE compressing high) But, as a side effect – video will be slightly harder to play – it will take more processor time. This is not a concern for most PC’s ,but is is problem for slow Palms. */
If you have 200mhz or faster device and you are trying to put many video to small space (as we all want) - for example 1.5 hours to 128mb – I DO recommend using 1 or more b-frames , since it will help to compress video even more. By the way, If you use Divx instead of Xvid – you are restricted to only 1 b-frame. I am using overclocking for my zire71 , so I put 1 b-frame.
Thank click OK, and click on “Advanced optins”
Set VHQ mode to 4 - this will make encoding longer but will produce better quality.
Set also chroma motion,
Set’ “use cartoon mode” if it is a cartoon. – It is in the case of Shrek2.
You may put “turbo” as well, (but don’t expect it to be much faster)
Click OK twice.
6) Audio Codec settings
Go to Stream->Stream List,
You will see smth like this:
Right-click on your stream, choose “full processing mode” , Than Right-click again, and choose “Compression”
You will see all your audio codecs installed in your system. You may have more than one MP3 (mpeg-layer 3 ) codec, it doesn’t’ matter which to choose
So choose Mpeg-layer-3 and than you need to choose audio bitrate:
How to choose?
Well, it depends mostly on whether you are compressing “Very much” or not, one normal moive aimed for 128mb sd-card is pretty much, so in this case I would recommend to choose 24kbps/24khz/mono. If you are compressing one movie to 256 sd card ( 180mb and more for 2 hours) - you can choose better sound quality – 48kbps/48khz/mono , no need to go higher, you won’t hear the difference, better save your free space ( if you have ) to a video part .
I also strongly do NOT recommend using stereo sound , unless you have much space (256mb and more) and you want perfect video and audio quality.
I have abut 190mb free on my 256mb SD card - so I decided to go for “better” quality – 48/48/mono.
*Optional:* If your video has too low volume – you can experience low volume problems in Mmplayer – so in that case you may increase volume by right-click->Volume:
7) Saving temp and Output files
OK, now , after adjusting all the settings,
Go to File->Save as, and there type any filename, like temp. This is NOT your result movie file – is is only the first pass file , and you won’t be needing this.
Also make sure you check “Don’t run this job now….”
Almost there, just last stage:
Go to Video->Compression-> Xvid -> Configure, and set encoding type to “2-pass – second pass”.
There you must specify the filesize you want for your video part. NOTE, this is not the final size of the movie – this is only video part, you have to consider audio part too. So first you need to calculate audio size, to simplify the process, you can use this bitrate calculator program, get it Here
go to “disk space” tab, set divx bitrate to 0, fill “input length video” - Shrek2 is 1hour 32min. so I put 32min. Than choose your audio bitrate you have chosen before. You will see a size in megabytes that audio part will take. In my case it is 32 mbAlthough Xvid is very advanced codec and can do wonders, don’t push it too far. For example compressing 2.5 hours to 64mb is theoretically possible, and Xvid will make the file, but it will look really ugly.
By the way, this calc can also help you calculate resolution, see next tab “prop.calc” But it’s too late now .
So now we know how much audio will take. So put video size accordingly. In my case: I have free 190mb on my SD card, audio will take 32mb, so I have 158mb left for video. 158mb is (158*1024)=161792kilobytes. But never try to make the file just “up to the last bit” – it will be pity if your file doesn’t fit, and you will have to do all over again. So to make sure , I leave some 10mb free , and put 150000 in video size:
Than go to File-Save As, and write your desired filename – this will be your result movie file. Leave “ Don’t run this job…” checked.
Than go to File->Job control, you will see there 2 jobs. In my cas I have some more jobs (movies to make) that I don’t want to delete. You will see only 2 last lines, just click start.
Than you will see the following window, you can see how much time it will take . Not, this is for only First pass, Second pass will take same or longer time. For some decent Pentium3 class processor or higher, it shouldn’t take longer than 3-5 hours.
That’s all! Seems difficult? No, not at all, maybe the initial setup will take you some 10-15 minutes. After you encoded first movie – it will take you just 2 minutes to start another.
Shrek2 is on my zire:
Appendix A – Overclocking,
Well, unlike in PC area – you cannot burn anything by overclocking, but you can lead to instability that may need soft or even hard reset. However it is pretty safe to overclock to some degree. For example T|E and Zire 71 have same processor - Texas instruments Omap310 processor, On manufacturer’s page here
is specified that this processor is designed to work at 175mhz. So palmOne reduced the processor speed to preserve the battery. That’s why I’m sure it is completely safe to overclock these 2 machines up to 175mhz or so – this should be enough to watch movies in full screen.. Anyway, I overclock my Zire to maximum – 192mhz – never had any problem. So to overclock the processor you can use a program called “Lightspeed” , see here