PapaJohn Productions

Newsletter #164 - Aug 25, 2007
a codec named ffdshow
 

 
It's easy to swear about codec issues, and much harder to learn about how they work. Part of playing and editing multimedia files is about using codecs... the compressors and decompressors that work behind the scenes. If all goes well you see the videos and hear the sounds... if not, you might not see or hear part of a movie, or you may experience the crash of a software app such as Movie Maker.
 

This is the first newsletter devoted to a codec outside the world of the Windows Media ones from Microsoft. I'm doing it because the world of MPEG-4 files such as those compressed with Divx and Xvid codecs is so popular, and because this codec worked well in the first tests on my Vista Home Basic laptop.... in Movie Maker 6 projects made with a mix of Divx, Xvid, Motion JPEG and DV-AVI video clips.
ffdshow is a DirectShow and VFW codec for decoding/encoding many video and audio formats, including DivX and XviD movies using libavcodec, xvid and other open sourced libraries with a rich set of post processing filters.
My Problem Solving > Crashes and Hangs page includes ffdshow.ax in the list of codecs that are problematic to Movie Maker. A Vista newsgroup comment to a post about DVD Maker by zachd of Microsoft a few days ago perked my interest "... It's common for AVI files to use DivX variations, and there's tons of bad versions of DivX codecs out there. I suspect that the best current decoder to use is FFDShow Tryouts beta 3 (July 2007)..."
 
So I downloaded and tried it. Here's the link.
The installation went well, and checking the codecs on my XP laptop with GSpot showed promise as it used the new codecs to test the viewing of Divx and Xvid encoded files.
 
For my first test, I imported one Divx and another Xvid encoded file into MM2.1, previewed them in the collections, added them to a project and edited them by a number of splits and adding transitions and effects... and successfully saving the movie. Maybe zachd is right!! 

For my second test, I ran the intriguing little utility included with ffdshow... makeAVIS.exe. You open an AviSynth script (.avs file) with it, and convert it to an ffdshow script (.avi file). Theory has it you can then use the avi script as if it was an avi file in apps that work with avi files, such as Movie Maker. ffdshow is then a middle man between AviSynth and the user app.

Intriguing yes, but it didn't work for me. I tried to open the avi script in Movie Maker 2.1, WMP11, and VirtualDub. Each promptly crashed.
 
And a day or two later, my initial positive experiences with MM2.1 in XP didn't continue.... I was watching crashes and reading error messages. But Vista kept chugging along without problems, maybe because I haven't filled it up yet with lots of other codecs.
 
Let's explore this new version of ffdshow, my first using any version of it... so I won't be commenting on changes from previous ones. Before getting into it, here's
 
 
... a note...
 

 
Note...
 

Support Space is ramping up into a topline professional online support service. A number of MVPs are involved, and we're almost at the point of opening the gates a little to let friends and family members in help them with any Windows XP related computer problems.

 

If you're a regular newsletter subscriber and have an issue you would like some help solving, send an email and I'll invite you into the service for a 'free' support session.

 

In addition to providing problem-solving I'm looking forward to using it to provide quick-start learning experiences about Movie Maker and Photo Story to a wider audience.

 

 
.... back to the main topic...
 

 
ffdshow on Windows XP
 
The downloaded file is 4+ MB in size and named ffdshow_beta3_rev1324_20070701_clsid.exe. Opening or double-clicking the file runs the installation. There are a number of steps at which you can stop and select different options, but after the first window shown below I simply used 'Next' at each screen to accept the defaults.
 
I installed and uninstalled the package many times on both the XP and Vista systems without an issue, and without pop-ups trying to sell me something. The app comes from the open source community... Source Forge.
 
Installed...
 
This figure shows my installation choices, all but the DScaler plugin. The default installation would be for just the VFW interface.
 
Install Options
 
Here's a list of the files and subfolders in the new ffdshow folder... just one .ax file... one of the problem ones on my website's Crashes and Hangs page.
 
Files-Main
 
Checking the installed codecs on the system, using GSpot... 4 new audio and 4 video ffdshow items.
 
GSpot - ffdshow items
 

 
Some Quick Checks... XP
 
I checked a couple Divx and Xvid Encoded Files with GSpot... indications were the new codecs were being used, and the system could play them. 
 
My XP laptop has hundreds of codecs... and is already able to play Divx and Xvid encoded files, so I didn't know how much of a check this was. My new Vista system isn't setup yet to play such files... we'll see that system later.
 
Now to see what that makeAVIS.exe utility does...
 

 
Make AVI ScriptConvert an AviSynth script to an AVI script...
 
If you're not familiar with AviSynth and it's avs scripts, feel free to skip these sections...
 
An AVI script was a new subject to me so I had to give it a quick try.
 
Open the makeAVIS.exe and point it to an existing AviSynth script, an .avs file.
 
