[mythtv-commits] Ticket #5749: Internal player stutters on 720p content

MythTV mythtv at cvs.mythtv.org
Wed Oct 1 21:07:11 UTC 2008


#5749: Internal player stutters on 720p content
--------------------------------+-------------------------------------------
 Reporter:  zgeggy2k at yahoo.com  |        Owner:  ijr       
     Type:  defect              |       Status:  new       
 Priority:  major               |    Milestone:  unknown   
Component:  Video Playback      |      Version:  0.21-fixes
 Severity:  medium              |   Resolution:            
  Mlocked:  0                   |  
--------------------------------+-------------------------------------------

Comment(by dl-mythtv at catspoiler.org):

 Replying to [comment:5 dl-mythtv at catspoiler.org]:
 > Same problem here with 720p material 0.21-fixes on FC9 with an Athlon64
 X2 4000+ on an Abit AN-M2 HD motherboard using the onboard Nvidia
 graphics.
 >
 > It appears the the problem occurs when AvFormatDecoder::GetFrame() is
 processing a large number of sequential video packets without any
 intervening audio packets, and the audio output buffers drain.  I don't
 know if the problem is that the loop that calls vFormatDecoder::GetFrame()
 is taking too long, or if it is being blocked by a shortage of video
 buffer space.  In the log file excerpt that I will attach, the last "audio
 timecode" is processed at 18:52:51.807, the internal audio buffer is empty
 by 18:52:52.047, and the sound card buffer is empty by 18:52:52.385.  The
 next "audio timecode" does not occur until 18:52:52.776.

 The problem does appear have something to do with a shortage of video
 buffering.  In this log file, there nearly a one second gap between audio
 packets, so depending on the phase relationship between the audio and
 video streams, we might need to buffer up to one second of video to get to
 the next audio sample before the audio buffer empties.  What's different
 about 720p is that the frame rate is ~60fps instead of ~30fps for 480i and
 1080i, so twice as many video frames might need to be buffered for clean
 playback of 720p material.  I dug through the code and found that only 31
 buffers are allocated, which is less than 1/2 second after all the
 overhead is subtracted.

 As a quick and dirty hack, I doubled the number of video buffers, which
 "fixed" 720p playback. This broke SD and 1080i playback, which looked like
 it was being fast forwarded, and mythfrontend reported massive numbers of
 "Audio buffer overflow, audio data lost!" errors.  I "fixed" this by
 doubling the audio buffer size and increasing the allowable audio timecode
 difference.

 I have no idea why this problem only seems to affect Fedora 9 ...

 My patch for this, "stutter.patch", will be attached momentarily ...

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5749#comment:7>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list