FFDshow audio decoder missing in MePo graph (3 Viewers)

hoborg

Portal Pro
June 13, 2008
4,413
1,644
Nový Jičín
Home Country
Czech Republic Czech Republic
Simple there is no solution right now for this until MePo accept FFDshow in decoder chain.
I have asked a dev to look at this but there is one solution to just allow FFDShow to decode FLAC. If you do this then you don't need madFLAC at all (you can also do this for AAC etc) and then everything should work with a single filter

That is not true. FFDshow does not connect to MePo TS reader for AAC - Monogram needs to be used...

MadFlac is needed if you want passthrough standalone *.FLAC files, combination of MPC FLAC source filter + FFDshow FLAC decoder doesnot work.
 

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Simple there is no solution right now for this until MePo accept FFDshow in decoder chain.
    In general MP does not reject or otherwise prevent ffdshow from being added in the graph. MP adds the user configured filters and then asks DirectShow to connect them as needed. During this connection attempt DirectShow may insert additional filters to facilitate connections between otherwise incompatible filters (e.g. audio codec outputs 5.1 but audio renderer only supports 2.0 - an additional filter needs to be inserted to downmix). After all the connections have been made, MP checks every filter and if it is not connected, it is removed. The difference you are seeing is probably due to the fact that MP has already added some filters before asking DirectShow to do the connections, while you in GraphStudio start with an empty graph. This is in fact something you should try: add the filters configured in MP to a new graph in GraphStudio, then drag the file in question into the graph. Is the resulting graph the same as the one when starting from a blank graph?

    That is not true. FFDshow does not connect to MePo TS reader for AAC - Monogram needs to be used...
    This is the only situation where ffdshow (audio codec) is "blacklisted". This is necessary as we already know that this combination simply does not work. FFdshow expects the splitter to provide entire "Access Units" in each sample buffer supplied and that needs NALU processing for the audio part. This has been implemented for the video stream but not the audio stream. It has proved to be quite complicated and bug prone, and was one of the reasons 1.1.0 took so long to be released. Doing the same for the audio stream is not going to be any easier, and I am not aware of anyone who is willing to undertake such a risky rework.

    Furthermore I am personally against it, as it is the job of the splitter separate the audio and video streams and feed them to the corresponding codecs. It is the codec's job to know how to break up the video/audio stream to the required packets (Access Units) and decode them. The splitter should be format agnostic regarding the individual streams being demultiplexed (right now with the implementation of NALU support for the video streams we have tied the TSReader to the h264 format - if a new one comes out, we will have to add support for that too and this means we are going back from modular to monolithic codecs)
     

    hoborg

    Portal Pro
    June 13, 2008
    4,413
    1,644
    Nový Jičín
    Home Country
    Czech Republic Czech Republic
    Well, i am thinking i am speaking completly about something different... English is not my primary language, so it is not easy for me to explain...
    I didnt have anything agains TS reader, etc, i was trying to say you need FFDShow after monogram to reencode 5.1 AAC to 5.1 AC3, that is all.

    This time i tryed setup MePo and enable Automatic decoder setting. Now graph is created correctly like in Graphstudio.
    By some short tests it looks like it working correctly for all local media...

    So i tryed TV part and add FFDshow audio decoder to MePo TV postprocessing and try to play *.TS sample with AAC and AC3 audio streams. So graph should have monogram->FFDshow connection (AAC to AC3 reencoding) becouse AAC is primary stream. But what a surprise! TS reader is connected to FFDshow for AAC which of course leads to no sound problem.

    Here is screenshot: (LOGs) and TS sample.
    snap5.jpg


    If local playback issue can be fixed by enabling "Automatic decoder setting" (lets wait for SAF users feedback), AAC TV seems to be problem, becouse there is no way how to add ffdshow audio decoder after monogram for aac.
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    I think FFDShow blacklisting cannot work when "Automatic decoder setting" is enabled, as MP has no control whatsoever over which filters are used and how they get connected.

    Well, i am thinking i am speaking completly about something different... English is not my primary language, so it is not easy for me to explain...
    I didnt have anything agains TS reader, etc, i was trying to say you need FFDShow after monogram to reencode 5.1 AAC to 5.1 AC3, that is all.
    I was just trying to explain how it works and possibly why you see different results in GraphStudio than MP. Also AFAIK blacklisting is only done for TsReader/FFDShow Audio, so it should not affect how the graph is built for non-TS streams.
     

    hoborg

    Portal Pro
    June 13, 2008
    4,413
    1,644
    Nový Jičín
    Home Country
    Czech Republic Czech Republic
    I think FFDShow blacklisting cannot work when "Automatic decoder setting" is enabled, as MP has no control whatsoever over which filters are used and how they get connected.

    Even for TV? I didnt think so, if i remove FFDshow audio decoder from MePo TV postprocessing, MePo will use Monogram as it should - it is defined in TV setup.

    I was just trying to explain how it works and possibly why you see different results in GraphStudio than MP. Also AFAIK blacklisting is only done for TsReader/FFDShow Audio, so it should not affect how the graph is built for non-TS streams.

    I am known how it is working, i got some experience since i watching MePo project ~2years :)
     

    kkendall

    Portal Pro
    April 24, 2007
    864
    16
    44
    Gouda
    Home Country
    Netherlands Netherlands
    Oh, man what a confusing discussion. :D
    But I think I get what the confusion is about:
    Tsreader - FFDShow audio doesn't work for AAC
    therefore, Monogram AAC needs to be installed and used for AAC audio
    if you want 5.1 passthrough of AAC audio, you need FFDShow to postprocess to AC3 5.1 audio so it can be properly passed-through to your receiver
    this accounts for all (non AC3) audio (i.e. FLAC, WMA, etc) that you want to pass through to your receiver
    but you don't want ffdshow to postprocess ALL audio, since this gives problems in MP (and only in MP) with videos with multiple audio streams


    So contemplating:
    Hoborg wants to allow FFDShow audio decoder to postprocess all audio in order to pass it through to the receiver as AC3 audio…accept with videos in MP that contain multiple audio streams
    Therefore, adding FFDShow audio decoder as a forced postprocessor in MP config for all audio is not a good solution

    If MP doesn't block FFDShow Audio decoder in MP graph (after madFLAC in the case of the opening post) as a second decoder or postprocessor, the problem is solved.
    This is how it is, right? :)
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    If MP doesn't block FFDShow Audio decoder in MP graph (after madFLAC in the case of the opening post) as a second decoder or postprocessor, the problem is solved.
    This is how it is, right? :)
    That's the point, AFAIK MP does NOT block FFDShow Audio decoder its graph.
     

    kkendall

    Portal Pro
    April 24, 2007
    864
    16
    44
    Gouda
    Home Country
    Netherlands Netherlands
    If MP doesn't block FFDShow Audio decoder in MP graph (after madFLAC in the case of the opening post) as a second decoder or postprocessor, the problem is solved.
    This is how it is, right? :)
    That's the point, AFAIK MP does NOT block FFDShow Audio decoder its graph.

    But that is what Graphstudio is showing...that's clearly shown in the second picture of the opening post:
    http://hobring.esero.net/saf/mp/graph/flac2.png
    Are you saying that although Graphstudio is not showing FFDShow audio decoder between madFLAC and the Default Directsound Device, it IS there and the sound is passed through as AC3 audio?? :confused:
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    But that is what Graphstudio is showing...that's clearly shown in the second picture of the opening post:
    http://hobring.esero.net/saf/mp/graph/flac2.png
    Are you saying that although Graphstudio is not showing FFDShow audio decoder between madFLAC and the Default Directsound Device, it IS there and the sound is passed through as AC3 audio?? :confused:
    Nope. I'm saying that MP does nothing to prevent FFDShow from the graph. In fact if you look at the logs you'll see the FFDShow is actually in the graph but does not get connected for some reason. After all connections are made, the unconnected filters are removed (and since FFDShow is not connected, it is removed too).

    But you should understand that the way MP builds the graph is quite different from the way GraphStudio does. GraphStudio merely asks DShow to add whatever filters it deems necessary (based on merits) to build a complete graph. But MP first adds a number of filters, then asks DShow to do the connections and add whatever filters it needs to complete the graph. This now is just a guess, but I think FFDShow depends on certain steps that DShow takes to build the graph in order to inject itself in the graph. It is my guess that DShow does not follow these same steps when trying to complete and already populated graph and thus FFDShow does not get a chance to inject itself
     

    hoborg

    Portal Pro
    June 13, 2008
    4,413
    1,644
    Nový Jičín
    Home Country
    Czech Republic Czech Republic
    But you should understand that the way MP builds the graph is quite different from the way GraphStudio does. GraphStudio merely asks DShow to add whatever filters it deems necessary (based on merits) to build a complete graph. But MP first adds a number of filters, then asks DShow to do the connections and add whatever filters it needs to complete the graph. This now is just a guess, but I think FFDShow depends on certain steps that DShow takes to build the graph in order to inject itself in the graph. It is my guess that DShow does not follow these same steps when trying to complete and already populated graph and thus FFDShow does not get a chance to inject itself

    For example GB-PVR doing it the same - add TS source filter, demultiplexer, Monogram AAC decoder and Audio/video renderer. And FFDshow adds itself as it should between Monogram and audio renderer. Graphs is created correctly - no need to modify anything.

    The same for local media playback - GB-PVR add Audio/Video renderer, rest is created by DirectShow. No problem here.
     

    Users who are viewing this thread

    Top Bottom