[mythtv-users] ffmpeg and multiple CPUs. Was: Should I be switching to 0.21?
Tom Dexter
digitalaudiorock at gmail.com
Mon Apr 14 17:07:39 UTC 2008
On Sun, Apr 13, 2008 at 1:33 PM, Tom Dexter <digitalaudiorock at gmail.com> wrote:
>
> I just wanted to report back on my experience regarding CPU usage. I
> upgraded today from 0.20.2 to 0.21 SVN 16944 under Gentoo. First of
> all, the upgrade from everything I've tested appears to have gone
> flawlessly.
>
> My frontend (dedicated frontend only) is a Dell Dimension 4700C 3.0
> Ghz with hyper threading enabled. Under 0.20.2 I was using libmpeg2
> and bob de-interlacing. It should be noted that I'm using Viktor's
> patch to allow bob de-interlacing on my 1080i interlaced display:
>
> http://svn.mythtv.org/trac/ticket/2903
>
> ...though other than allowing me to use bob, that shouldn't be a factor.
>
> First thing after upgrading I setup my own custom playback profile
> group to mimic my old settings with only one entry as follows:
>
> Resolution: >= 0 0
> Decoder: libmpeg2
> Video Renderer: xv-blit
> OSD Renderer: softblend
> OSD fade: ON
> Deinterlacer: bobdeint
> Secondary Deinterlacer: none
> Filters: none
>
> For max cpus under the Decoder I assumed 2 made sense for my hyper-threaded CPU.
>
> Because of all the talk about increased CPU usage in 0.21, I did
> several checks before upgrading, noting the CPU usage on the frontend
> for 720p (that doesn't require de-interlacing) as well as 1080i (which
> of course does) for several different OTA channels, both watching
> recordings and livetv (though those really didn't differ).
>
> I can say beyond question that the CPU usage under 0.21 with the above
> profile is identical to that under 0.20.2. As a matter of fact, on
> occasion when watching 720p it's slightly less.
>
I was experimenting with some changes to my above profile and I've
made a rather interesting discovery.
On my frontend I found that using the Standard (ffmpeg) decoder in
place of libmpeg2 in the above profile used a fairly significant
amount of extra CPU. In 0.20.2 I also found it used more, but this
difference was quite a bit more significant.
Playing 720p recordings with my above profile (with libmpeg2) used
18-20% of both hyper-threaded CPUs, while the exact same profile with
ffmpeg used around 38%. Playing 1080i recordings with my above
profile (with libmpeg2) used slightly less than 30% of both CPUs,
while that profile with ffmpeg used 50% or more, with mythfrontend
often using 100% of one CPU. I believe that the difference in 0.20.2
was more in the 10% range as apposed to this near 20% change.
However...and this is the interesting part...if I use ffmpeg but
switch the number of CPUs to 1 instead of 2 the performance of the two
is virtually identical. It seems that, at least with my
hyper-threaded 3 Ghz P4, ffmpeg works much better with a single core.
Very cool...now I can used captions if I want. Speaking of ATSC
captions though...is there any way to control the font color of ATSC
captions? I see all sorts of choices for fonts but nothing for color.
The grayish color I get right now over most video content can be
unreadable. I also wish I could control the position...is that
controlled by the broadcaster? I often have the captions chopped off
due to overscan.
Tom
More information about the mythtv-users
mailing list