View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 23 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Sat Mar 03, 2007 10:29 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
It's an init script. It's supposed to be run _at_ boot either directly because of a link in the appropriate /etc/rc?.d d directory or indirectly by something else which has a link there. The /etc/init.d/KnoppMyth-tv script calls it, and it in turn is linked as /etc/rcS.d/S19KnoppMyth-tv which means it gets run at start up.

Did you make sure the script was owned by root and executable?
Code:
root@black2:/etc# ls -al /etc/init.d/set_ivtv_params
-rwxr-xr-x 1 root root 1788 Feb 18 17:00 /etc/init.d/set_ivtv_params

If not run:
Code:
chown root:root /etc/init.d/set_ivtv_params
chmod a+rx /etc/init.d/set_ivtv_params


Did you make sure it has the #! magic on the first line of the file?
Code:
root@black2:/etc# head -1 /etc/init.d/set_ivtv_params
#!/bin/bash

If not edit the file as needed.

Did you make sure that there aren't any corruptions in the file (like MS-DOS/MS-Windows line endings...)?
Code:
dos2unix /etc/init.d/set_ivtv_params


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 03, 2007 10:16 pm 
Offline
Joined: Tue Jul 11, 2006 11:05 pm
Posts: 77
Thanks tjc. All seems to check out.

Code:
root@mythtv:/etc# ls -al /etc/init.d/set_ivtv_params
-rwxr-xr-x 1 root root 2074 Mar  2 17:04 /etc/init.d/set_ivtv_params
root@mythtv:/etc# head -1 /etc/init.d/set_ivtv_params
#!/bin/bash
root@mythtv:/etc# dos2unix /etc/init.d/set_ivtv_params

I removed the startup lines I added in /home/mythtv/.fluxbox/apps and rebooted. Once again, the temporal filter didn't stick. I've included the script here.


Code:
#!/bin/bash
#       Set the ivtv Parameters
########################################################################
IVTVCTL='ivtvctl'
IVTVDIR='/etc/sysconfig/ivtv'
V4LCTL='v4l2-ctl'
#----------------------------------------------------------------------#
# Default values, if not specified in $IVTVDIR/cfg-*
IVTV_DT='0'             # Tuner input,
IVTV_DF='ntsc'          # tuner format [NTSC|PAL]
########################################################################
[ -d "$IVTVDIR" ] || exit 1

PATH="$PATH:/usr/local/bin"
# See how we were called:
case $1 in
    (start)
        cd $IVTVDIR || exit 2
        for g in $(echo cfg-*) ; do
       cd $IVTVDIR || exit 2
        for g in $(echo cfg-*) ; do
            f=${g#cfg-}
            unset IVTV_TUNER IVTV_RATE IVTV_PEAK IVTV_TYPE
            source cfg-$f
            case $IVTV_TYPE in
                "")     IVTV_TYPE=$IVTV_DF      ;;
                NTSC)   IVTV_TYPE=ntsc          ;; 
                NTSC-M) IVTV_TYPE=ntsc-m        ;;
                NTSC-J) IVTV_TYPE=ntsc-jp       ;;
                NTSC-K) IVTV_TYPE=ntsc-kr       ;;
                PAL)    IVTV_TYPE=pal           ;;
                *)      IVTV_TYPE=`echo "$IVTV_TYPE" | tr '[A-Z]' '[a-z]'`        ;;
            esac
            # $IVTVCTL -d /dev/video$f -u $IVTV_TYPE
            # $IVTVCTL -d /dev/video$f -p ${IVTV_TUNER:-${IVTV_DT}}
            # $IVTVCTL -d /dev/video$f -f width=720,height=480
            # $IVTVCTL -d /dev/video$f -c dnr_mode=0,dnr_temporal=0
            $V4LCTL -d /dev/video$f -s $IVTV_TYPE
          # $IVTVCTL -d /dev/video$f -c dnr_mode=0,dnr_temporal=0
            $V4LCTL -d /dev/video$f -s $IVTV_TYPE
            $V4LCTL -d /dev/video$f -i ${IVTV_TUNER:-${IVTV_DT}}
            $V4LCTL -d /dev/video$f -v width=720,height=480
            $V4LCTL -d /dev/video$f -t stereo
            # $V4LCTL -d /dev/video$f -c mute=0 # This _SHOULD_ work, but...
            $V4LCTL -d /dev/video$f -c temporal_filter_mode=0,temporal_filter=8
        done
        ;;
    (stop) # don't do anything on stop.
        ;;
    *)
        echo "Usage: /etc/init.d/set_ivtv_params {start|stop}"
        exit 1 
        ;;
