Mark Knecht wrote:
Hi,
   Is there a way to test the composite and SVideo inputs on the
PVR-150/250 family from the command line like we do when we capture
test video from the tuner?

Thanks,
Mark

I wrote a script...

It takes an argument which can be file to play or "composite" or "svideo" or any tv station name which "tune" can tune to.
My tune script only translates sender names to IDs ptune.pl understands.

The script is killing a running mplayer instance. This was necessary at the time when the driver was not as good as it is now. At that time mplayer froze when the PVR150 was tuned to another channel.

I've wired my VCR to both s-video and composite inputs and I have not made sure that the audio I select is definitely s-video or composite.
I could check by unplugging one or the other, but I didn't bother yet.

However, if you measuring the signal quality is what you want, this obviously is not what you are looking for.

        Uli

#!/bin/sh

# check if a readable file was passed, use pvr150 if not
if [[ -r $1 ]]
then
  input=$1
else
  input=/dev/video
fi

# set to PAL
current_standard=`ivtvctl -U | grep Standard`
#echo $current_standard
if [[ $current_standard != "Standard = 0x000000ff" ]]
then
  # PAL
  ivtvctl -u 0xff
fi

current_input=`ivtvctl -P | grep Input`
#echo $current_input

# inputs:
# 0: s-video
# 2: composite
# 6: tv tuner

if [[ $1 == "svideo" ]]
then
  if [[ $current_input != "Input = 0" ]]
  then
    ivtvctl -p 0 -q 2
  fi
else
  if [[ $1 == "composite" ]]
  then
    if [[ $current_input != "Input = 2" ]]
    then
      ivtvctl -p 2 -q 2
    fi
  else
    if [[ $current_input != "Input = 6" ]]
    then
      echo Switching to tuner
      ivtvctl -p 6 -q 0
    fi
    if [[ $# == 1 ]]
    then
      if [[ ! -r $1 ]]
      then
        tune $1
      fi
    fi
  fi
fi

mplayer_pid=1; # any number -ne 0

while [[ $mplayer_pid -gt 0 ]]
do
  mplayer_pid=`ps ax | grep mplayer | grep -v grep | awk '{print $1}'`
  #echo "killing $mplayer_pid"
  if [[ "X"$mplayer_pid != "X" ]]
  then
    kill $mplayer_pid
    sleep 1
  fi
done
echo $mplayer_pid

mplayer -ao alsa -mixer-channel vol -fs -vf pp=lb -framedrop $input &
# denoise3d,



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
ivtv-devel mailing list
ivtv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel

Reply via email to