The settings shown at the right are the defaults.... I usually go with them on first attempts.
 
Clicking the Create button at the lower left makes a new .avi script from the .avs script.
 

 
Opening the .avi script in VirtualDub gave me this interesting warning about my favorite DV codec.
 
VDub Warning
I've experienced Movie Maker crashes that point to codecs, and I've read a lot about the behind the scenes rivalry between codecs. But this is the first time I remember seeing such an outright finger-pointing about a codec.
 

 
In Movie Maker 2.1, the files imported and previewed well as clips in the collection
 
After some uninstalls and reinstalls of ffdshow, my next attempt to make a project didn't get too far.  Here's the error message for the crash of Movie Maker 2.1... pointing to a Divx codec.
 
Crash Divx
The good news is it not pointing to the ffdshow.ax file... the divxdec.ax file in my system32 folder has a file date of 11/10/2005. Maybe it's the codec being used to handle Divx files before I installed ffdshow. If I were to go down this path further, I'd rename it and try again. That's for another day. This is typical of the kinds of codec issues you can experience.
 
uninstalled ffdshow - XP
 
Uninstalling is easy. Open unins000.exe found in the c:\Program Files\ffdshow folder. Or run the uninstall from the main Windows start menu, one of the choices in the ffdshow folder.
 
My XP system needed a system reboot to fully remove it. The Vista system didn't but the uninstall left a single residual ffdshow folder behind that needed manual removal. The cycle from installation to removal is easier on Vista as the system reboot isn't needed. I'm running Vista with User Access Controls (UAC) turned off... it might be more complicated if I left it on.
 
I exercised installations and removals a number of times on each computer and had no issues. The whole package feels very stable.
 

 
Vista... Home Basic
 
Vista Main MenuThe figure shows the menu items added by the installation of ffdshow.
 
Before installing I checked how the 4 test files played in WMP11...
  • Divx encoded AVI....heard it fine, but the video was just blackness
  • Xvid encoded AVI....heard it fine, but the video was just blackness
  • Motion JPEG encoded AVI from a Canon TX1 hard drive camcorder.... played fine
  • DV-AVI made by VirtualDub with Panasonic DV codec... played fine
GSpot said I didn't have a Divx codec and I had an Xvid one, yet it couldn't test play either successfully... I didn't take time to try to sort it out. Sometimes GSpot doesn't get it right.
 

 
The ffdshow installation went fine...
 
Checking with GSpot after the install showed each of the files testing fine with both GSpot and Microsoft solutions.
 
All four played well in Windows Media Player 11.
 

 
Vista - Moving to TimelineInteresting things started to happen when moving the Divx, Xvid and MotionJPEG clips to the project... see the message from the ffdshow compatibility manager.
 
This message popped up as I moved each of the three to the project, for the first time... I went with the default, and if I wasn't looking at the time, the default would have been implemented in about 20 seconds.
 
The first attempt at a project went well... it previewed fine with the 4 clips in place. Publishing it to an email file also worked.
 

 
uninstalled ffdshow - Vista
 
After removing ffdshow Movie Maker could no longer preview the Xvid and Divx clips in the collections. It could preview the project and see/hear parts of it, but not the parts that needed the new codecs. It didn't crash, not even when rendering a movie from it. But the saved movie had silence and blackness where a codec wasn't available.
 
reinstalled ffdshow - Vista 
 
I left Movie Maker and the project in it open as I reinstalled ffdshow. The project still couldn't preview the parts that it had been missing the codecs before.
 
Simply reopening the project was enough for Movie Maker to effectively use the reinstalled codecs... no need to restart Movie Maker. That means it checks for the codecs at the point of opening a project, not when starting the preview.
 

 
Compatability ListWhile they're installed, let's look at the compatibility list in Movie Maker 6.
 
Here's the section of the computability list... showing ffdshow as decoders for audio and video, with a check to leave them involved with playing and rendering in Movie Maker.
 
That's enough checking for now...
 

 
Conclusion and Closing... and What's Next?
 
My party line about Divx and Xvid encoded avi files may be changing with this new version of ffdshow, combined with Vista.
 
The change might be from the party line for XP to 'convert such files' to others before importing into Movie Maker to a new line for Vista reading... '... if you're using Divx or Xvid encoded avi files, install ffdshow first...". It's a bit too soon to know for sure. Comments about your experiences will help sway me.
 
And if diving into the settings of a codec is a fun task for you, here's a peek into the ffdshow VFW Configuration utility, when you open it from the start menu. There's a lot of stuff in the configuration utility, so if we get into using ffdshow seriously, there could be many more newsletters about it.
 
VFW Settings
 
Next weekend is the long end-of-summer holiday one here in the U.S. I'll probably be publishing the newsletter on Thursday night.
 
 
Have a great week and enjoy your summer fun and video work...
 
PapaJohn