Author |
Message |
Big boy stan
|
Posted: Wed Oct 03, 2007 7:51 am |
|
Joined: Wed Jan 04, 2006 10:20 am
Posts: 387
Location:
South New Jersey, USA
|
I gave the cron job idea a try and it seemed to work as expected. In fact the tinny sound remains for excactly one minute at the begining as the recording starts on the minute and the cron job is then run at the next minute of the clock. After that it cleared right up. Did not have any issues with glitches after that. This is kinda like smashing a mosquito with a sledge hammer but it was a lot quicker to implement then the channel changer solution. The down side is you do have to live with that first minute of bad sound so I will be working on the putting the channel change solution in place as soon as I get some time.
To anyone who wants to try this:
1) Log in as root
2) Type "crontab -e"
3) Type is a line as follows:
* * * * * /usr/local/bin/v4l2-ctl --set audio-input 1 -d /dev/video0
4) Exit out with a save.
_________________ LINHES 8.6.1 BE/FE - MSI K9N6SGM-V with AMD A64 X2 4600+, 4GB Ram. 1.5TB WD. HDHR Prime. Nvidia GT210. MCE remote. FrontEnd - Dell Vostro 400 3.0GHz Core2Duo NVidia GeForce210. MCE Remote
|
|
Top |
|
 |
Thermopyle
|
Posted: Mon Oct 08, 2007 9:33 pm |
|
Joined: Mon Oct 04, 2004 12:56 pm
Posts: 57
|
Bump -
What's really annoying is that this card worked in previous versions flawlessly. I was previously on R5E50 (I think). Motherboard died, reinstalled with R5F27, switched from 350 tv-out to nvidia out, got rid of my buggy A710 audio card and all hell breaks loose. I blame the IVTV version.
|
|
Top |
|
 |
Big boy stan
|
Posted: Tue Oct 09, 2007 7:00 am |
|
Joined: Wed Jan 04, 2006 10:20 am
Posts: 387
Location:
South New Jersey, USA
|
I agree this is frustrating. I have two PVR-150s that I purchased about a year apart. They are actually differenct models. One has the IRblaster/remote conenctions and the other is just a PVR card.
One is connected to the S-video on my STB and the other is using the tuner direct throug the co-ax (no STB). As reported the problem only exists on the card using the S-video. No problem with the tuner.
Since not everone is having this problem, I thought maybe there was something card related and switched the inputs on the cards. Unfortuneatly, both cards had the same problem.
Oh well 
_________________ LINHES 8.6.1 BE/FE - MSI K9N6SGM-V with AMD A64 X2 4600+, 4GB Ram. 1.5TB WD. HDHR Prime. Nvidia GT210. MCE remote. FrontEnd - Dell Vostro 400 3.0GHz Core2Duo NVidia GeForce210. MCE Remote
|
|
Top |
|
 |
arriflex
|
Posted: Thu Nov 15, 2007 6:09 pm |
|
Joined: Thu Feb 23, 2006 2:41 pm
Posts: 68
|
Is there more to this than just the set audio input? I was not able to eradicate my tinny audio effect completely with that command. Should I also set the volume?
arri
_________________ Athlon 64 X2 4200+ 2GB Ram
MSI K8N Neo4-F NF4 939
ASUS N EN6200TC256/TD/64M
500gb SATA
1x Plextor PX-M402U
1x HD5000
R5.5 Upgrade from F27
|
|
Top |
|
 |
loco_hombre
|
Posted: Thu Nov 15, 2007 7:08 pm |
|
Joined: Wed Feb 01, 2006 12:49 pm
Posts: 42
|
Do you have two cards? If so, you will have to do the same command with /dev/video1 to get the other card.
Code: * * * * * /usr/local/bin/v4l2-ctl --set audio-input 1 -d /dev/video1
You might try watching livetv and then shell into the box remotely and just type the command at the prompt to see if it works then....you would type: Code: /usr/local/bin/v4l2-ctl --set audio-input 1 -d /dev/video1
|
|
Top |
|
 |
arriflex
|
Posted: Thu Nov 15, 2007 11:19 pm |
|
Joined: Thu Feb 23, 2006 2:41 pm
Posts: 68
|
I only have the one PVR150.
I'll try the live tv trick; however, I can't say whether or not I have the problem on live tv. I have yet to pin it down to one channel, or condition that consistently creates the issue. Anyway, I'm currently running the command as a cron job every minute and I still have occasional occurrences.
arri
_________________ Athlon 64 X2 4200+ 2GB Ram
MSI K8N Neo4-F NF4 939
ASUS N EN6200TC256/TD/64M
500gb SATA
1x Plextor PX-M402U
1x HD5000
R5.5 Upgrade from F27
|
|
Top |
|
 |
arriflex
|
Posted: Fri Nov 16, 2007 10:00 am |
|
Joined: Thu Feb 23, 2006 2:41 pm
Posts: 68
|
BTW, on my machine I need another dash for the command to work. It goes between set and audio. And of course, because I only have the one card, I use video0.
Code: /usr/local/bin/v4l2-ctl --set-audio-input 1 -d /dev/video0
Anyway, I'll try and replicate it on live tv.
arri
_________________ Athlon 64 X2 4200+ 2GB Ram
MSI K8N Neo4-F NF4 939
ASUS N EN6200TC256/TD/64M
500gb SATA
1x Plextor PX-M402U
1x HD5000
R5.5 Upgrade from F27
|
|
Top |
|
 |
