Solution to bug 0002069 (1 Viewer)

przemco

New Member
March 6, 2009
3
0
Warszawa
Home Country
Poland Poland
Hello,

I have playing with similar problem for a while and after small development I have found a solution. My problem is with DVB-T encoded with H264 in Poland. I have perfect audio and no video. If I start GraphEdit I can see that ffdshow is not connected to TsReader filter. I have downloaded sources and found that there is a bug in the source code of Demultiplexer.cpp. The bug is in function "void CDeMultiplexer::GetH264Media(CMediaType *pmt)".
You should replace line:
pmt->SetFormatType(&FORMAT_VideoInfo);
with line:
pmt->SetFormatType(&FORMAT_MPEG2Video);

This function should looks like this:
Code:
void CDeMultiplexer::GetH264Media(CMediaType *pmt)
{
pmt->InitMediaType();
pmt->SetType (& MEDIATYPE_Video);
pmt->SetSubtype (& H264_SubType);
pmt->SetFormatType(&FORMAT_MPEG2Video);
pmt->SetSampleSize(1);
pmt->SetTemporalCompression(TRUE);
pmt->SetVariableSize();
if (m_mpeg2VideoInfo.hdr.dwReserved2==0)
pmt->SetFormat((BYTE*)&m_mpeg2VideoInfo,sizeof(m_mpeg2 VideoInfo));
else
pmt->SetFormat(g_Mpeg2ProgramVideo,sizeof(g_Mpeg2Progr amVideo));
}

The funny thing is that there is no information how anyone can get login to bugtrucker to submit a sollution :)
Can anyone help me update status of this bug?

Best regards

Przemco
 

-Manfred-

Retired Team Member
  • Premium Supporter
  • May 15, 2007
    728
    343
    Home Country
    Finland Finland
    Thanks for pointing this out. I have added a note to bug report so our 'specialist' can check this.
     

    klure

    Portal Member
    April 27, 2009
    15
    0
    Home Country
    Norway Norway
    If the solution is there, will you be able to fix this for the 1.0.2 release? It would be much appreciated, and I think there is a lot of people who is affected by this bug since CoreAVC is one of the affected codecs.

    I think PDVD9 is also, but when I use PDVD8 codec it works nice.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    That is only a hack / workaround to make some codecs to work with TsReader. Most likely that change would cause some currently working codec to not to connect anymore.

    TsReader needs much bigger changes in it codebase to be fully H264 compliant some things that are missing:

    • Pass whole video frame to the video decoder (not splitted to PES packets)
    • Pass correct information about video stream details in the video out pin

    And most likely something else that I have forgotten. It has been months since I have last time looked at the H264 issue.
     

    klure

    Portal Member
    April 27, 2009
    15
    0
    Home Country
    Norway Norway
    Ok. I hope you will get this sorted soon. And thank you for a great product :)

    Maybe someone with enough programming knowledge can compile a new Demultiplexer.cpp or create a patch for those who use the codecs that are affected by this?
     

    CHli

    Portal Pro
    July 5, 2005
    1,251
    14
    Switzerland
    Home Country
    Switzerland Switzerland
    That is only a hack / workaround to make some codecs to work with TsReader. Most likely that change would cause some currently working codec to not to connect anymore.

    TsReader needs much bigger changes in it codebase to be fully H264 compliant some things that are missing:

    • Pass whole video frame to the video decoder (not splitted to PES packets)
    • Pass correct information about video stream details in the video out pin

    And most likely something else that I have forgotten. It has been months since I have last time looked at the H264 issue.

    Just a quick question tourettes, why do we need our custom solution to parse TS container ? Is there any known problem with haali media splitter ? I know a lot of work has been put in TsReader.ax but maybe we could have MP working with 3rd party solutions as well ?
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Just a quick question tourettes, why do we need our custom solution to parse TS container ? Is there any known problem with haali media splitter ? I know a lot of work has been put in TsReader.ax but maybe we could have MP working with 3rd party solutions as well ?

    For example DVB subtitles are completely unsupported by haali, lot of other DVB specific issues as well.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Tourettes: Can you check out what the devs in CoreAVC wrote in this thread? CoreCodec Community Forum • View topic - CoreAVC + H.264 + TsReader

    Seems like there is some disagreement weather this should be solved in TsReader or in the codecs. And why is it again broken when CoreAVC have fixed this issue several times earlier?

    From the CoreAVC forum (I'm too lazy to register there) :)

    • Pass whole video frame to the video decoder (not splitted to PES packets)
    • Pass correct information about video stream details in the video out pin

    Two different issues.

    1st one is related to 0002069: TsReader is not working properly with some H264 codecs - MediaPortal Bugtracker

    As said that wont be a small task, so highly unlikely that it would be fixed for 1.1.0 (after all CoreAVC and MPC-HC seems to be only codecs that won't work with the current implementation

    same limitation seems to be in following demultiplexers (http://forum.doom9.org/showpost.php?p=1299732&postcount=8474)

    • TsReader from MediaPortal
    • DVBSource from DVBViever
    • Elecard
    • MS MPEG-2 Demultiplexer
    • Sonic HD Demux

    2nd related to - 0002162: TsReader is not providing correct video / audio stream details on it's output pins - MediaPortal Bugtracker. Not as big task as the 1st one, but still most likely will be left open for 1.1.0.

    We are currently in short of Directshow developers (all are busy with real life, me including). So, any help is welcome :p Even patches from CoreAVC direction (after all their sold codec amount could be increased in that way. I personally won't benefit anything if more H.264 codecs will be compatible with the TsReader. I would only be going to lose multiple nice summer days with a code that I personally wont ever benefit from :p).


    Also... on tourettes other comment... Some DVB features and DVB subtitles are about the ONLY thing Haali's splitter does not support.

    Small list what at least are missing from haali splitter:

    • DVB subtitles (this and next point are mandatory for a full feature DVB application -> show stopper issue when considering haali to be used.)
    • Teletext subtitles
    • Timestamp smoothing on channel changes
    • Dynamic video and audio reconfiguration on PMT changes (MP side needs to be ontified on these)
    • Most likely no support for real time file increases (live tv)
    • no support for multipart files that TVE3 TsWriter is using as timeshifting buffer
     

    Users who are viewing this thread

    Top Bottom