[mythtv-users] MythTV Hauppauge PVR-150 RecordingsfromComposite are destorted [Solved]

Lorenzo Mueller lorenzo.mueller at mail2web.com
Thu Nov 8 22:20:11 UTC 2007

Thx for everyone´s help.
I tried both methods
sleep 3
/usr/local/bin/v4l2-ctl --set-audio-input 1 -d /dev/video1  >/dev/null


v4l2-ctl --set-audio-input 2 -d 1
directv.pl port /dev/ttyS0 $0
v4l2-ctl --set-audio-input 1 -d 1

I packed both into a script called composite.sh and filled in the Change-Channel command in mythtv the path to the script. This had no effect -> Same destorted sound. When I recorded a scheduled record and called the script "manually" it works.

So I suggest that mythtv waits until the changechannel-command is executed and starts to record when the script is finished.

I ended up with this hack - It is a mixture of a previous posting and a little bit of my code (As I also record from the build in Tuner, I had to make a condition that this only happens when the composite-input is used):

# Loop forever
while true
        #Is the video device in use ?
        fuser /dev/video0 2>/dev/null >/dev/null
        if [ $? -eq 0 ]
                #something is using video device and this is the first time we notice this
                if [ "$record_video0" = "NO" ]
   videoinput=$(/usr/bin/v4l2-ctl -I)
   if [ "$videoinput" = "Video input : 2 (Composite 1)" ]
                         echo "   recording on video0"
                         sleep 10
                         /usr/bin/X11/v4l2-ctl --set-audio-input 2 -d /dev/video0
                         sleep 2
                         /usr/bin/X11/v4l2-ctl --set-audio-input 1 -d /dev/video0
                if [ "$record_video0" = "YES" ]
                        echo " not recording anymore on video0"
        sleep 1

This works fine for me. The script is running in an endless loop.

May somebody knows if it is really a "pure" mythtv-problem or an "ivtv"-Problem ?

Will this be solved in future versions of mythtv ?

Cheers to all


From: mythtv-users-bounces at mythtv.org on behalf of Taco Mel
Sent: Tue 11/6/2007 5:26 PM
To: mythtv-users at mythtv.org
Subject: Re: [mythtv-users] MythTV Hauppauge PVR-150 RecordingsfromComposite are destorted

> I ended up putting the following in my channel
changing > script:
> sleep 3
> /usr/local/bin/v4l2-ctl --set-audio-input 1 -d
/dev/video1  >/dev/null
> This is for S-Video, you may need to change the
> device for composite

I did the same thing recently for my PVR-500 (channel
change script).  I have found that the following has
worked reliably for me to avoid the "tinny" audio.
Granted I have only had this fix in place by one day
so I don't swear by it, but here is what I did.

v4l2-ctl --set-audio-input 2 -d 1
directv.pl port /dev/ttyS0 $0
v4l2-ctl --set-audio-input 1 -d 1

Note the above assumes your card is /dev/video1 and
your serial port is ttyS0 and you're using DirecTV,
but you get the picture.

Or in other words, set the audio to an invalid input,
then change the channel on the set top box, and then
set the audio back to the valid input.

Put those 3 commands in a shell script (or perl script
if you are so inclined) and use said shell script as
your channel changer.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com <http://mail.yahoo.com/> 
mythtv-users mailing list
mythtv-users at mythtv.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 9655 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20071108/76f2eb3c/attachment.bin 

More information about the mythtv-users mailing list