It's been a while since I've done a real update, so I figured I might as well make it a big one.
This version fixes some more regressions and gets closer to stable for the editing mode, but more importantly, this version is what I consider "first viable" for basically what has been a complete rewrite of the capture module since 1.5.10. The 1.6.2 capture module is much more modular and flexible; most of the globals are gone and there are now well-defined interfaces in between layers. The primary benefit is that VirtualDub is now able to interface to both Video for Windows and DirectShow for capture, which means that WDM capture drivers now work much better.
As for the details....
First, the capture module no longer selects a device by default on open. Wheeeee. Next.
Direct support for VFW devices is still there, although the old AVICap capture mode is gone; VirtualDub now always uses its own I/O routines. This removed a lot of the cruft from the capture module and eliminated some of the confusion in the UI. (AVICap doesn't allow you to set or get video compression settings programmatically, which is why 1.5.10 had two "set compression" options in the video menu.) There are some issues with the VFW module, however -- it doesn't report errors very well and DirectDraw acceleration (now Display acceleration) doesn't mask the native preview, which leads to lower performance than 1.5.10; both of these will be fixed in a later version.
The DirectShow driver, which is based on DirectX 9.0c, is still in heavy development. Its major limitation in this release is that it cannot capture from both a video capture device and a sound card, so you will only get sound if your capture device captures both audio and video by itself. I also haven't done much work in poking settings directly in the various filters in the filter graph so finding settings is a bit rough; generally the video format settings are on the capture filter and the input setting (Composite/S-Video) is on the video crossbar. DV, MPEG-1, and MPEG-2 capture won't work as I don't have support for those sample types; I haven't looked into what it would take yet. There are some problems with the Sample Grabber filter that I'm currently using, and I need to replace it with a custom filter/DMO with better media type support.
Note that any VFW devices will show up as both VFW devices and DirectShow devices using the VFW wrapper filter; the latter will show up as (VFW>DirectShow) in the device list. You will likely get better performance using a VFW device with the VFW driver than using it through DirectShow. I currently do some ugly workarounds in the DirectShow driver for various problems, such as attaching a null renderer to any audio capture pin in order to avoid severe stuttering on video preview. DirectShow is a wonderful API; for any given operation, such as seeking within a stream, there will be six ways to do it, only three of which will be available in your filter graph and only one of which will actually work, assuming that you don't call it at the wrong time and trigger a deadlock.
There is a third driver, the Emulation driver, that takes a video file and plays it back as though it were a video input source. This driver uses the same source code to play files as the edit mode so it really isn't useful for anything other than debugging the capture module. You might find it useful if you want to see how a video capture session would run, however.
There are also a couple additional features that are not specific to a particular capture driver:
- VirtualDub now handles audio compression directly rather than having the Windows multimedia wave-in system do it. This means that audio timing with audio compression enabled is more accurate than before.
- Resync through audio resampling is now available and the default when the raw audio capture format is uncompressed. The "resample" readout on the information panel shows the current resampling rate in semitones, where +/-12.000 is one octave higher or lower. Normally this should be quite small, definitely within +/-0.100.
- Video filtering now shows up directly on the on-screen display when the display mode is Preview and display acceleration is enabled.
- The volume meter has been rewritten and is now a logarithmic, modeless peak meter at the bottom of the capture display. It works as long as the audio capture format is uncompressed and can run even during capture.
- The histogram has been rewritten as well. It only works when the source format is an uncompressed format supported by VirtualDub's pixmap library (most formats), but it can now work in both RGB and YCbCr formats. When a YCbCr format is in use, the extremes of the histogram are tinted red to signify super-white and super-black parts of the image that will be clamped if conversion to RGB occurs. Remember that for standard YCbCr, the Y range [16,235] maps to the full RGB range [0,255], so very low or very high Y values result in clamping. The "squish luma levels" will lower the contrast of the image appropriately so that those tails are recoverable.
Using 1.6.2, I was successfully able to capture an entire episode of Prétear with MPEG-4 video compression using my Plextor PX-M402U. (I never said all of the anime in my testing collection was good anime.) Note that this device in particular doesn't capture compressed audio; this is done in software with the supplied software bundle, so when you use it in VirtualDub you will only be able to capture uncompressed PCM as the raw audio format. This is probably just as well as VirtualDub can't read MPEG-1 layer II audio tracks. For best results, when using the PX-M402U, disable early frame drops under Capture/Timing -- the timing is accurate enough and drops are disasterous with compressed video -- and set the capture format to DivX MPEG-4 under Video/Capture Filter.
There are a couple of minor improvements to the edit mode, such as AVI tagging, and support for decoding PNG files. I was disappointed to find when implementing the AVI tags that the AVI format stores text as 8-bit and doesn't have a functional way to set the character set; the CSET chunk is supposed to do this but Windows Media Player doesn't recognize it, so foreign characters don't work reliably. Rats. My PNG decoder is terrible and doesn't support interlaced files, but it works on most of the files that I have and I figured I'd throw it in. I have prototype compressor code for the Deflate format, which would be needed for PNG encoding, but currently it doesn't compress as well as gzip.
Changes for 1.6.2:
Build 22651 (1.6.2, experimental): [December 12, 2004] [features added] * Capture: Improved Unicode support. * Capture: DirectShow video capture support. * Capture: Enhanced volume meter. * Capture: Alternate audio resampling mode for reduced frame drops when resyncing. * Capture: Audio compression now occurs after resampling for better timing. * Capture: Stop hotkeys are no longer system global. * PNG images are now supported for read. * AVI info tags are now supported. [bugs fixed] * Fixed occasional crash when using DirectX display mode with 8-bit display. * Appending type-1 DV AVIs caused the output AVI to have the wrong stream type. * Fixed rare junk displays when overlay playback is enabled, caused by selection of overlay formats that the bitmap library cannot support conversions to. * Fixed source formatting tags in timeline strings reporting huge frame numbers at the end of the timeline. * Fixed garbage when attempting to convert Pal8 to Y8. [regressions fixed] * Fixed slowdown in shuttle commands. * 24-bit video depth settings in configuration files saved from 1.5.x were being imported as 16-bit. * Fixed crash when switching to frameserver mode. * Fixed crash when attempting to finalize AVI file after a disk full or file size error. * Fixed expression evaluation errors in scripting language. * Fixed intermitted crash in Preferences dialog related to enable links. * Fixed crash when attempting to play 8-bit paletted AVI files.