[mythtv-users] Prebuffering Pause / High CPU Usage / what the heck?

Daniel Thor Kristjansson danielk at cat.nyu.edu
Sun Aug 22 11:16:24 EDT 2004


On Sun, 22 Aug 2004, Craig Meyer wrote:
]I am having a problem with one of my machines playing back LiveTV and
]recorded TV. The machine (which is across a network from the master back
]end) jumps to 96+% cpu usage when playing back video. As a result MythTV
]creates buffering pauses every 1 - 3 seconds that chop up the video. I
]am just wondering if anyone has any suggestions as to why this is
]happening or what to check to figure it out....

It's really hard to know from this information. It's possible it has
something to do with A/V sync. I would try profilining on both machines.
compile on both machines using "-g" for both the mythtv libs and the
avcodec libs, you can use the attached patch for the avcodec pro's. In
the settings.pro for mythtv, uncomment "CONFIG += debug", and comment
"CONFIG += release" and set the compile flags for debug something like
"QMAKE_CXXFLAGS_DEBUG = -O2 -march=pentium4 -msse2 -mfpmath=sse -g"
Mine are of course setup for a p4, you will have to adjust this for your
CPUs, probably pentium3 and -mmmx, without the -mfpmath=sse.

Then once you've compiled both like this you want to execute on both
# opcontrol --start
% mythtv problem-video.nuv # play this for a few minutes
# opcontrol --dump
% opreport --symbols /usr/local/bin/mythtv -t 1 --demangle=smart
# opcontrol --reset

The stuff with # must be executed as root. And this of course assumes
you have installed oprofile and compiled your kernel with the oprofile
module(use a linus kernel for the least problems). The problem area
should jump out at you. Even if it doesn't, post the results to the dev
list, with the same description of your hardware. Leave out the -t 1,
so we have all the information.

You will also want to make sure that both frontends are configured the
same.

-- Daniel
  << When truth is outlawed; only outlaws will tell the truth. >> - RLiegh
-------------- next part --------------
Index: libs/libavcodec/libavcodec.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libavcodec/libavcodec.pro,v
retrieving revision 1.54
diff -r1.54 libavcodec.pro
21,22c21,22
< QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -DPIC -fPIC -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
< QMAKE_CFLAGS_DEBUG = -g -O -DHAVE_AV_CONFIG_H -I.. -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
---
> QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -march=pentium4 -msse2 -mfpmath=sse -DPIC -fPIC -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
> QMAKE_CFLAGS_DEBUG = -g -O2 -march=pentium4 -msse2 -mfpmath=sse -DPIC -fPIC -DHAVE_AV_CONFIG_H  -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
Index: libs/libavformat/libavformat.pro
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libavformat/libavformat.pro,v
retrieving revision 1.19
diff -r1.19 libavformat.pro
19,20c19,20
< QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
< QMAKE_CFLAGS_DEBUG = -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
---
> QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -march=pentium4 -msse2 -mfpmath=sse -DPIC -fPIC -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
> QMAKE_CFLAGS_DEBUG = -g -O2 -march=pentium4 -msse2 -mfpmath=sse -DPIC -fPIC -DHAVE_AV_CONFIG_H  -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE


More information about the mythtv-users mailing list