arriflex
|
Posted: Sun Nov 18, 2007 12:05 am |
|
Joined: Thu Feb 23, 2006 2:41 pm
Posts: 68
|
All right, I got it to work on live tv, and it made the difference between being willing to watch with the sound turned on finally!
Now just to figure out this script...
I think I understand that TJC inserts /usr/local/bin/change_tuner0.sh into the input connections external channel change for tuner0 in this case. However, I am trying to do similar to what the original poster did: normally I'm running /etc/lirc/direct.pl from my input connection for video0, composite1 to control my directv via serial.
Does the ivtv-tune command get the information from the tuner that something's going on even when I am using my external channel command of directv.pl?
Or do I need to replace the external channel command to call the change_tuner0.sh script and then call the directv.pl from inside change_tuner0.sh with Code: /etc/lirc/directv.pl -d /dev/video$DEVICE -t $FREQ_TBL -c $1 where TJC had Code: /usr/local/bin/ivtv-tune -d /dev/video$DEVICE -t $FREQ_TBL -c $1
arri
_________________ Athlon 64 X2 4200+ 2GB Ram
MSI K8N Neo4-F NF4 939
ASUS N EN6200TC256/TD/64M
500gb SATA
1x Plextor PX-M402U
1x HD5000
R5.5 Upgrade from F27
|
|
Top |
|
 |
tjc
|
Posted: Sun Nov 18, 2007 10:12 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
You need to replace it, ivtv-tune has no magic way of knowing about your cable box, it just controls the tuner on a PVR card which you may not even be using.
|
|
Top |
|
 |
arriflex
|
Posted: Sun Nov 18, 2007 4:48 pm |
|
Joined: Thu Feb 23, 2006 2:41 pm
Posts: 68
|
For reference, this is what worked for my system:
TJC's /usr/local/bin/delayed_settings.sh with a chmod +x to make executable.
Modification to his /usr/local/bin/change_tuner0.sh (also chmod'ed) as follows:
Code: #!/bin/bash # Uncomment this for debugging #set -vx
DEVICE="0" # The PVR-250 card exec >>/var/log/mythtv/changer$DEVICE.log 2>&1 echo "Called as: $0 $*"
FREQ_TBL="us-cable-irc" # Possibly "us-cable", "us-cable-hrc", ... BRIGHTNESS=127 # Picture brightness, actually the black level. [0 - 255] HUE=0 # Hue or color balance. [-128 - 127] SATURATION=63 # Picture color saturation or chroma gain. [0 - 127] CONTRAST=63 # Picture contrast or luma gain. [0 - 127] VOLUME=58880 # Overall audio volume. [0 - 65535] AUDIO_CHANNEL=stereo AUDIO_INPUT=1
export HOME=/home/mythtv echo "Setting channel to $1" #env /etc/lirc/directv.pl $1 (nohup /usr/local/bin/delayed_settings.sh $DEVICE \ $BRIGHTNESS \ $HUE \ $SATURATION \ $CONTRAST \ $VOLUME \ $AUDIO_CHANNEL \ $AUDIO_INPUT & exit) & exit 0
And finally, made sure to call /usr/local/bin/change_tuner0.sh in the "external channel command" in input connections for this tuner (my satellite receiver in this case) from myth setup.
Also important to actually have the /etc/lirc/directv.pl script in place and appropriately chmod'ed.
Hope that helps...
arri
_________________ Athlon 64 X2 4200+ 2GB Ram
MSI K8N Neo4-F NF4 939
ASUS N EN6200TC256/TD/64M
500gb SATA
1x Plextor PX-M402U
1x HD5000
R5.5 Upgrade from F27
|
|
Top |
|
 |
ceenvee703
|
Posted: Thu May 01, 2008 7:07 am |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
The last line of the originally-posted script at the top of this thread results in an error. It's missing a space between $DEVICE and --get-ctrl=
It should be:
Code: /usr/local/bin/v4l2-ctl -d /dev/video$DEVICE --get-ctrl=brightness,hue,saturation,contrast,volume
Also, in the rest of the original delayed_settings script, the "-d /dev/video" or "$CTL_OPTS" comes before the --set-ctrl, but for the extra command to goose the audio input, it comes after. I swapped them at least for consistency, and also hoping that it actually does what it's supposed to.
|
|
Top |
|
 |
ceenvee703
|
Posted: Fri May 02, 2008 6:05 am |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
OK, the scripts are finally working for me as they're supposed to and tinny sound is fixed. I can actually hear the audio start out tinny, then dip down in volume and come back fixed.
Things to watch for that helped me troubleshoot:
1) See my previous note about some typos in the original script posted at the beginning of this thread. Not sure if that helped to fix things
2) Check the logs that these scripts create, and also note that various versions of the scripts in these threads write those logs to various places (the original writes to /tmp, tjc's versions write to /var/log/mythtv/ which is probably a better place for it)
3) Check that you're actually setting the right card. At first I thought my PVR-150 was at /dev/video0 . But after taking tjc's advice and checking v4l2-ctl's help file, I tried the --get-audio-input option to see what it was set to. Running that on /dev/video0 gave no results, but running it on /dev/video1...
Code: root@mbe:/home/ceenvee703# /usr/local/bin/v4l2-ctl -d /dev/video1 --get-audio-input Audio input : 1 (Line In 1)
4) Some versions of the scripts in this thread try to set AUDIO_CHANNEL=stereo . With that in place I was getting an error in the script's logs, so I took that parameter out
5) It also wasn't working for me when trying to pass AUDIO_INPUT to the delayed_settings script (it was setting it to 0 instead of 1, don't know why), so I set it manually in the final line of delayed_settings.
I will post the scripts that are working for me at the knoppmythwiki.
EDIT: Page is up at http://www.knoppmythwiki.org/index.php? ... udioPVR150
|
|
Top |
|
 |