[mythtv-users] Volume control for BT878 card w/loopthrough

Bruce Markey bjm at lvcm.com
Mon Apr 16 22:23:57 UTC 2007

Yan Seiner wrote:
> I've yanked the PVR150 from my system and plugged in a BT878 card I've 
> had laying around.  I have to loop the sound from the BT878 card to my 
> sound card.

Good move. I've had a PVR-250 for years that I've yanked in
the past but currently is installed and configured as my
last choice with lower input priority.
> The problem is that the sound comes in way, way too loud - about 4x 
> louder than the digital feeds.  I have not found any way to get myth to 
> control the sound from /dev/dsp...

$ alsamixer -V capture

Move the slider sub-captioned "Capture" (you must have been here
before if you got capture working in the first place). I've found
in the past that 100% can be raspy so I set mine at 90%. You can
have this open in a shell window and adjust while you use "Y"
to switch between cards until you match your digital feeds.

> I would welcome any suggestions....

"Any"? I'm much happier with my software encoded MPEG-4 files
than the MPEG-2 files from a hardware encoder. However, the
bttv defaults aren't good so most people assume that ivtv is
better when they compare the picture 'out-of-the-box'. Here are
some settings that I use:

In my /etc/modprobe.d/misc (or wherever you set modprobe options)

  options bttv chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 video_nr=0 vbi_nr=0

AGC is automatic gain control which normalizes the chroma level
so you get more consistent color saturation.

The combfilter fixes the multi-color flickering you may see on
small white lettering or striped shirts.

The full_luma_range expands the values to 0-255 rather than 16-253
(no equivalent for ivtv). This can improve contrast and overall

The coring makes a hard cut off for the black level and can remove
low level noise and artifacts in dark areas.

"video_nr=0 vbi_nr=0" force the driver to take /dev/video0 and
/dev/vbi0 to defeat the evil known as udev.

Xawtv (from the bttv dev) includes some other useful utilities.
I use "v4lctl list" to see driver attributes. This can also be
used to set attributes and I do so in a wrapper script to start

v4lctl -c /dev/video0 setattr 'mute' off > /dev/null 2>&1
v4lctl -c /dev/video0 setattr 'uv ratio' 52 > /dev/null 2>&1
v4lctl -c /dev/video0 setattr 'whitecrush upper' 253  > /dev/null 2>&1
v4lctl -c /dev/video0 setattr 'luma decimation filter' on > /dev/null 2>&1

The "'mute' off" is because of an issue that came up it the
kernel a few revs back and I want to be sure that the driver
is unmuted.

The "uv ratio" is like tint from purple to yellow rather than
red to green. I find that 52 makes yellow, gold and flesh tones
look more natural.

The color and hue are good at 50% (32768) but contrast and
brightness are way off. I find that I need to set the contrast
to mid to low 20,000s (around 40%) and the brightness around
40,000 (like 60%). YMMV but for analog my cable today I am
using 26000, 40200 and for s-video from a digital cable box,
26350, 43150 with the attributes listed above (coring and full
luma range will have a big impact on the best contrast and
brightness settings).

I also use the "quickdnr" filter for a handful of channels that
have noticeable interference or noise. This cleans up the image
before ffmpeg MPEG-4 compression and not only makes the picture
cleaner but makes the compression more efficient.

--  bjm

More information about the mythtv-users mailing list