[Approved] Patch for load External Audio Track (1 Viewer)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi,

    This is the path that permit to load external audio track (DTS, MKA, MP3 and AC3) in graphbuilder that partial match of movie.

    For example :
    movie.mkv with movie.ac3 but it can be load movie.english.ac3

    To make it work we must need use of Mediaportal StreamSwitcher (patched too for correct audio pdwgroup) and best to work with MPC Matroska Splitter.

    Cheers,
    Seb.
     

    Attachments

    • mediaportal_Clean_1.2.0_Audio_External.patch
      8.8 KB
    • MPAudioSwitcher.rar
      136.5 KB

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #4
    0003042: Patch for load External Audio Track - MediaPortal Bugtracker

    Thx Sebastii. Please study a bit those changes so it means less work for us next time ;)

    Hi,

    I have tested and the code (// No stream info from splitter) break the name of audio and trackname on internal audio when splitter is not IAMStreamselect.

    So i recommend to comment out this part from Audio Language and Audio Type.

    Thanks effectively your code is really more clear :) congrats :D

    Edit :

    We have a issue, i try to explain.
    If we use a splitter that didn't use IAMStreamSelect (ie MPC Matroska) all stream are output in single so we must use FFDshow Audio with streamswitcher or Mediaportal Audio Switcher.
    If we use ffdshow it doesn't work good even if Mediaportal Audio is in graphe, i think we must avoid it (it's not the good idea) the best setup is to use it but without stream switcher enable.
    So if we use Mediaportal audio switcher all the time, it breaks 5.1 for WMA Audio.
    I have fix it by added : DirectShowUtil.AddFilterToGraph(graphBuilder, "ffdshow Audio Decoder"); see below

    //Set High Resolution Output > 2 channels
    IBaseFilter baseFilter = null;
    graphBuilder.FindFilterByName("WMAudio Decoder DMO", out baseFilter);
    if (baseFilter != null && wmvAudio != false) //Also check configuration option enabled
    {
    //Set the filter setting to enable more than 2 audio channels
    const string g_wszWMACHiResOutput = "_HIRESOUTPUT";
    object val = true;
    IPropertyBag propBag = (IPropertyBag)baseFilter;
    hr = propBag.Write(g_wszWMACHiResOutput, ref val);
    if (hr != 0)
    {
    Log.Info("VideoPlayerVMR9: Unable to turn WMAudio multichannel on. Reason: {0}", hr);
    }
    else
    {
    Log.Info("VideoPlayerVMR9: WMAudio Decoder now set for > 2 audio channels");
    }
    DirectShowUtil.AddFilterToGraph(graphBuilder, "ffdshow Audio Decoder"); //Here for fix WMAPRO with audio switcher MP
    DirectShowUtil.ReleaseComObject(baseFilter); baseFilter = null;
    }
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,959
    1,270
    Saratov
    Home Country
    Russian Federation Russian Federation
    Hi,
    IT is strange but LAV Splitter is the worst for using with external tracks.
    I saw not only ghost audio track but also freezes and shuttering. :(
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #6
    Hi,

    Effectively, with LAV (IAMStreamSelect Interface) it doesn't work well, sorry so i have see your pm and didn't answer yet.
    I will try to look again but with IAMStream Source Splitter is quite not easy, and i don't know how to do that right now, the best use is Matroska, it would be good to know if mpc-hc works ok with LAV Splitter too.
    Thanks.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    • Thread starter
    • Moderator
    • #7
    Hi,

    Maybe a light on this issue with IAMStreamSelect Splitter :)
    This binarie for testing :)
    Thanks,
    Seb.
     

    Attachments

    • 3632_Mantis_Core.rar
      934 KB

    Users who are viewing this thread

    Top Bottom