View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 49 posts ] 
Go to page Previous  1, 2, 3, 4  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat May 31, 2008 9:47 am 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
I just joined the ranks of tinny sound suffers. I just added a PVR-150 card to my R5F27 system so I could record the s-video output of my Sony Directv tuner box.

If any of you that are using a serial IR transmitter can give any troubleshooting help, I'd appreciate it. I have a thread going that documents my progress and troubles with this.

see:
http://mysettopbox.tv/phpBB2/viewtopic. ... highlight=

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject: fixed?
PostPosted: Mon Jul 28, 2008 9:42 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
With summer house projects, I have not had time to try the PVR-150 card with Knoppmyth 5.5 yet.
Does anyone know if the tinny audio problem got solved in 5.5?

Hopeful,
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 29, 2008 6:47 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Pretty sure the tinny audio problem is still there. I can hear it at the beginning of some recordings before the channel change script fires off.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 01, 2008 1:58 pm 
Offline
Joined: Mon Jun 18, 2007 8:20 pm
Posts: 19
Yep. Still there..grrrr. And right now my delay scripts aren't working either.

Double grrr.

--TheErk

EDIT. Problem solved. The scripts still work, just I'm an idiot. :lol: Definitely still got the tinny sound issues though. The scripts bypass it well though.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 06, 2008 3:39 am 
Offline
Joined: Wed Aug 06, 2008 3:10 am
Posts: 1
TheErk wrote:
EDIT. Problem solved. The scripts still work, just I'm an idiot. :lol: Definitely still got the tinny sound issues though. The scripts bypass it well though.

Can you give any more details? I tried adding the
Quote:
/usr/local/bin/v4l2-ctl --set-audio-input 1 -d /dev/video1

line to my channel change script but I still get a tinny audio recording about 5% of the time. Does it make a difference to use the delayed settings script rather than the channel change one?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 06, 2008 6:05 am 
Offline
Joined: Mon May 02, 2005 9:00 am
Posts: 172
Lodurr wrote:
Can you give any more details?

Here's my /usr/local/bin/change-channel-lirc.sh script. Notice the last line.
Code:
#!/bin/sh

REMOTE_NAME=blaster
cmd="$1"

case $cmd in
    [0-9]*)
    for digit in $(echo $1 | sed -e 's/./& /g'); do
        irsend SEND_ONCE $REMOTE_NAME $digit
        # sleep 1
        # If things work OK with sleep 1, try this for faster channel changes:
        sleep 0.3
    done
    ;;

    *)
        irsend SEND_ONCE $REMOTE_NAME $cmd
        ;;
esac

(nohup /usr/local/bin/delayed_settings.sh) &

Here's my /usr/local/bin/delayed_settings.sh script.

Code:
#!/bin/bash

for i in 0 2 4 6 8 10 ; do
    /usr/local/bin/v4l2-ctl --set-audio-input 1 -d /dev/video0            >/dev/null

    sleep 2
done


Also make sure the permissions look like this.
Code:
-rwxr-xr-x 1 root root 409 Sep 23  2007 change-channel-lirc.sh
-rwxr-xr-x 1 root root 182 Aug  1 17:35 delayed_settings.sh

Hope this helps.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 06, 2008 8:40 am 
Offline
Joined: Mon Jun 18, 2007 8:20 pm
Posts: 19
These things get buried in other threads...

The best source on this issue is at

http://www.knoppmythwiki.org/index.php? ... udioPVR150

Hope this helps, it helped me a LOT.

--TheErk


Top
 Profile  
 
PostPosted: Wed Aug 06, 2008 7:01 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
Hi Chunter2,

To make the scirpts executable with the permissions you've shown, you typed chmod +x, as root, correct?

In looking at the wiki article, I see that lots of video parameters are being sent to the PVR-150 card, along with the audio command.

What are the choices for FREQ_TBL? is there a "us-broadast" or "us-bcast"?

Curious,
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 06, 2008 9:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The original delayed settings script was intended to tweak a variety of video settings which an older generation of ivtv drivers and MythTV had fumbled. The simplified version that chunter2 gives should be fine for addressing the tinny audio issue. (Although there were reasons for the somewhat more elaborate detach and background technique the original used. Sadly the details are in archival storage under a heap of other less frequently used neurons...)


