none
How to set the input video format for Microsoft DTV-DVD Video Decoder?

    Question

  • Hi!
    I have DVB stream went through MPEG-2 Demultiplexer. Video is H.264. Currently output pin type is set to :

    MEDIATYPE_Video
    MEDIASUBTYPE_H264

    (sorry, code is in Delphi, but it works)

    mt[0].formattype := FORMAT_VideoInfo2;
    mt[0].bFixedSizeSamples := False;
    mt[0].bTemporalCompression := True;
    mt[0].lSampleSize := 1;
    mt[0].pUnk := nil;
    mt[0].cbFormat := SizeOf(TVideoInfoHeader2);
    mt[0].pbFormat := CoTaskMemAlloc(mt[0].cbFormat);

    vih := mt[0].pbFormat;

    FillChar(PByte(mt[0].pbFormat)^, SizeOf(TVideoInfoHeader2), 0);

    vih.bmiHeader.biSize := 28;
    vih.bmiHeader.biWidth := 1920;
    vih.bmiHeader.biHeight := 1080;
    vih.dwPictAspectRatioX := 0;
    vih.dwPictAspectRatioY := 0;
    vih.bmiHeader.biPlanes := 0;
    vih.bmiHeader.biBitCount := 24;
    vih.bmiHeader.biCompression := FCC('h264');

    It works nice with Cyberlink H.264 decoder and ffdshow-libvad decoder.  Microsoft DTV-DVD Video Decoder also accepts pin, but does not produce any output, just black screen. No errors though. What could be the reason? Does it require additional tuning which can not be done in graphstudio?

    Thanks,
    Kostya
    Monday, February 15, 2010 1:24 PM

Answers

  • I resolved this issue. I found that MEDIASUBTYPE_H264 was typedefed as {8D2D71CB-243F-45E3-B2D8-5FD7967EC09B}. After changing it to {34363268-0000-0010-8000-00AA00389B71} Microsoft DTV-DVD Video Decoder started to work with H.264 stream correctly. It looks bit strange that erroneous subtype of {8D2D71CB-243F-45E3-B2D8-5FD7967EC09B} worked well with ffdshow and Cyberlink AVC/H264 decoders.
    Wednesday, February 17, 2010 3:32 PM

All replies

  • 1.  Are you using Windows 7 to test?  This is the only version that the docs say supports H.264.

    http://msdn.microsoft.com/en-us/library/dd390679(VS.85).aspx

    2.  Are you playing protected content?

    3.  Here are the supported types for H.264:

    H.264 Support

    For H.264, the decoder supports the following formats:

    Profiles/Levels Baseline, Main, and High profiles, up to level 5.1. (See ITU-T H.264 specification for details.)
    Chroma Formats 4:2:0 chroma or monochrome
    Maximum Resolution 1920 × 1088 pixels
    DXVA The decoder supports DXVA version 2, but not DXVA version 1. DXVA decoding is supported only for Main-compatible Baseline, Main, and High profile bitstreams. (Main-compatible Baseline bitstreams are defined as profile_idc=66 and constrained_set1_flag=1.)

     



    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Monday, February 15, 2010 3:07 PM
  • 1) I'm using W7 of course.
    2) My question about protected content is on seperate thread. In this case I'm talking about free-to-air DVB-T content. It is decoded and visible just fine by Cyberlink's decoders and ffdshow(libvad) (at least those tested). But Microsoft's decoder (shows black screen) <- correction -> it does not show black screen, it crashes graphstudio when I try to connect it's source pin to demux out pin.
    3) It seems all pin types are set correct, may the reason of crashing be that I'm working through RDP? It crashing regardless of renderer I choose. And it works in Terratec's own player.
    Monday, February 15, 2010 6:07 PM
  • I resolved this issue. I found that MEDIASUBTYPE_H264 was typedefed as {8D2D71CB-243F-45E3-B2D8-5FD7967EC09B}. After changing it to {34363268-0000-0010-8000-00AA00389B71} Microsoft DTV-DVD Video Decoder started to work with H.264 stream correctly. It looks bit strange that erroneous subtype of {8D2D71CB-243F-45E3-B2D8-5FD7967EC09B} worked well with ffdshow and Cyberlink AVC/H264 decoders.
    Wednesday, February 17, 2010 3:32 PM
  • Heres the entry from uuids.h on my system:

    // H.264 compressed video stream
    // 34363248-0000-0010-8000-00AA00389B71  'H264' == MEDIASUBTYPE_H264
    OUR_GUID_ENTRY(MEDIASUBTYPE_H264,
    0x34363248, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)

    Where did you get MEDIASUBTYPE_H264  as {8D2D71CB-243F-45E3-B2D8-5FD7967EC09B}?

    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Wednesday, February 17, 2010 3:38 PM
  • it was hardcoded for H264 in DC-DVB Source filter by DCoder. I'm working from its sources. I'm added AAC support and fixed AVC/MPEG detection. (project is in Delphi which adds some difficulty).
    Wednesday, February 17, 2010 3:43 PM