MP uses AAC audio decoder for MKVs and MP4s! | Page 2

Discussion in '1.0 final and SVN Builds' started by damaster, February 11, 2009.

  1. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Unfortunately MP graph building is not wise enough to handle such situations. It loads only the filters and lets directshow to do the rest. In your case ffdshow has bigger filter merit valua and directshow will use that instead of the AC3Filter.



    MPII will handle graph building in different way (most likely).
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. damaster

    damaster Portal Pro

    Joined:
    November 23, 2007
    Messages:
    412
    Likes Received:
    35
    Ratings:
    +35 / 0
    Home Country:
    Canada Canada
    This is incorrect: on my system AC3Filter has much higher merit than ffdshow. The only reason it's using ffdshow is because of the bug in the code: it is putting ffdshow in the graph because I have ffdshow configured as my "AAC audio decoder":
    Code (Text):
    1.  
    2.           if (extension.Equals(".mp4") || extension.Equals(".mkv"))
    3.           {
    4.             if (strH264VideoCodec.Length > 0)
    5.             {
    6.               h264videoCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strH264VideoCodec);
    7.             }
    8. [B]            if (strAACAudioCodec.Length > 0)
    9.             {
    10.               aacaudioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAACAudioCodec);
    11.             }
    12. [/B]          }

    That bolded portion of code above should be instead:
    Code (Text):
    1.  
    2. [B]            if (strAudioCodec.Length > 0)
    3.             {
    4.               audioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAudioCodec);
    5.             }[/B]
    Since AAC is much less likely to be in an MKV, then it should add the audioCodecFilter to the graph, and if the audioCodecFilter doesn't support AAC, such as AC3Filter, then it will rely on DirectShow as a back-off to use the filter with higher merit. In that case, I would configure ffdshow with higher merit and allow DirectShow to use ffdshow as a back-off to AC3Filter only for any MKVs that actually have AAC encoded audio.
     
  4. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Ah, actually it should put the both:

    Code (Text):
    1.  
    2.             if (strAACAudioCodec.Length > 0)
    3.             {
    4.               aacaudioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAACAudioCodec);
    5.             }
    6.             if (strAudioCodec.Length > 0)
    7.             {
    8.               audioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAudioCodec);
    9.             }
    10.  
    and let the filter merits and directshow handle the rest. That way AAC is also working with .mkvs. As that would allow user to configure AAC code as directshow will prefer the loaded codecs more than the ones that arent loaded but have higher merit.
     
  5. damaster

    damaster Portal Pro

    Joined:
    November 23, 2007
    Messages:
    412
    Likes Received:
    35
    Ratings:
    +35 / 0
    Home Country:
    Canada Canada
    Doesn't the order matter? Shouldn't it be this instead:
    Code (Text):
    1.  
    2.             if (strAudioCodec.Length > 0)
    3.             {
    4.               audioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAudioCodec);
    5.             }
    6.             if (strAACAudioCodec.Length > 0)
    7.             {
    8.               aacaudioCodecFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, strAACAudioCodec);
    9.             }
    10.  
     
  6. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Order doesn't matter.
     
  7. stoked
    • Premium Supporter

    stoked MP Donator

    Joined:
    December 14, 2007
    Messages:
    297
    Likes Received:
    8
    Ratings:
    +8 / 0
    Home Country:
    Canada Canada
    damaster,

    Would you mind posting a fixed compile that you're using for this svn?
     
  8. damaster

    damaster Portal Pro

    Joined:
    November 23, 2007
    Messages:
    412
    Likes Received:
    35
    Ratings:
    +35 / 0
    Home Country:
    Canada Canada
    Sure, see first post. I've attached a patch there for SVN 21688 and will continue to update the first post with the latest patch until this gets fixed in the official stream.
     
  9. stoked
    • Premium Supporter

    stoked MP Donator

    Joined:
    December 14, 2007
    Messages:
    297
    Likes Received:
    8
    Ratings:
    +8 / 0
    Home Country:
    Canada Canada
    Awesome, thanks!
     
  10. htpcfreak
    • Premium Supporter

    htpcfreak MP Donator

    Joined:
    January 14, 2009
    Messages:
    87
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Hi,

    I have the same problem on some, not all mkvs since i thing the last two SVNs. On the Final it was working.
    The patch in the first post help me also. Thx.

    But this must be fixed i thing :)
     
  11. ronilse
    • Team MediaPortal

    ronilse Retired Team Member

    Joined:
    July 19, 2005
    Messages:
    4,422
    Likes Received:
    280
    Gender:
    Male
    Occupation:
    MediaPortal tester
    Location:
    Moss
    Ratings:
    +280 / 0
    Home Country:
    Norway Norway
    Show System Specs
    Hi,
    Added to Mantis, since thread also have a fix it should not take to long before fixed.

    Regards
    Roy
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!