Anything listed in RED is to be removed from the guide and is only there for a reference.

 

Encode DivX Videos for the PocketPC
Guide by
Dan “BetaBoy” Marlin
Revision v2.0


With this guide we hope to help you learn how to encode DivX videos for use with the Pocket DivX Player on all PocketPC (PPC) devices.

 

Please note: When encoding you must take into consideration the specific PPC device that you are encoding too for playback. A DivX Video that is encoded for one PocketPC device may not play properly on another PPC device.

What you will need:

· Compatible PocketPC Device

· Pocket DivX Player http://www.projectmayo.com/projects/detail.php?projectId=9

· DivX Codec   http://www.divx.com/download/downloadlist.php?typeid=1

· VirtualDub  http://www.virtualdub.org

· MPEG Layer-3 Codec



Let’s Begin:

Start VirtualDub. Choose File | Open video file and open the video you want to encode.


images/vdub1.gif

Next, set audio to full Processing by choosing:
Audio | Full Processing Mode

images/audiofull.gif

Also make sure video is set to full Processing as well by choosing:
Video | Full Processing Mode


images/videofull.gif


Audio:

Before we encode… The Pocket DivX Player will play either stereo or mono audio and is using the MAD MP3 decoder library. The Play list editor is very handy in creating a series of songs and videos to play at once.

 

Now we want to configure how the audio is compressed in the video. So next go to Audio | Compression. If the MP3 codec is installed, Select 'MPEG Layer-3'.

 


images/acompression.gif

 

* For the profiles listed in the video section below. We suggest audio at 32kbps at 22khz Mono. Though you can try to encode at higher bitrates or try a stereo setting and work your way back down if audio begins to skip during playback after encoding. But we have done the testing already for you and found that the settings above have been a perfect match for almost all PPC devices.

 

Video:
Next we are going to go to Video | Compression


images/vcompression.gif


Select the video Compression menu and select 'DivX Codec’. Press
Configure to setup the codec options. But, hold on… Here is where you have to STOP…. And truly think about what PPC platform you are going to encode to and possibly any other potential people on other PPC platforms that will see the video as well.

Note: You must also think about possibly encoding your video pre-rotated (90˚) without using the "rotate" mode within the Pocket DivX Player, which is slower and takes up resources. Fortunately for those you have an IPAQ this is not and issue but for almost all other PPCs, encoding a video pre-rotated will perform better than using the rotate option. To pre-rotate a video in virtualdub you must use a filter. This is discussed further on down in the guide.

Here are the three different profiles we suggest you encode too.

Low Quality
Devices: All PPC platforms
Settings: 160X120 15fps 100 kbps
Audio
* (see Below)

Medium Quality
Devices: IPAQ, E100, E10x, E125, EM500, HP720, ARM devices
Settings: 320x(176/240) 10 fps 100-150 kbps
                               or
160X120 24fps full screen cleaned 100-150 kbps
Audio
* (see Below)

High Quality
Devices: IPAQ, E125, EM500, HP720, ARM devices
Settings: 320X(176/240) 24fps 250 kbps
                              or
160X120 24fps full screen cleaned 200-250 kbps
Audio
* (see Below)

Though it is NOT mandated that you use one of the profiles listed above. Remember that if you are going to use a different resolution, that you’re cropping and aspect ratios are divisible by multiples of 16x. For example: 320x176 for 16x9 (1.78:1). 320x128 videos crop from 2.35:1 to 2.5:1

Once you choose the profile you want to use, let’s configure the codec settings.

Encoding: 2-Pass Explained
In the codec parameters box, we have several encoding methods in which to choose from. We suggest for optimal quality and file size that you use 2-Pass encoding. This encoding process is done just like it suggests, in 2 parts. The first pass analyzes the video and creates a log file. Then you do the second pass that actually will do the encoding from the log file that was created from the first pass.

Note:  Don’t mess with quantizers in 2-pass mode as the codec will use quantizers of its own, according to complexity of the frame, average complexity, average quantizer, set bitrate, etc Changing the parameters to anything else than defaults (shown below) will have an effect on the 2nd pass.  So as a result your frame complexity values are not precise.

