AVI Mux filter doesn't accept Y800 format anymore since Windows 8


  • Hello,

    I am having problem capturing an Y800 video stream in an AVI file. I am using the standard AVI Mux and everything is working fine on my PC (Windows 7) but the same video format is not accepted by the AVI Mux on later Windows versions (tested on Windows 8 and Windows 10).

    The version of my AVI Mux (qcap.dll) is 6.6.7601.23471. The version on the Windows 8 is 6.6.9200.16384.
    I made a test on a Windows 8 virtual machine replacing the qcap.dll with the Windows 7 version (6.6.7601.23471) and then the capture worked!

    Does anyone know why it is not working in the later versions?
    Is there any way I can fix this problem, so that I can capture an Y800 video stream on each and every PC?

    Thank you

    Tuesday, January 31, 2017 11:50 AM

All replies

  • My guess is that something else in your media type is incorrect, and stricter checking in newer build stopped accepting the connection.

    Tuesday, January 31, 2017 1:37 PM
  • Thank you for your very fast answer Roman!

    I checked at the media type. Everything seems fine to me. Here is my media type:

    0x0b0c9f60 {majortype={73646976-0000-0010-8000-00AA00389B71} subtype={30303859-0000-0010-8000-00AA00389B71} ...}
        majortype: {73646976-0000-0010-8000-00AA00389B71}
        subtype: {30303859-0000-0010-8000-00AA00389B71}
        bFixedSizeSamples: 0x00000001
        bTemporalCompression: 0x00000000
        lSampleSize: 0x0004b000
        formattype: {CLSID_KsDataTypeHandlerVideo}
        pUnk: 0x00000000 <NULL>
        cbFormat: 0x00000058
        pbFormat: 0x19b55110 ""
    0x19b55110 {rcSource={LT(0x00000000, 0x00000000) RB(0x00000280, 0x000001e0)  [0x00000280 x 0x000001e0]} ...}
        rcSource: {LT(0x00000000, 0x00000000) RB(0x00000280, 0x000001e0)  [0x00000280 x 0x000001e0]}
        rcTarget: {LT(0x00000000, 0x00000000) RB(0x00000280, 0x000001e0)  [0x00000280 x 0x000001e0]}
        dwBitRate: 0x02382e8b
        dwBitErrorRate: 0x00000000
        AvgTimePerFrame: 0x00000000000a2c2e
        bmiHeader: {biSize=0x00000028 biWidth=0x00000280 biHeight=0x000001e0 ...}
    {biSize=0x00000028 biWidth=0x00000280 biHeight=0x000001e0 ...}
        biSize: 0x00000028
        biWidth: 0x00000280
        biHeight: 0x000001e0
        biPlanes: 0x0001
        biBitCount: 0x0008
        biCompression: 0x30303859
        biSizeImage: 0x0004b000
        biXPelsPerMeter: 0x00000000
        biYPelsPerMeter: 0x00000000
        biClrUsed: 0x00000000
        biClrImportant: 0x00000000

    At first, I didn't had the dwBitRate filled. It was just set to 0. I read a few times that it is not really used and thus did not filled it.
    But as you suggested a problem with the media type, I made a test with the bit rate filled in (as you can see) but it is still not working.

    Maybe I can tell a bit more about the circumstances:
    My source filter is a push filter. I am using the Base Classes provided by Microsoft to create my filter. When I call ConnectDirect to connect my output pin to the AVI Mux input pin, the AttemptConnection method is being called (amfilter.cpp). In this method, the connection to the other pin is done by calling ReceiveConnection. The result value is 0x80040200 (VFW_E_INVALIDMEDIATYPE). As Roman guessed, it is suggesting a problem with the media type, but I just can't figure out what.

    I tried to build the same graph with another camera which also support Y800 video format. I compared the media type of this camera and mine and those are exactly identical. Once the camera is connected to the AVI Mux, I check the connection media type using ConnectionMediaType. The media type was not Y800 but YVYU. So it seems that this camera also cannot connect to the AVI Mux using Y800. This comfort me in the idea that my media type is not wrong.

    Could anything else prevent the connection to be made? Could a problem with the allocator cause the troubles (even if the input pin should not be the one which decide the allocator to use, if I understand the documentation correctly).

    Thank you for your help.

    Wednesday, February 1, 2017 2:50 PM
  • The media type looks good indeed. I don't have anything to suggest of the top of my head. I'd debug what calls exactly are made during the connection type negotiation and possibly figure out the cause. Some awkward factors might apply, e.g allocator specific, in which case the initial stage of connection succeeds but afterwards, after hitting the problem the connection would get aborted.

    Wednesday, February 1, 2017 3:25 PM
  • Thank you Roman for your help.

    I already have spent a lot of time on this issue and I can't afford to invest more time in it right now. I may try your debug suggestion later.
    If I do, I will post my results here.

    In the mean time, it would be great if someone could confirm/disconfirm that the AVI Mux doesn't accept Y800 video streams as input since Windows 8.

    Tuesday, February 7, 2017 10:37 AM