esac
########################################################################
# End



Just looking at it, do I need to designate the tuners? Or is this script setting all tuners?

_________________
R5*
AMD Athlon X2 64 4850e
M2NPV-VM
LVM: 120 GB PATA & 320 GB SATA
1GB DDR2
PVR500
DVico Fusion Express
Pioneer DVR-111D
RC6 Remote


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 9:36 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
If the cfg files in the /etc/sysconfig/ivtv directory are setup it should loop over all the tuners.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 12:42 pm 
Offline
Joined: Tue Jul 11, 2006 11:05 pm
Posts: 77
Here is the /etc/sysconfig/ivtv/cfg-0.

Code:
# /etc/sysconfig/ivtv/Readme
#
#       A KnoppMyth configuration file.

# This file is an example configuration file for tv tuner cards
#  that use the ivtv driver module, such as the PVR-250.
#
# If a copy of this file is placed in the /etc/sysconfig/ivtv
#  directory with the name of (for example) cfg-0, then, when
#  /etc/init.d/set_ivtv_params gets run during boot, the ivtv
#  card that represents /dev/video0 will have the following
#  parameters set.
#

# IVTV_TUNER is the tuner input selection value,
#  if not set the Default of '0' will be used.
#IVTV_TUNER='0'
# /etc/sysconfig/ivtv/Readme
#
#       A KnoppMyth configuration file.

# This file is an example configuration file for tv tuner cards
#  that use the ivtv driver module, such as the PVR-250.
#
# If a copy of this file is placed in the /etc/sysconfig/ivtv
#  directory with the name of (for example) cfg-0, then, when
#  /etc/init.d/set_ivtv_params gets run during boot, the ivtv
#  card that represents /dev/video0 will have the following
#  parameters set.
#

# IVTV_TUNER is the tuner input selection value,
#  if not set the Default of '0' will be used.
#IVTV_TUNER='0'
 
# IVTV_TYPE is the type of the tuner.  Possible values
#  are NTSC or PAL.  A default value of 'NTSC' will be used if
#  this is not set.
#IVTV_TYPE='NTSC'
 
# End


As this is all commented out, it should fall back to the default set in the set_ivtv_params script if I understand this correctly. But it is still not doing so. Would it be more correct to just drop the temporal filter setting in the cfg file than in the /.fluxbox/apps file?

_________________
R5*
AMD Athlon X2 64 4850e
M2NPV-VM
LVM: 120 GB PATA & 320 GB SATA
1GB DDR2
PVR500
DVico Fusion Express
Pioneer DVR-111D
RC6 Remote


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 5:09 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The question becomes

1) Is the script getting run?

The easiest way to verify that is to add a line to the script that touches a file, and then reboot. Something like:
Code:
touch /tmp/set_ivtv_params_WAS_RUN

If the file is there, it was run.

2) Are the sttingings taking effect?

To test this, run the script manually, then using the following command to see what the settings are:
Code:
v4l2-ctl -d0 -l


3) Is something overriding those settings later?

It's possible that something in MythTVs prerecording setup is overriding the settings. You can check this by manually changing the setting, and then using the command above to check the settings durring a recordng.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 10:27 pm 
Offline
Joined: Thu Feb 09, 2006 12:15 pm
Posts: 5
/etc/init.d/Knoppmyth-tv does refer to it, and sets the BOOTPAR var to 'set_ivtv_params'. The problem is that BOOTPAR seems to only be showing up twice, on lines that are commented out.
-kdf


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 7:09 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
So run:
Code:
update-rc.d set_ivtv_params defaults

This will make the script an init task.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 1:48 am 
Offline
Joined: Thu Feb 09, 2006 12:15 pm
Posts: 5
Thanks! I ended up doing that already, but good to know it isn't a mistake.

-kdf


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu