MediaPortal Audio renderer - better video playback quality (1 Viewer)

robyf

Retired Team Member
  • Premium Supporter
  • June 20, 2005
    1,076
    278
    52
    Bolzano
    Home Country
    Italy Italy
    AW: MediaPortal Audio renderer - better video playback quality

    Hi,

    i have problems with MKV that have: "Frame rate and Original frame rate" in the header.

    They always play junky, because frame rate dedection is missmatched. Video Act FPS is showing 26.14 Hz.

    When i use the original dshowhelper - whitout MP Audio Render support, Act FPS shows 25.00 hz and the video plays fine.

    For example: (dubbed Mkv)

    General
    Unique ID : ...
    Complete name : Y:\Download\x.mkv
    Format : Matroska
    Format version : Version 2
    File size : 1.16 GiB
    Duration : 46mn 37s
    Overall bit rate : 3 548 Kbps
    Encoded date : UTC 2011-07-01 10:01:02
    Writing application : mkvmerge v3.1.0 ('HELLO KITTY') gebaut am Feb 16 2010 03:12:16
    Writing library : libebml v0.7.9 + libmatroska v0.8.1

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 5 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 46mn 37s
    Bit rate : 3 174 Kbps
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Original frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.138
    Stream size : 1.07 GiB (93%)
    Writing library : x264 core 68 r1184tw
    Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / keyint=240 / keyint_min=24 / scenecut=40 / rc=2pass / bitrate=3174 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00

    Audio
    ID : 2
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Codec ID : A_AC3
    Duration : 46mn 37s
    Bit rate mode : Constant
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Stream size : 64.0 MiB (5%)

    Any hints?

    Same problem here using lav splitter and ffdshow for audio decoding. In this case a 25fps media is recognised as a 26.1fps media and this leads to stuttering. This problem is there if I use lavf video decoder or ffdshow, no difference. The problem is the splitter somehow. If I switch back to mpchc splitter I do not have this problem.

    Is there a way to fix this?

    Thanks
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Same problem here using lav splitter and ffdshow for audio decoding. In this case a 25fps media is recognised as a 26.1fps media and this leads to stuttering. This problem is there if I use lavf video decoder or ffdshow, no difference. The problem is the splitter somehow. If I switch back to mpchc splitter I do not have this problem.

    Is there a way to fix this?

    Not an easy way - I need to ask from Tomy if the EVR code could be used to detect the real fps (it probably already does this) and then after some period after the fps has stabilized a bit the bias shouls be changed on the fly.

    What does the LAV splitter's video output pin show as frame time? It might be good to have a sample so nevcairiel could check if there is some bug on LAV splitter side that could be fixed.
     

    robyf

    Retired Team Member
  • Premium Supporter
  • June 20, 2005
    1,076
    278
    52
    Bolzano
    Home Country
    Italy Italy
    I have this problem with every 1080p .mkv 25fps (24fps are detected correctly). Will try to upload a sample.
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    What's going with my MP audio renderer? the graph refuse the connection with itand switch to default direct show renderer.
    as usal I use coreavc for video e ffdshow for audio... :(
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    What's going with my MP audio renderer? the graph refuse the connection with itand switch to default direct show renderer.
    as usal I use coreavc for video e ffdshow for audio... :(

    05-03-2012 00:31:56.951 [ 1510] WASAPIRenderer::GetAvailableAudioDevices
    05-03-2012 00:31:56.952 [ 1510] Unable to find selected audio device, using the default end point!
    05-03-2012 00:31:56.955 [ 1510] Default audio endpoint: "Altoparlanti (ASUS Xonar DX Audio Device)" ({0.0.0.00000000}.{9a3af8fa-4bb1-47b1-aaa4-1bca1e59fa6a}) - pull mode: 0 sprk mask: 0
    05-03-2012 00:31:56.955 [ 1510] WASAPIRenderer::CreateAudioClient
    05-03-2012 00:31:56.956 [ 1510] WASAPIRenderer::CreateAudioClient success
    05-03-2012 00:31:56.958 [ 1510] WASAPIRenderer::CheckMediaType WASAPI client refused the format: (0x88890008)
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    05-03-2012 00:31:56.951 [ 1510] WASAPIRenderer::GetAvailableAudioDevices
    05-03-2012 00:31:56.952 [ 1510] Unable to find selected audio device, using the default end point!
    05-03-2012 00:31:56.955 [ 1510] Default audio endpoint: "Altoparlanti (ASUS Xonar DX Audio Device)" ({0.0.0.00000000}.{9a3af8fa-4bb1-47b1-aaa4-1bca1e59fa6a}) - pull mode: 0 sprk mask: 0
    05-03-2012 00:31:56.955 [ 1510] WASAPIRenderer::CreateAudioClient
    05-03-2012 00:31:56.956 [ 1510] WASAPIRenderer::CreateAudioClient success
    05-03-2012 00:31:56.958 [ 1510] WASAPIRenderer::CheckMediaType WASAPI client refused the format: (0x88890008)

    Ok I'm sorry . My fault. I had a 6:1 format into ffdshow setup tht it doesn't supported by Xonar I guess



    Also take a look! fddshow with a specific xonar option
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Not an easy way - I need to ask from Tomy if the EVR code could be used to detect the real fps (it probably already does this) and then after some period after the fps has stabilized a bit the bias shouls be changed on the fly.

    What does the LAV splitter's video output pin show as frame time? It might be good to have a sample so nevcairiel could check if there is some bug on LAV splitter side that could be fixed.

    Yes, EVR presenter does work out the FPS internally by averaging the sample timestamp delta's, but there's a problem doing that with streams that constantly change between field and frame based encoding - like all the H.264 DVB-T2 HDTV in the UK, so it flips between 25 and 50 fps every few seconds....and just to illustrate another problem, one of the channels flags the stream as 24 fps - when it's actually 25/50 fps.....

    Tony
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    but there's a problem doing that with streams that constantly change between field and frame based encoding - like all the H.264 DVB-T2 HDTV in the UK, so it flips between 25 and 50 fps every few seconds....

    Actually it wouldn't matter the audio renderer related calculations - only if the EVR presenter would notice the boundaries (jump between 25/50) and then it would be able to deliver the stable bias based on that. Not sure how hard / complex it would be to reset the average fps calculation on such boundaries.

    and just to illustrate another problem, one of the channels flags the stream as 24 fps - when it's actually 25/50 fps.....

    Flags are quite seldom to be trusted :)
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Actually it wouldn't matter the audio renderer related calculations - only if the EVR presenter would notice the boundaries (jump between 25/50) and then it would be able to deliver the stable bias based on that. Not sure how hard / complex it would be to reset the average fps calculation on such boundaries.

    It's do-able but tricky.....

    How accurate does the FPS determination need to be for MPAR to work properly ?

    Experience suggests that it might be hard to differentiate reliably between 23.976 and 24, or 59.94 and 60 etc - would this matter ?

    Tony
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    How accurate does the FPS determination need to be for MPAR to work properly ?

    Experience suggests that it might be hard to differentiate reliably between 23.976 and 24, or 59.94 and 60 etc - would this matter ?

    23.976 as 24 is quite big difference, so I'm not sure if the v-sync correction calculations would be able to correct such big difference (in reference clock side the difference is big :)). V-sync correction is targeted for example for HW errors like 23.976 as 23.972 (or for case where audio clock is a bit faster / slowed). Which basicly means that the bias control should be accurate as possible, so I would assume that those are way too big differences.

    Isn't the video decoder providing proper sample durations that could be used to detect the real incoming rate?
     

    Users who are viewing this thread

    Top Bottom