[mythtv-users] HD-PVR dropped frames / MythTV AV glitches

John P Poet jppoet at gmail.com
Tue Nov 11 15:53:13 UTC 2014


On Tue Nov 11 2014 at 7:31:53 AM Will Dormann <wdormann at gmail.com> wrote:

> Hi folks,
>
> I've recently been digging into a problem that I've concluded to be that
> my HD-PVR is dropping frames.   The symptoms are that once every 10
> minutes or so, the video seems to lag for a little bit.   And shortly
> thereafter, my digital audio receiver audio signal (and subsequently
> sound) goes off for a fraction of a second.
>
> Initially, I figured this was due to system load, and that it is a
> playback-only problem.   When encountering such a glitch, if I rewind
> the video, it happens in the same place, 100% of the time.   Which makes
> me think that the problem is not in playback, but actually in the
> recording.   But since the HD-PVR does hardware encoding, it should be
> able to record reliably all of the time, regardless of what's going on
> with the computer system it's plugged into.
>
> Looking at mythfrontend.log, I'll see lines like this at the point of
> the glitch:
> W Decoder avformatdecoder.cpp:4908 (GetFrame) AFD: Audio 194347 ms
> behind video but already 220 video frames queued. AV-Sync might be broken.
>
>
> When I look at the point in question of the recorded video on another
> (non-Myth) system, it seems as if there may be a single dropped frame or
> something.  However, the audio and video are pretty seamless as far as I
> can tell.
>
>
> Current theories:
>
> 1) The cable box is fine, and something with the HD-PVR is causing it to
> produce a flawed stream.   I've heard of overheating and power supply
> issues with the HD-PVR, but from what I gather, either of those issues
> will result in a lock up, rather than droped frames.   I also tried
> taking the cover off, and making sure that it's running in a cool
> environment, but that made no difference.  I also tried updating the
> firmware of the HD-PVR to the latest, and that also made no difference.
>
> 2) The cable box (Comcast Motorola 6200) is actually emitting video with
> occasional dropped frames.  And that glitch is cascading through the
> chain of MythTV, VDPAU, Pluseaudio, SPDIF, digital audio receiver, etc.,
> to the point where it's noticeable.
>
>
> If it's option 1), then I suppose that there's a chance that it's a
> little bit more under my control.  (e.g., if the HD-PVR is dying, maybe
> it needs to be replaced).   If it's 2), then I suppose that the best I
> can do is to just minimize the noticeable impact of a dropped frame.
>
> Given that my symptoms have been brief periods of dropped audio, my
> first reaction was to play with options like Realtime priority threads,
> "Extra audio buffering" or tinkering with
> /proc/asound/card0/pcm1p/sub0/prealloc
> However, given my latest theory that the problem is likely with a
> dropped frame or two and the subsequent re-synchronization of AV, I'm
> wondering if my attempts to get rid of audio glitches have actually had
> the opposite effect of increasing the recovery time for dropped frames.
>
>
> Has anybody else experienced these symptoms, and if so, have you found a
> fix?   Or even, are there generic techniques for minimizing the impact
> of dropped frames?
>

Are you using the S/PDIF input on the HD-PVR, or the analog input?  If it
is the S/PDIF input, try the analog and see if the problem goes away.

When using the S/PDIF, the HD-PVR muxes the digital audio into the video
without modification.  If you use the analog inputs, then the HD-PVR
converts it to digital before muxing it in -- encoding the audio.

Myth uses the audio for timing and synchronization.  If the audio has any
glitches in it, it can cause the kind of problem you are describing.  If
you are using S/PDIF and switching to analog fixes it, then your cable
company is sending you bad digital audio.

If you are already using analog audio, then it could be a variety of things.

For example, I had a hard drive going bad a few months ago, which resulted
in lots of "resets" on the SATA bus.  This drive was not being used by
Myth, so nothing to do with the HD-PVR, right?   Until I fixed that hard
drive, half of my HD-PVR recordings either failed, or were corrupted.  The
HD-PVR linux driver does not handle being interrupted well at all, and
those SATA bus resets where enough to mess it up.   Check 'top' and
/var/log/messages (or equivalent) on your system to make sure something
else is not interfering while you are recording.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20141111/d778ebba/attachment-0001.html>


More information about the mythtv-users mailing list