Top
 Profile  
 
 Post subject: order important?
PostPosted: Wed Aug 06, 2008 9:36 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
I just got this all entered and implemented.
http://www.knoppmythwiki.org/index.php? ... udioPVR150
I can tell it is working!

To test, I did some WATCH TV experiments with my satellite receiver (which is connected to the s-video input of the PVR-150 card). In some cases when I started the WATCH TV, there was 1/2 second of tinny audio and then it cleared up. I suspect the clearing up is when the audio reset command gets executed.

What about moving the order of calls around so the audio reset occurs first and THEN the channel gets changed, so that every second of recorded video will be clean and stable?

So rather than this:
Code:
/usr/local/bin/channel_change $1

(nohup /usr/local/bin/delayed_settings.sh $DEVICE \
                                          $BRIGHTNESS \
                                          $HUE \
                                          $SATURATION \
                                          $CONTRAST \
                                          $VOLUME & exit) &
exit 0
Could I do this?:
Code:
(nohup /usr/local/bin/delayed_settings.sh $DEVICE \
                                          $BRIGHTNESS \
                                          $HUE \
                                          $SATURATION \
                                          $CONTRAST \
                                          $VOLUME & exit) &
/usr/local/bin/channel_change $1
exit 0

Another question: Does the PVR-150 have a SHARPNESS variable that can be set?

Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 06, 2008 9:40 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
No.

The whole point of the delayed settings trick is to get the final word after MythTV finishes frelling up the settings. This doesn't happen until after the original channel change script exits with a success indication.

You'll notice that it is using the same sequence of; change the channel first, mess with the settings second.


Top
 Profile  
 
 Post subject: a couple more questions
PostPosted: Wed Aug 06, 2008 10:03 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
Does the PVR-150 have a SHARPNESS variable that can be set? (by setting a slider in Mythtv or by passing a variable into the delayed_settings script)

In the scripts, I see variables 1-6 that get passed from one change1.sh to delayed_settings.sh. In delayed_settings.sh, in the # controls section, I see what looks like variable 8?
Code:
# controls:
BRIGHTNESS=${2:-127} # Picture brightness, actually the black level. [0 - 255]
HUE=${3:-0} # Hue or color balance. [-128 - 127]
SATURATION=${4:-63} # Picture color saturation or chroma gain. [0 - 127]
CONTRAST=${5:-63} # Picture contrast or luma gain. [0 - 127]
VOLUME=${6:-60000} # Overall audio volume. [0 - 65535]
AUDIO_INPUT=${8:-0}  # One of the available audio inputs

Where is variable 7 and how does variable 8 get passed in since it's not in the list that gets passed as one of the 6 variables from change1.sh?
Code:
(nohup /usr/local/bin/delayed_settings.sh $DEVICE \
                                          $BRIGHTNESS \
                                          $HUE \
                                          $SATURATION \
                                          $CONTRAST \
                                          $VOLUME & exit) &

In the for loop of the delayed_settings.sh script, are the commands inside the loop getting set 6 times?
Code:
for i in 0 2 4 6 8 10 ; do
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl brightness=$BRIGHTNESS >/dev/null
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl hue=$HUE >/dev/null
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl saturation=$SATURATION >/dev/null
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl contrast=$CONTRAST >/dev/null
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-ctrl volume=$VOLUME >/dev/null

# Add any extra ivtvctl commands here, before the sleep.
# NOTE: THIS is the command that resets audio input and works around tinny audio
/usr/local/bin/v4l2-ctl $CTL_OPTS --set-audio-input=1 >/dev/null

sleep 2
done


Thanks,
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
PostPosted: Thu Aug 07, 2008 10:11 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
neutron68 wrote:
Does the PVR-150 have a SHARPNESS variable that can be set?

Not that I'm aware of. Possibly one of the filter options or decimation but you'll need to do your own research. Start with:
Code:
v4l2-ctl --help | more
v4l2-ctl --list-ctrls-menus | more


neutron68 wrote:
In the scripts, I see variables 1-6 that get passed from one change1.sh to delayed_settings.sh. In delayed_settings.sh, in the # controls section, I see what looks like variable 8? ....
Where is variable 7 and how does variable 8 get passed in since it's not in the list

