AVI's On UIQ - A Guide To Watching Movies on UIQ Phones (Part 2)

Published by at

Intermediate Guide. Please note that copyright should be respected under all circumstances. AAS does not want you breaking the law.

Intermediate Guide

As we mentioned in the previous article, some AVI files – particularly those encoded with the DivX codec – can cause video/audio sync problems when converted using PV Author. If you experience such issues, then this guide is for you. To work around these problems, we will use Avery Lee’s excellent VirtualDub program plus our own WAV file utility jWavlength.

From what we can tell, one reason for video and audio getting out of sync is the result of the way that PV Author handles the MPEG-3 audio compression used in DivX AVI files. As previously mentioned, this can result in a small but irritating time delay where the video lags the audio in the converted 3gp file. We are going to address this by stripping out the audio component of the AVI file, decompressing it in VirtualDub, before recombining the audio into a new, larger AVI file. This resulting AVI file can then be fed into PVAuthor as before. Here we go.

Step 1: Saving a new WAV file. Run VirtualDub and open your AVI file. Go to the Audio tab and select Full Processing Mode.

Go to the File tab, select Save WAV and specify a filename for your WAV file. This will save the WAV file in uncompressed PCM format. For a full length movie, allow up to 1.5 gigabytes for this file to be stored on your hard drive.

Step 2: Checking video and audio file lengths. Once the WAV file is created, let’s take a quick look at its properties using jWavlength. Double-click on jWavlength.jar and open up your WAV file. Make a note of its exact length.

Now go back to VirtualDub and look for File Information under the File tab.

Compare the length of the video to the length of the WAV file. If they are very close in length – say under a second different – then that’s a good sign. We should be OK getting a good video/audio sync. If they are more than a second different in length, that’s not a good sign. It normally indicates there is a bad section of video. In that case we’ll probably need to do more work with this file in the Advanced Guide. As you can see, in this case the lengths are within 0.05 second – we are fine.

But back to business. Now we are going to recombine this WAV file with our original AVI file thereby creating a new AVI file. Later we will be running PV Author against this new file. However while we are in VirtualDub, let’s do a couple of things to make PV Author’s task a bit easier. We are going to resize the video to 240x156 and we are going to reduce the frame rate to 12fps. P800 users should resize to 192x125 instead.

Step 3: Setting the video parameters. Go to the Video tab and select Filters. Scroll down to Resize and you will see the following screen. Enter the dimensions 240 and 156 and select Bicubic as the filter mode.

Now go to the Frame Rate tab and enter 12fps as shown in this picture:

Go to the Compression tab and select DivX codec:

We’ve now finished with the video part.

Step 4: Setting the audio parameters. Now let’s just turn to the audio part. Go to the Audio tab and select WAV audio. Enter the WAV file which we created above. Make sure that we are in Full Processing Mode.

Step 5: Save the new AVI file. Go to the File tab and select Save AVI. Specify a new file name (different from your original AVI). Now sit back and wait while VirtualDub converts the file – this will take a while and depend on the speed of your PC. Note that this new AVI file will probably be larger than your original AVI – this is because the audio is now uncompressed.

Step 6: Run PV Author. Configure and run PV Author against this new AVI file exactly as described in the Basic Guide above. Hopefully you will now have a 3gp file which will play on your P900 with good video/audio synchronisation. Once you are satisfied with your 3gp file you can restore some space on your hard drive by deleting the ‘intermediate’ AVI file that you produced with VirtualDub.

If you still have video/audio sync problems then please refer to our Advanced Guide - which will be here next week!