* Find the video you want to view in a suitable size.
* Re-encode the video to a suitable size.
The latter option may seem daunting for the beginner, but it's actually not that hard, and once you get the hang of the different processes involved, it's mostly just fun. And if you get uncertain about what's the "best" setting along the way, you just need to try one setting now and then try another later. You will need to encode some 5-10 videos before you get a feeling for how different settings affect the end result. Here's a little guide on how to encode videos using VirtualDub.
Software
First, you should download and install the software you need:
1) VirtualDub: This program lets you encode a video (and audio) into the .avi format using any codec you have installed.
2) DivX or XviD video codec. The video codec is used to encode the video stream of the .avi file.
3) MP3 codec: This is the Lame mp3 codec that is used to encode the audio to an mp3 stream.
Encoding
When you have installed all software. Start VirtualDub and load your video file you wish to convert with File->Open video file...
Video
Then you must tell VirtualDub how to encode the video:
- Select Video->Full processing mode
- Select Video->Filters... This opens up the filter dialog where you can add all sorts of filters to be applied to the video before encoding. We want to resize the video so press Add... and select the resize filter. Enter the desired size and optionally a filter mode and press Ok. (Different filter modes results in different grades of smoothness of the resized picture, just try them and see which one you prefer). If you want to cut the left and right borders to convert the movie from widescreen, you can press Cropping... and use the cropping dialog to crop the input video. Regarding video sizes, larger video sizes are harder to decode for MMPlayer so if you use more than 160x160, MMPlayer may skip some frames to be able to keep up with the audio track.
- Select Video->Frame Rate... As I wrote above, MMPlayer may skip frames in order to keep up with the audio stream if the video size is too large. As a general rule it doesn't skip frames at 160x160 but it skips so called B-frames in larger video sizes. So, when you encode a video, you can either encode the video using B-frames or you may set the frame rate by yourself using this dialog. If you choose to change the frame rate, the best way to do it is to use the Frame rate decimation (decimate by 2) because this doesn't affect audio/video synchronization. We recommend using B-frames instead of changing the frame rate because this means that the video may be played without skipping frames on more powerful Palm devices.
- Select Video->Compression to select the video codec. All codecs installed will be listed here. Select the DivX codec and press Configure. The DivX codec dialog has quite a few settings and I won't explain them all, just the most important ones.
- Bitrate mode: Quality based - it tries to enforce a constant quality throughout the video, 1-pass - it limits the bitrate at a specified value, 2-pass (or multipass) - it uses several passes to distribute high bitrates to fast moving sections and lower bitrates to slower moving sections. Multipass encoding requires more than one Save (see below). The first save is done using 1st pass, consecutive saves are done using 2nd pass (or nth pass).
- Encoding bitrate: Sets the bitrate if the bitrate mode is bitrate based.
- Quantizer: Sets the quality if the bitrate mode is quality based.
- Use Bidirectional encoding (Profiles tab): This enables B-frames. You must at least select the Portable profile to be able to check this box. This setting is only available in DivX Pro.
Audio
Now it's time to configure the audio stream:
- Select Audio->Full processing mode
- Select Audio->Interleaving... In this dialog, the most important thing is to keep the interleave low, otherwise MMPlayer might have to throw away video packets when playing. (You notice this by blocky artifacts when playing). Set the audio interleave to 1 frame.
- Select Audio->Compression... This is the audio version of the codec selection dialog and lists all codecs currently installed. Select MP3 (or MPEG Layer-3) and select a suitable format in the list to the right. Don't overdo it, a too high audio bitrate will take too much CPU to decode and may degrade performance notably. I have good results with ~16-22kHz mono and bitrates around 16-32 kBit/s. It's also important to choose a frequency that the target device can play. For example, the T|T can't play 24kHz audio, but most other common frequencies, see 4)
- If you need to change the audio frequency, this can be done using the Audio->Conversion... dialog. It's quite straight-forward, just select what you want and press Ok.
Do it
Not it's time to encode the AVI file. If you want to make short sample, you can select Video->Select Range... and set the length of the video. Then select File->Save as AVI... select a file name and press Ok.
Alternative software
Dr. DivX
If you still think all this sounds too complicated, there are solutions for the really green beginner. One of them is called Dr. DivX and is very easy to use. The downside is that you can't do everything you can do with VirtualDub. Be aware of that if you plan to buy it, you pay for ease-of-use, not powerful functions.Videosize
This is a small Palm program that can help in selecting good bitrates to fit a particular size, or to see how large the file will be given a certain bitrate setup.Pocket DVD Studio
Pocket DVD Studio is a commercial video encoder that can convert a DVD to an AVI file suitable for MMPlayer in one step.PocketDivXEncoder
PocketDivXEncoder is a free program (GPL licence) to encode videos for PDAs and is a good alternative to use when encoding videos for MMPlayer. It can't do DVD ripping though, only the conversion step. So it's optimal if you have a large video that you want to re-encode for MMPlayer.UnLoGiC Movie Converter
UnLoGiC Movie Converter is a free converter program that can convert DVDs to a bunch of different formats suitable for handheld use. It also has a collection of profiles if you want to encode to a specific target device.Recommended encoding parameters
One of the most common support questions we get is: "What encoding parameters is optimal for my device X". There is no way we can keep track of all devices and find a set of (so called) optimal encoding parameters for each one. For one thing, optimal means high quality for one person, high compression for another, and a good compromise of quality/compression for a third. This makes the use of the word "optimal" in these issues quite ambiguous.There have been a number of attempts in our forum to try to collect these precious encoding parameters for different devices, which is why I haven't taken the time to add them to this page until now. But since time is passing and the questions keep flowing in, I needed to take the time.
So, even if we can't give you any optimal parameters, we can, after seeing lots of common mistakes people do, give you a few guidelines regarding encoding:
Audio:
When playing a video on a handheld device, the most important channel is the video. Bad audio can of course ruin the experience, but what we're suggesting is that the audio is encoded at a "good enough" setting. This has several benefits. First of all, you can spend more bits on the video. Often when encoding a video, you try to get the file under a certain size, for example to be able to fit a number of videos on one memory card. So, if you spend less bits on the audio, you can spend more on the video and increase that quality. Second, the CPU is a limiting factor when decoding video (and audio) on a handheld device. So, the less audio bits that must be decoded, the more video bits can be decoded.Start with someting like:
| Sampling rate (frequency) | 22050 Hz | CD-quality audio is 44kHz but since audio at 22050Hz is quite acceptable, we can save 50% of the bits and CPU time required to decode the audio by only using half of the number of samples in CD-quality. |
| Channels | 1 (mono) | If you really want stereo and want to listen using earphones, then use stereo. But you may have to sacrifice some video quality, especially if you have slower device |
| Bitrate (Quality) | 24-48 kbps | CD-quality audio is often encoded at 128kbps, but since we cut both the sampling rate and number of channels in half, we can get away with ~1/4 of the bitrate. |
Video:
Above, we suggested that the audio is encoded at a "good enough" setting. For video, on the other hand, there's more room for improvisation. That is, if the CPU of the device can handle it. If you have a slower CPU, i.e. < 200MHz, you might be limited by that CPU and may need to stick to the lower end of the bitrate spectrum. But if you have a fast device, like a T|T3, T|C, Zodiac etc. you can select a bitrate suiting your quality/compression requirements.Another very important, probably the most CPU demanding, parameter is the video size. Devices like the T|T3 and Zodiac have a 480x320 screen but if you encode a video at that resolution, it will probably not be able to play it in real-time. The T|T3 has some kind of magic limit at ~2.500.000 pixels/second. So, if you use a frame rate of 25 FPS, you must keep the resolution below 100.000 pixels which is ~408x240. One good compromise is to use MMPlayer's 3/2x zoom mode and encode the video at 320x240. Such a video will get zoomed up to 480x320 and will look quite ok. But if you're encoding a widescreen movie, you might not need the whole 480x320 area but can use the full width but a smaller part of the height, keeping the total number of pixels below 100.000. On the other hand, you can of course encode the video at a lower frame rate (like 15FPS) to keep the pixel count below 2.500.000/second.
Enough talk, let's get to the numbers:
| Video size (resolution) | 320x240 | This may be too high for slower devices. For such devices, or if you want to encode a video and be able to watch it on most devices, select 240x160. That resolution can be zoomed to 320x240 on a 320x320 device and to 480x320 on a 480x320 device. On smaller devices like the Treo 600 and Zire 31, you should encode at 160x160 or lower. If you use a higher resolution, you're wasting both space and time. |
| B-frames | Use B-frames | See discussion about B-frames above. |
| Bitrate (Quality) | 96-300 kbps | Devices like the Treo 600 can go below 96 kbps if the video is encoded at 80x80. Bitrates above 300kbps is often just a waste of space. You *can* perhaps see a difference between 300 and, say, 400 kbps, but 300 kpbs is well enough for almost all purposes. |
| Variable bitrate | Use it if you know what you're doing | Variable bitrate is very useful if the video has both slow motion and fast motion sequences. If you use variable bitrate, the encoder can save bits in the slow motion parts, and use those saved bits in the fast motion parts. However, keep in mind that the device can't decode more than a certain number of bits/second, so the max bitrate must be kept fairly low compared to variable bitrate settings used for standard computers. I recommend a max variable bitrate of ~1.5-2x the nominal bitrate. And when you have encoded a variable bitrate video, play through the fast moving scenes and make sure the device can keep up. |

Encoding videos for MMPlayer