Also… For those that are going to ask… “How do I do 2 passes at once in VirtualDub?”. We have already created a guide just for you called ”How to Encode 2pass VBR with DivX™ 4.0 Using VirtualDub's Job Control http://www.divx.com/support/guides/2pass_vbr.php?cid=2&gid=4”.  It’s easy enough so that you can incorporate the ‘job control’ into this guide too.

Encoding: 2-Pass, first pass:
To begin we choose from the General Parameters | Variable bitrate mode pulldown menu, choose 2-Pass, first pass


images/2pass1.gif

 

Next you put “performance/quality” to Slowest.

The next setting is your ‘Output video bitstream’. This will be the bitrate setting you have chosen from the VIDEO PROFILE above. Either:

Low Quality: 100 kbps
Medium Quality: 100-150 kbps
High Quality: 250 kbps

Need more help with these settings? Is your video not coming out like you would like? Then try looking at what others have suggested works best for them here in our forums:
http://www.divx.com/forums/viewtopic.php?topic=17455&forum=5


Once you have set you Codec settings for the first pass, choose
OK to close the configuration box.

Encoding: Filters

Next we have to set a resize filter and the FPS (frames per second) via decimating for the PPC device you are encoding to based upon the profile you have chosen.

Note: Why decimate the framerate? Because it is the best way to lower the file size. Also note that though it’s not shown in the guide that if your video has top and bottom black bars you must add additional cropping and resizing filters. As the bars compress poorly. Plus it simply looks better ;-)

 

To resize the video, go to Video | Filters | Add and select Resize and hit OK:


images/addfilter.gif



Next in the width and height fields choose from your profile. Either:

Low Quality: 160X120
Medium Quality:
320x(176/240) or 160X120
High Quality:
320X(176/240)

 


images/resize.gif

After you have added your dimensions, from the ‘filter mode’ pull down menu choose the Bicubic filter for the best video quality. If you want to see a preview of what the video is going to look like and to make sure the dimensions are correct, press the 'Show Preview' button. Make any changes to the width and height if necessary. Press Ok to close the ‘resize’ box.

 

Now it’s decision time. Do you want to pre-rotate the video? If so you need to add a filter to do this. Scroll down the ‘add filter’ menu and highlight ‘rotate’ and press OK.
 

images/rotate.gif

When the ‘filter: rotate box’ comes up. Choose the appropriate rotation that you want to use and press OK to add the filter.

 

Now press OK again to close the ‘Filters’ box which will now list the filter(s) you have just added.

Next we have to adjust the frame rate (FPS) by decimating. So go to
Video | Frame Rate.

 

images/framerate_menu.gif

 

In the middle of the frame rate control box is the “frame rate decimation’ area.  Choose Process every other frame (decimate by 2) and press OK


images/framerate.gif


That’s it for the ‘2-pass first pass’ so go to
File | Save as AVI select a filename and a location to store the ‘dummy’ video. This may take several minutes to hours depending on the video to be analyzed.

images/saveas.gif

 

Encoding: 2-Pass, second pass:

Remember we still have to do a ‘Save as Avi’ one more time before our video is complete. Once the first pass is completed it’s time to do the second pass so go to:


Video | Compression | Choose DivX Codec | Press Configure

 

From the General Parameters | Variable bitrate mode pulldown menu, choose 2-Pass, second  pass and make sure that the bitrate that you chose for use in the first pass is in the ‘Output Video bitstream box’ for the second pass as well. Meaning either:

Low Quality: 100 kbps
Medium Quality: 100-150 kbps
High Quality: 250 kbps



images/2pass2.gif


Now finally all you have to do is press OK to close the ‘Codec Configuration’ box and go to File | Save AVI for the second time select a filename and where to store the video to begin the final encoding process.

This may take several minutes to several hours depending on the content that is being encoded and the settings used. After it is completed check the quality of the video on your device and see if it plays as you would like.

Now put together a play list and enjoy the show!