[other] Problems with dropping frames with EVR (2 Viewers)

MPUserFromGER

MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    MediaPortal Version: 1.1.0 Beta 1 with latest SVN
    MediaPortal Skin: Blue3Wide / StreamedMP
    Windows Version: Windows Vista Ultimate 32bit with SP2
    CPU Type: AMD Athlon X2 BE-2350 (AM2)
    HDD: 2x Samsung 750GB (Raid 1)+ HAMA SSD 4GB (timeshifting)
    Memory: 2GB DDR2
    Motherboard: Gigabyte GA-MA78G-DS3H (BIOS: F8)
    Video Card: Club 3D CGAX-H4652DD Passiv (replaces OnBoard ATI Radeon HD3200)
    Video Card Driver: Catalyst V9.9 (9.2 solved the DVI/HDMI recognize issue)
    Sound Card: ATI HD audio of graphics card
    Sound Card AC3: all sound formats go through the graphics card via HDMI to my AV receiver
    Sound Card Driver: ATI audio driver included in Catalyst (since 9.6)
    1. TV Card: Technotrend S2-3200
    1. TV Card Type: DVB-S and DVB-S2
    1. TV Card Driver: 5.0.1.8
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Cyberlink PowerDVD 7.3 Ultimate codecs
    MPEG2 Audio Codec: MPA audio codec
    h.264 Video Codec: Cyberlink PowerDVD 7.3 Ultimate codec
    Satelite/CableTV Provider: Astra 19.2 E
    HTPC Case: Ahanix MCE 601
    Cooling: power supply fan, CPU boxed cooler, 2 housing fans 60mm (all controlled by SpeedFan)
    Power Supply: Ahanix
    Remote: Logitech Harmony 555
    TV: Samsung LCD 32"
    TV - HTPC Connection: HDMI out PC --> GEFEN HDMI Detective --> Denon AVR-1909 --> HDMI --> Samsung LCD TV

    There seems to be a problem with dropping frames when playing LiveTV or videos, if EVR is used.
    Many users reported this issue in the SVN threads and this thread should be used to nail this issue down.

    Everybody that has problems with video/audio AND has dropped frames in the EVR.log please post here with the following info:
    - Observed symptoms: Short audio dropouts druing LiveTV
    - When are the symptoms observed: During LiveTV, sporadically bugt mostly after 1-2 hours of watching
    - What cures the problem: Restart MP. Stopping LiveTV is not enough.
    - Dropped frames in EVR log: yes
    - TSReader setting in TV section regarding dropped frames: not checked but has no effect for me
    - Timeshift folder: On separate SSD that is only used for timeshift

    I get a lot of the following lines in my logs:
    Code:
    06-12-2009 14:06:45.773 [e28]Dropping frame, behind 0 ms, last sleep time 15 ms.
    The first question is why frames are dropped, when they are not (=0ms) behind?

    The second question is why frames are delayed sporadically?
    My experiences are that the frames are delayed e.g., if a new timeshift file is used.
    Attached you find a screenshot of my timeshift directory. Approx. every 5 minutes, a new file is used and the EVR log shows also every 5 minutes some bigger frame delays... Don't know, if this is connected...
    I have also uploaded my timeshift files to the ftp directory "TS dumps"

    The audio dropouts seem to happen, if the delay of the frames exeed a certain amount.
    If it occurs again, I will post more logs.
     

    Attachments

    • Tieshift_Folder.jpg
      Tieshift_Folder.jpg
      52 KB

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    The audio dropouts seem to happen, if the delay of the frames exeed a certain amount.

    That sounds a bit like audio and video clocks would be running at different speeds. Could you please try using analog audio connection (no need to even hear anything, but just to see if it could cure the frame dropping).
     

    Mr Hipp

    Retired Team Member
  • Premium Supporter
  • April 2, 2006
    1,261
    188
    56
    Malmö
    Home Country
    Sweden Sweden
    tourettes: Don't you think this a little to exact?

    // Handling late frames
    if ( *pNextSampleTime < 0 )

    should it not be

    if ( *pNextSampleTime/100 < 0 ) // 100th micro second
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    That sounds a bit like audio and video clocks would be running at different speeds.

    Would this not cause to get audio and video out of sync?
    My audio and video are always in sync that means they have a constant offset of approx. 100ms.

    Could you please try using analog audio connection (no need to even hear anything, but just to see if it could cure the frame dropping).

    To be honest, could you please explain me how to do this?

    I am using the "HDMI audio device", which is the only one that windows shows (I have deactivated on board sound because it conflicts with the audio of my discrete graphics card).
    Audio and video take the same path through my ATI graphics card --> HDMI out --> Denon receiver --> TV (only video).

    So how could I set the audio to analog?
     

    yhoogi

    MP Donator
  • Premium Supporter
  • March 9, 2008
    599
    47
    Home Country
    Germany Germany
    Just one question for clarification:

    As the Haali Media Splitter is not always used (i.e. for transport streams):
    Is it possible to specify the size of the input buffer for the splitter in MP?

    My experience is that on some setups where server and client are seperate systems, this may cause also droput and out-of sync problems.

    Cheers,
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    tourettes: Don't you think this a little to exact?

    // Handling late frames
    if ( *pNextSampleTime < 0 )

    should it not be

    if ( *pNextSampleTime/100 < 0 ) // 100th micro second
    As a frame is always displayed during the next vsync it will be already one frame late and therefore audio and video will be out of sync for the display time of one frame. In case of 23.976 it will be a 41ms delay. And that's something you notice right away. This why late frames are dropped right away without any grace periods. There are some other parts in the code that should make sure that threads are early enough.

    All threads are scheduled to be 5% earlier than their presentation time and are rendered up to a 1/4 delta in advance as the vsync takes care of the proper display. In theory all frames should arrive early enough

    So fiddling here wouldn't change much as threads should always wake up early enough.

    The still open question is why are frames often so late on even nearly idle machines (codec issues a side for now). I haven't found this one yet. But it must be something in the player or rendering code outside the EVR. I guess somewhere is a sleep() too much that causes the problem. Still looking for that one...
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    The first question is why frames are dropped, when they are not (=0ms) behind?
    The information in the log is not a floating point here. Will fix this in the SVN. Should read something like 0.75ms too late or so.


    The second question is why frames are delayed sporadically?
    Late frames are a common problems on HTPCs as Windows is not a real time OS. Meaning it's not guaranteed that something happens at a specific time. This can be caused by any number of things. But I'm sure the number of dropped frames can be reduced further as there seems to be a related bug I haven't identified yet.

    Also MPC-HC, VLC etc. show the same problem. Every now and then a frame gets dropped. Curse of the HTPC. Usually you only notice it if the there's a camera movement involved.
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    Usually you only notice it if the there's a camera movement involved.

    Ok I understand now that dropped frames can happen on a HTPC :D
    However, every now and then (maybe once every evening), the audio drops out heavily and if this starts, it remains until MediaPortal or even the htpc is restarted! The drop outs are that heavy that watching LiveTV is not really possible any more. If it happens again, I post new logs because the posted logs above are not from such a heavy case.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    That sounds a bit like audio and video clocks would be running at different speeds.

    Would this not cause to get audio and video out of sync?
    My audio and video are always in sync that means they have a constant offset of approx. 100ms..

    Whole graph is running on based on the audio clock. If audio clock is drifting away (almost all PCs have this as there are two physical clocks, one in GPU and one in audio card / chip and two physical things cannot run at the same rate ever) the video frames are going to be dropped to keep the A/V sync correct.

    Could you please try using analog audio connection (no need to even hear anything, but just to see if it could cure the frame dropping).

    To be honest, could you please explain me how to do this?

    I am using the "HDMI audio device", which is the only one that windows shows (I have deactivated on board sound because it conflicts with the audio of my discrete graphics card).
    Audio and video take the same path through my ATI graphics card --> HDMI out --> Denon receiver --> TV (only video).

    So how could I set the audio to analog?

    By using some audio card that provides analog output :) HDMI doesn't support such. And for testing it shouldn't have to be even connected to any amplifier, just to see if the EVR log still shows those dropped samples.
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    Hmmm will be hard to get an analog sound card :confused:

    Just watching the EVR.log while watching LiveTV and this is what I see today:
    - 20:20: Heavy dropped frames
    - For 40 minutes not a single dropped frame!
    - 21:06: One dropped frame again
    - 21:12 - 21:17: Every minute a dropped frame
    - 21:22 (now): Again a dropped frame

    So it comes and goes...
    Weired...
     

    Users who are viewing this thread

    Top Bottom