[WiP] madVR support in MP1 (6 Viewers)

Palm_Maniac

MP Donator
  • Premium Supporter
  • June 1, 2005
    1,238
    215
    Gießen, Hessen
    Home Country
    Germany Germany
    Hi,

    the new V44 can crash at my MP also. In the MP logs are no problem there, but I have found something in the Windows Logs, a .NET error.

    Code:
    Anwendung: MediaPortal.exe
    Frameworkversion: v4.0.30319
    Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
    Ausnahmeinformationen: System.AccessViolationException
       bei System.StubHelpers.InterfaceMarshaler.ConvertToNative(System.Object, IntPtr, IntPtr, Int32)
       bei DirectShowLib.IGraphBuilder.AddFilter(DirectShowLib.IBaseFilter, System.String)
       bei MediaPortal.Player.VMR9Util.AddVMR9(DirectShowLib.IGraphBuilder)
       bei MediaPortal.Player.TSReaderPlayer.GetInterfaces(System.String)
       bei MediaPortal.Player.BaseTSReaderPlayer.Play(System.String)
       bei MediaPortal.Player.g_Player+<>c__DisplayClass4.<Play>b__3(System.Object)
    
    Ausnahmeinformationen: System.Reflection.TargetInvocationException
       bei System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
       bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
       bei System.Delegate.DynamicInvokeImpl(System.Object[])
       bei System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
       bei System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
       bei System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
       bei System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       bei System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
       bei System.Windows.Forms.Control.Invoke(System.Delegate, System.Object[])
       bei System.Windows.Forms.WindowsFormsSynchronizationContext.Send(System.Threading.SendOrPostCallback, System.Object)
       bei MediaPortal.Player.g_Player.Play(System.String, MediaType, System.IO.TextReader, Boolean, Int32, Boolean, Boolean)
       bei MediaPortal.Player.g_Player.Play(System.String, MediaType, System.String, Boolean)
       bei TvPlugin.TVHome.StartPlay()
       bei TvPlugin.TVHome.ViewChannelAndCheck(TvDatabase.Channel)
       bei TvPlugin.TVHome.AutoTurnOnTv(TvDatabase.Channel)
       bei TvPlugin.TVHome.OnPageLoad()
       bei MediaPortal.GUI.Library.GUIWindow.OnMessage(MediaPortal.GUI.Library.GUIMessage)
       bei TvPlugin.TVHome.OnMessage(MediaPortal.GUI.Library.GUIMessage)
       bei MediaPortal.GUI.Library.GUIWindowManager.ActivateWindow(Int32, Boolean, Boolean, System.String, Boolean, Int32)
       bei MediaPortal.GUI.Library.GUIButtonControl.OnAction(MediaPortal.GUI.Library.Action)
       bei MediaPortal.GUI.Library.GUIWindow.OnAction(MediaPortal.GUI.Library.Action)
       bei MediaPortal.GUI.Library.GUIWindowManager.OnAction(MediaPortal.GUI.Library.Action)
       bei MediaPortalApp.OnAction(MediaPortal.GUI.Library.Action)
       bei MediaPortal.GUI.Library.OnActionHandler.Invoke(MediaPortal.GUI.Library.Action)
       bei MediaPortal.GUI.Library.GUIWindowManager.DispatchThreadMessages()
       bei MediaPortalApp.FrameMove()
       bei MediaPortal.D3D.OnIdle(System.Object, System.EventArgs)
       bei System.Windows.Forms.Application+ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32)
       bei System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
       bei System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
       bei System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
       bei System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
       bei MediaPortalApp.Main(System.String[])

    I hope so something can be begin. The error occurs only after the first version with exclusive mode support on.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    No real clue why it happen but it happen :)
    Does it happen always ? (if yes, i surely need to upload dshowhelper.dll)
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,641
    1,993
    Home Country
    Germany Germany
    Hi
    I have been testing out various settings in madvr in conjunction with v41 (v41 core) and had no trouble with DX11 enabled, in fact it greatly reduced the rendering time to a point where I could set the image doubling to NNED13 to 64 neurons, previously (DX9) I was only able to go to 16 neurons before hitting 40ms + rendering time. With the addition of fullscreen exclusive TV, 3D, HD & SD video also played fine but although OV BBC live played OK, catchup programs hung MP before playing, resetting FS exclusive resolved the problem. I then tried with the V44 core with the same madvr settings but MP crashed as soon as I attempted to play TV and HD video, logs attached, both played with EVR selected but I also noted OV did not work, nothing plays so I gave up on it at that point.
    Hope that is some help, keep up the great work(y).
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi
    I have been testing out various settings in madvr in conjunction with v41 (v41 core) and had no trouble with DX11 enabled, in fact it greatly reduced the rendering time to a point where I could set the image doubling to NNED13 to 64 neurons, previously (DX9) I was only able to go to 16 neurons before hitting 40ms + rendering time. With the addition of fullscreen exclusive TV, 3D, HD & SD video also played fine but although OV BBC live played OK, catchup programs hung MP before playing, resetting FS exclusive resolved the problem. I then tried with the V44 core with the same madvr settings but MP crashed as soon as I attempted to play TV and HD video, logs attached, both played with EVR selected but I also noted OV did not work, nothing plays so I gave up on it at that point.
    Hope that is some help, keep up the great work(y).

    Same error than @Palm_Maniac :)
    So i surely didn't do a proper bin or something, i will look when at home :)
    Thanks :)
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,641
    1,993
    Home Country
    Germany Germany
    ....40ms + rendering time.
    That's not going to work for UK TV, where 50fps is 20ms between frames. It will work if you decide to only watch drama where it is usually 25fps, but I promise that is too long for interlaced content to work unless you deinterlace into film mode.
    Probably not, but the 40ms + rendering was the worst case! With TV (German) is was down to 10-15ms with similar in OV for UK content;) and as mentioned with DX11 it rendering time is very much improved, worst case arround 25ms:).
     

    kenwonders

    MP Donator
  • Premium Supporter
  • January 19, 2007
    791
    741
    Home Country
    England England
    ....40ms + rendering time.
    That's not going to work for UK TV, where 50fps is 20ms between frames. It will work if you decide to only watch drama where it is usually 25fps, but I promise that is too long for interlaced content to work unless you deinterlace into film mode.
    Probably not, but the 40ms + rendering was the worst case! With TV (German) is was down to 10-15ms with similar in OV for UK content;) and as mentioned with DX11 it rendering time is very much improved, worst case arround 25ms:).

    Cool. I still don't know what is the best madVR setting... sometimes I feel I change one option, it ruins everything, I change it back, still ruined!

    I think profiles is the next thing to try. You could then use a hardcore setting for SD but have lighter settings for 720p (still scaled like SD but using more pixels). It's the only way to have your cake and eat it.
     

    The_Stig

    Retired Team Member
  • Premium Supporter
  • April 5, 2005
    2,176
    428
    Here are the logs for hanging MP with EVR. Quite some time ago, so don't know which version i was testing...v41 maybe? Happened around 21.06 o'clock. What I did was: Guide -> Start TV -> Info on remote for OSD -> Back on Remote for getting back to fullscreen LIve-TV. Then picture freeze, but sound still going on.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,641
    1,993
    Home Country
    Germany Germany
    Cool. I still don't know what is the best madVR setting... sometimes I feel I change one option, it ruins everything, I change it back, still ruined!

    I think profiles is the next thing to try. You could then use a hardcore setting for SD but have lighter settings for 720p (still scaled like SD but using more pixels). It's the only way to have your cake and eat it.

    Yes I know what you mean it is very confusing:confused:. Have you seen this guide, http://forum.kodi.tv/showthread.php?tid=259188&pid=2238962#pid2238962
    I found it quite helpfull but still odd things happeno_O as you mentioned, change something and it all goes to pot and won't come back:eek:.
     

    daWooky

    MP Donator
  • Premium Supporter
  • April 3, 2012
    783
    871
    Home Country
    Germany Germany
    DX11 enabled, in fact it greatly reduced the rendering time to a point where I could set the image doubling to NNED13 to 64 neurons, previously (DX9) I was only able to go to 16 neurons before hitting 40ms + rendering time

    worst case arround 25ms

    its like that the average gpu rendering time value has to be lower than the movie frame interval value!
    if madVR is taking more time to render the frame than the time interval between each frame, the next frame to render will be delayed...

    ideally, the rendering time must be under (1/FRAME_RATE*1000) milliseconds, i.e. 41,7 for 23,976fps content, the decoder/subtitle/upload/render queue should be almost full and the dropped frames or presentation glitches shouldn't increase during the playback (there isd always some at the beginning).

    posted by madshi (about page 10 of DOOM9´s madVR thread):

    If you want to give madVR even a chance to achieve smooth playback you have to achieve an "average gpu rendering time" that is a notch lower than the "movie frame interval". I'd say it should not be higher than 35ms for 23.976 playback.

    imho NNEDI3 offers the best upscaling quality however these new options are very demanding and too expensive in terms of usage and wattage for only a htpc

    Cool. I still don't know what is the best madVR setting... sometimes I feel I change one option, it ruins everything, I change it back, still ruined!
    to get a easy basic concept it's worth testing out the various algoreithm with your main source u like watching the most and pick the one you personaly like best.
    all with madvr stats and gpu-z running. reset mad to default and compare the values and stats, soon you know what kills rendering times and so on.... could write a book on how all this works....:LOL:
    the best resource to start madVR options explained

    madvr scaling rule of thumb: The sharpness of the algorithm used in chroma upscaling section should not exceed the sharpness of the algorithm used in the image upscaling section. It could be the same, but not exceed it.

    btw. actually DX11 is only needed for 3d frame-packed and >8bit playback
    happy testing guys^^
     

    Users who are viewing this thread

    Top Bottom