What you're looking at on that wiki page is a sloppily hacked version of the original, and haven't had the need or the time to look at it let alone fix it. At some point I gave up trying to correct the various botched versions people were floating around. In the original ALL of the arguments to delayed_settings.sh past the required device were given default values, and when you called it you could specify them or not, $7 was the AUDIO_CHANNEL option which maps to the "Current audio mode" displayed by --get-tuner.

neutron68 wrote:
In the for loop of the delayed_settings.sh script, are the commands inside the loop getting set 6 times?

Yes. It's a trick to minimize both the delay for the change and the chance of a race conditions with MythTV.

You may want to give this version a try.
Code:
#!/bin/bash
# Uncomment this for debugging
#set -vx

DEVICE=$1
exec >>/var/log/mythtv/changer$DEVICE.log 2>&1
echo "Called as: $0 $*"
echo "At: $(date)"

                     # controls:
BRIGHTNESS=${2:-127} # Picture brightness, actually the black level. [0 - 255]
HUE=${3:-0}          # Hue or color balance. [-128 - 127]
SATURATION=${4:-63}  # Picture color saturation or chroma gain. [0 - 127]
CONTRAST=${5:-63}    # Picture contrast or luma gain. [0 - 127]
VOLUME=${6:-60000}   # Overall audio volume. [0 - 65535]
AUDIO_CHANNEL=${7:-stereo}   # One of "multi-standard" "stereo" "lang1" "lang2"
AUDIO_INPUT=${8:-0}  # One of the available audio inputs

CTL_OPTS="-d /dev/video$DEVICE"
echo ; echo Settings before:
/usr/local/bin/v4l2-ctl $CTL_OPTS -l
/usr/local/bin/v4l2-ctl $CTL_OPTS --get-tuner
/usr/local/bin/v4l2-ctl $CTL_OPTS --get-audio-input

for i in 0 2 4 6 8 10 ; do
    /usr/local/bin/v4l2-ctl $CTL_OPTS -c brightness=$BRIGHTNESS >/dev/null
    /usr/local/bin/v4l2-ctl $CTL_OPTS -c hue=$HUE               >/dev/null
    /usr/local/bin/v4l2-ctl $CTL_OPTS -c saturation=$SATURATION >/dev/null
    /usr/local/bin/v4l2-ctl $CTL_OPTS -c contrast=$CONTRAST     >/dev/null
    /usr/local/bin/v4l2-ctl $CTL_OPTS -c volume=$VOLUME         >/dev/null

    /usr/local/bin/v4l2-ctl $CTL_OPTS --set-tuner $AUDIO_CHANNEL >/dev/null
    /usr/local/bin/v4l2-ctl $CTL_OPTS --set-audio-input $AUDIO_INPUT >/dev/null

    sleep 2
done
echo ; echo Settings after:
/usr/local/bin/v4l2-ctl $CTL_OPTS -l
/usr/local/bin/v4l2-ctl $CTL_OPTS --get-tuner
/usr/local/bin/v4l2-ctl $CTL_OPTS --get-audio-input
echo

It expects from 1 to 8 command line arguments, with any missing argument defaulting to the value on the right of the :- (e.g. VOLUME=${6:-60000} sets the default for the volume to 60000). To skip an argument just use "" or ''. To use this to _just_ set your audio input on device /dev/video0 to a nondefualt value:
Code:
/usr/local/bin/delayed_settings.sh 0 '' '' '' '' '' 1


Last edited by tjc on Fri Aug 08, 2008 6:15 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject: can I add date?
PostPosted: Fri Aug 08, 2008 2:47 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
OK tjc. Thanks for the clarifications. I like to learn by example.

I am interested in having the date/time get inserted into the log file.

Is there a command line I can add to the delayed_settings.sh script to put the date and time into the log file? Perhaps something like
Code:
exec >> date


Best wishes,
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 08, 2008 6:14 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Just
Code:
date

should work. The exec already redirects _all_ the output for the script to the log file. I'll add it to the script shown above...

OK, I made it a bit fancier than that, but not much...

BTW - What you were proposing would have done something bad, redirecting all the output to a file called date.


Top
 Profile  
 

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



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 59 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:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu