VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Dec 2007
    Location
    Canada
    Search Comp PM
    I understand that VDub display panes always operate using VFW , but since I’ve noticed that other programs that use DirectShow display video slightly differently, especially when it comes to oddities in the video stream, I was wondering if there is any filter ( plugin ) for VDub that will allow you to see what the video would look like if was able to display using DirectShow? A kind of simulated DirectShow. I have been able to it using Avisynth as a frame server but then I can’t use the Direct Stream Copy or Smart Rendering save options, I have to rerender the whole video. Is there a regular VDub filter ( plugin ) that will accomplish the same thing?
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I believe the issue is more that virtualdub works primarily in the RGB colorspace. I though I had read that the current (1.7.x) release was able to use DirectShow filters for loading video, but if you use any filter then you will a) force a switch to RGB, abd b) force a re-render of the entire video
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    Dec 2007
    Location
    Canada
    Search Comp PM
    I have tried the latest version of VDub with lots of different filters but they don't display as DirectShow would. Also the filter won't be used to rerender all, its only purpose is to see which frames to delete before using direct stream copy without any filters.
    Quote Quote  
  4. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    There should not be any difference between how vdub displays the content of a file, and how a directshow player does.

    What specific differences are you looking for ?
    Read my blog here.
    Quote Quote  
  5. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    I understand that VDub display panes always operate using VFW,
    So sure

    Quote Quote  
  6. 1) VirtualDub does its own AVI file parsing.

    2) It uses VFW decoders to decompress video.

    3) If the video comes out of the decoder as YV12 or YUY2 VirtualDub does its own YUV to RGB conversion.

    4) To display the RGB data in VirtualDub's input and output panes, it can use DirectShow's Video Overlay feature (only while previewing, not while scrubbing). Or it can use DirectX (newer versions only) or the regular Windows GDI functions. I believe GDI is always used while scrubbing.

    Compared to DirectShow:

    1 and 2) The file parsing and decompression can cause small frame number differences when B frames, packed bitstream, and/or open GOPs are used.

    2) Different decoders may behave differently when there are errors in the compressed data (eg bad downloads). One may crash where another simply delivers a messed up image.

    3) YUV to RGB conversion may differ from program to program. There is the issue of rec.601 vs rec.709 matrices (slightly different colors). And the difference between contrast exapansion (whether IRE 0-100 gets converted to RGB 0-100 or 16 to 235) (slightly different brightness and contrast). VirtualDub uses rec.601 matrix with luma expansion.

    4) Most media players will use Video Overlay by default. Since most MPEG related codecs output YV12 data the graphics card becomes responsible for the YUV to RGB conversion. While scrubbing, VirtualDub will use its own YUV to RGB conversion (#3) and send RGB data to the Windows GDI. This may result in color differences.

    If you are having problems with frame accurate editing, try using MPEG4Modifier to convert packed bitstream to unpacked, or vice versa. That may help.

    Oh, and Video Overlay usually has its own brightness, contrast, gamma, hue, and color controls. So the same RGB data may look different on the desktop (VirtualDub, GDI) compared to media players (overlay).
    Quote Quote  
  7. Member
    Join Date
    Dec 2007
    Location
    Canada
    Search Comp PM
    Thanks to all who tried to help.

    After experimenting with the MPEG4 Modifier program it appears that unpacking my DivX files before editing them in VDub does allow them to display in VDub as they do in Direct Show Players. I don’t know if this means VFW or DirectShow was part of the problem or not.

    Is there any disadvantage to unpacking DivX files and leaving them unpacked?
    Will unpacked files still edit properly in VDub and maintain A/V sync? as I have read that: “ Packed Video stream was invented by DivX to by-pass a limitation in VfW, which is used by VirtualDub. It was necessary, because the outdated VfW interface doesn't support B-Frames properly. Nevertheless, Packed Bitstream produces an incorrect bitstream and thus is to be avoided at all costs! Please note that AVI itself does *not* require Packed Bitstream, it's nasty VfW that causes the problems “.

    Is there a VDub filter that will unpack or cause video panes to display as if the video stream was unpacked?
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    You can happily leave your video unpacked, especially if you are working in vdub.
    Read my blog here.
    Quote Quote  
  9. One of the most powerful compresssion methods used by MPEG family encoders is "prediction" -- only encoding the differences between frames. A typical sequence of frames might look like:

    IBBP

    I is a key frame, essentially, a jpeg image. P is a forward predicted frame. It encodes only the differneces between the itself and the I frame before it. The two B frames encode only the differences between themselves and the following P frame.

    VFW is based on a "one frame in, one frame out" model. It reads in a frame worth of data, decompresses it, then sends it to the program that's using it (media player, VirtualDub, etc). Backward predicted frames cause a problem with this model.

    When VFW reads in the above sequence it will first read the compressed I frame. It will decompress it and give it to VirtualDub. Next it will read in the data for the second frame, the first B frame. But the B frame can't be reconstructed because its reference frame, the later P frame, is not yet available.

    Packed bitstream works around this by encoding the BBP sequence as if it was one frame then adding two N (null) frames. So the sequence becomes I(BBP)NN.

    To read this sequence VFW reads in the I frame as before. When VFW reads in the second frame it gets the data for all three frames of the BBP sequence. Internally, the Divx codec decodes and buffers all three frames, then returns the first B frame to calling program. VFW then reads in the first N frame and Divx returns the second B frame. Finally, VFW reads in the second N frame and Divx returns the final P frame of the sequence.

    VirtualDub does its own AVI file parsing and gets confused when reading packed bitstream files. Media players use Directshow which handles backward prediction natively, packed bitstream or not.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!