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