[mythtv-users] Debugging mythfrontend video freeze

Scott D. Davilla davilla at 4pi.com
Mon Dec 10 16:18:24 UTC 2007


>I've made some significant progress on this problem that I'd like to
>share with others that might be having similar problems. First the
>symptoms from the logs;
>
>NVP: Waiting for prebuffer.. 0 ALAADAdL
>NVP: prebuffering pause
>
>If you see these, that means the thread filling the video buffer on
>the frontend has tripped some fill threshold and is has sped up
>getting video data from the backend. Normally you will only see
>sporatic bursts this in the log when the video content changes like a
>change to a dark background. The reason is that the  mpeg2
>decompression rate has changed and the video buffer is emptying
>faster than before. The thread filling the video buffer re-fills
>according to the decompressed video rate rather than the actual
>buffer in use. This keeps network traffic throttled to the video
>consumption rate.
>

Correction on my understanding, "Waiting for prebuffer" is myth 
waiting for a free video frame buffer (using XvMC in my case). This 
occurs when there are not enough free video frame buffers. The 
interesting part of the log above is "ALAADAdL". "A" indicates an 
available video frame buffer. So if in the above prebuffering case 
there are four frames available, why is myth waiting for more free 
video frames in the first place?

This seems to occur when the video display gets behind and mfe is 
trying to catch up. This condition can be triggered by a) new content 
being displayed, b) position seeks (ff, rw, etc) and c) glitches in 
the mpeg2 decoding due to transmission errors (OTA ATSC capture) 
which cause mpeg2 decoder errors.

c) could be helped by having the backend qualify the mpeg2 stream 
before saving. That way only known good content is saved. Backends 
tend to have more ponies than frontends.


And some more performance notes, while the AppleTV under linux has 
enough ponies to handle 720p HD content with software decoding, 1080i 
must use XvMC as it's not quite fast enough to handle 1080i with 
software decoding (a 1.7GHz pentium-M can). This also suggests that a 
Myth frontend on the AppleTV under OSX should be able to handle 720p 
HD content decode. 1080i content is not possible until they figure 
out how to inject the mpeg2 into the apple dvd decoder framework.

Scott


More information about the mythtv-users mailing list