[other] - Problems with dropping frames with EVR

Discussion in 'MediaPortal 1.1.0 BETA 1' started by MPUserFromGER, December 6, 2009.

  1. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    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 (Text):
    1. 06-12-2009 14:06:45.773 [e28]Dropping frame, behind 0 ms, last sleep time 15 ms.
    2.  
    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.
     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    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).
     
  4. Mr Hipp
    • Team MediaPortal

    Mr Hipp Retired Team Member

    Joined:
    April 2, 2006
    Messages:
    1,261
    Likes Received:
    187
    Location:
    Malmö
    Ratings:
    +187 / 0
    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
     
  5. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    Home Country:
    Germany Germany
    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.

    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?
     
  6. yhoogi
    • Premium Supporter

    yhoogi MP Donator

    Joined:
    March 9, 2008
    Messages:
    583
    Likes Received:
    23
    Ratings:
    +48 / 1
    Home Country:
    Germany Germany
    Show System Specs
    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,
     
  7. Scythe42
    • Team MediaPortal

    Scythe42 Retired Team Member

    Joined:
    June 20, 2009
    Messages:
    2,065
    Likes Received:
    2,632
    Gender:
    Male
    Occupation:
    Professional Hacker
    Location:
    Berlin
    Ratings:
    +2,724 / 1
    Home Country:
    Germany Germany
    Show System Specs
    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...
     
  8. Scythe42
    • Team MediaPortal

    Scythe42 Retired Team Member

    Joined:
    June 20, 2009
    Messages:
    2,065
    Likes Received:
    2,632
    Gender:
    Male
    Occupation:
    Professional Hacker
    Location:
    Berlin
    Ratings:
    +2,724 / 1
    Home Country:
    Germany Germany
    Show System Specs
    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.


    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.
     
    • Like Like x 1
  9. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    Home Country:
    Germany Germany
    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.
     
  10. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    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.

    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.
     
  11. MPUserFromGER
    • Premium Supporter

    MPUserFromGER MP Donator

    Joined:
    July 31, 2006
    Messages:
    403
    Likes Received:
    3
    Location:
    Germany
    Ratings:
    +3 / 0
    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...
     
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!