[mythtv] bttv recordings run fast

Andrew Mahone andrewmahone at eml.cc
Sat Mar 6 05:54:28 EST 2004

On Sat, 06 Mar 2004 01:28:34 -0800, "Bruce Markey" <bjm at lvcm.com> said:
> The tendency is to think that if the picture looks 'bad' then higher
> resolution or compression parameters will make it better. However, none
> of these can correct poor color reproduction which is the biggest
> reason for the picture not looking good.

Tuning encode parameters will help *iff* the badness is due to
compression artefacts.  If it's anything else, you're wasting your time
and clock cycles ;)

Also, it's my experience that HQ and 4MV aren't the best knobs to fiddle
with on ffmpeg, in terms of the CPU cost for the quality/bitrate gain.
Some experimentation with mplayer seems to indicate that the adaptive
quantization controls will improve quality more with less CPU cost.  This
was discussed a while ago on this list, but never got anywhere...  It's
been on my back burner pretty much since then, I just keep getting
distracted by other things (math is fun for me, DBs and figuring out
other people's code are not).

Getting a postproc filter that works right, and handling qscale values
correctly, will also go a long way toward killing codec artefacts. Since
its mention here, I've played with mplayer's newer spp filter, and it
provides fairly nice results.  However, the code is quite painful to
read.  I could probably port it, but I'd need to actually understand
*what* it does to optimize it at all.

> For me, this makes the colors in all ranges almost identical to to the
> cable signal fed directly to the TV. This makes live video look much
> more like video with less of that 'old film' look. Once the colors are
> right the picture should still look good even at lower resolutions.

Oddly, mine seems fine with default setting, and it may be that there are
some variations

> The player expects to have 29.97 frames per second and will slew to
> bring the audio and video into sync. However, if there are a lot of
> dropped frames so there there are only about 20 per second while the
> player is trying to play 30, there will be a constant tug'o'war going
> on while it tries to line up the audio/video timing.

Hm, I thought that MythTV was timestamping frames so that it would know
"when" to play them back.  Even with that, dropping a random 10 of every
30 frames will result in video that looks quite poor.

I also noticed a bit of an oddity with the adjust filter's speed.  When I
time the MMX adjust filter, I sometimes get 1110fps, and sometimes
2300fps.  In other words, I can be watching mythbackend record, and every
ten seconds it'll report adjust getting somewhere around 1100fps.  I can
then kill it, and restart, and it will consistently report 2300fps.  Each
restart, I'll get one speed or the other, seemingly at random.  Maybe
sometimes, MythTV's threads interact such that the filter consistently
gets interrupted mid-frame?
  Andrew Mahone
  andrewmahone AT eml DOT cc

http://www.fastmail.fm - Send your email first class

More information about the mythtv-dev mailing list