[mythtv-users] Occasional audio sync issues

Rod Smith mythtv at rodsbooks.com
Sun Mar 25 00:01:18 UTC 2007


On Saturday 24 March 2007 18:42, Owen Mehegan wrote:
> I'm running MythTV 0.19 on a Celeron D 2.13ghz processor with 1G of
> RAM, two 160G disks in RAID 1, and FC4. I have an ATI TV Wonder VE
> capture card
...
> every now and then when I'm 
> watching a recorded TV show, the video and audio will get out of sync
> for a bit.
...
> It doesn't seem 
> to be a problem with system resources at the time I'm watching, as I
> can rewind and see the same skipping problem at the same spot. Any
> ideas what might be causing this?

I'm unfamiliar with the ATI TV Wonder VE, but according to its MythTV wiki 
entry, that's a framegrabber card that uses the bttv drivers. As such, the 
card relies on the CPU at the time of recording to encode video in MPEG-4 or 
RTJpeg format. Thus, chances are that you're seeing problems that result from 
brief spikes in CPU use at the time of recording. I've seen this sort of 
thing myself when recording NTSC using a pcHDTV 3000 card (which uses 
software encoding for recording NTSC) on a system with a 3.06GHz Celeron-D. 
Problems seem most likely when I'm doing something else that's CPU- or 
disk-intensive, such as watching another recording (particularly just after 
starting it) or transcoding another recording. Some things you might try to 
improve matters, in roughly order of increasing cost and hassle:

1) Adjust your MPEG-4 encoding options to ones that are less CPU-intensive.
   Some options are flagged as requiring a lot of CPU time. You could also
   try making a change and check to see how much CPU time mythbackend is
   consuming by using the "top" command.

2) Use RTJpeg rather than MPEG-4 as an encoding method. This should reduce
   the CPU load required for encoding at the cost of file size. In my
   experience, RTJpeg does a poor job with scenes with large dark areas, but
   maybe that's just my settings.

3) Be careful to do little that consumes CPU time when you're making a
   recording, particularly an important one.

4) If you're running background tasks manually, use the "nice" command to
   run them with reduced CPU priority.

5) Change your video capture card. A card that does MPEG encoding in hardware
   requires little CPU time and, in my experience, is less likely to have this
   sort of sync problems. (I sometimes see A/V sync that's off with some of
   these devices, but it's fairly consistent and can be corrected via MythTV's
   A/V sync adjustment.)

6) Increase your RAM. I'm not sure this would help, actually. It's most
   likely to be an issue if you're running a system with minimal RAM (say,
   256MB). My hypothesis is that you may be running into swap activity
   that's interfering with recordings.

7) Increase your CPU speed. This may not completely eliminate the problem,
   but it should reduce its severity. You'll probably need a pretty
   substantial increase to see a noticeable improvement.

8) Move from a combined frontend/backend system (if that's what you've got) to
   a split frontend and backend. If the backend can be devoted entirely to
   capturing video, with minimal interference from your playback demands, that
   should improve matters. Of course, this is likely to be a big deal to set
   up.

-- 
Rod Smith
http://www.rodsbooks.com


More information about the mythtv-users mailing list