View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 155 posts ] 
Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 11  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Sun Aug 07, 2005 7:59 am 
Offline
Joined: Tue Jan 18, 2005 12:11 pm
Posts: 100
Location: MA, USA
As anyone discovers new info, or SnapperDragon's script is updated, can I suggest that people update the Wiki appropriately? That seems like the best place to keep the current instructions, saving new people the time of comprehensively studying these and other forum posts.


Top
 Profile  
 
 Post subject: getpvr.pl script
PostPosted: Tue Oct 04, 2005 10:59 am 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
This is the "getpvr.pl" script that will connect to this site and retrieve some text and the url where the updated pvr.pl file can be found.

I'm hoping to get the "pvr.pl" script deleted from any new KnoppMyth distro's and instead replaced with this one called "getpvr.pl". In this way, new releases of KnoppMyth will always have a simple way of letting users get the latest version of the pvr.pl script which will contain the specifics of making the PVR-350's tv-out work properly on newer versions of KnoppMyth.

Download this script here: http://dc1.snapperworld.net/files/mythtv/getpvr.pl

Code:
#!/usr/bin/perl

# Scriptname: getpvr.pl

# KnoppMyth  PVR-350 script update utility
# 10/04/2005, version 1.0

# Author: SnapperDragon (snapperdragon AT snapperworld DOT org)
#           You can also PM me on the KnoppMyth forums.

# This script is released under the GPL license.
# Pick the version that works best for you :)

# This utility is designed to grab an updated "pvr.pl" script.
# It works in conjunction with a forums post that tells it where
# to find the updated script.  The intent is that the content of
# this script will remain static and can be included with the
# KnoppMyth distribution.  The downloaded pvr.pl script will
# be responsible for actually updating your KnoppMyth system to
# work properly with your PVR-350 card's output since this has
#
# I will also update the pvr.pl script, as needed, when new
# distributions of KnoppMyth become available.  However, it is
# probably going to be the case that there will be some lag between
# a new relesae and me being able to update the pvr.pl script to
# support differences between the last supported and current versions.

##############################################################
##############################################################

# MAIN
 
use strict;

#This is where this script will get additional info
my $parametersurl="http://mysettopbox.tv/phpBB2/viewtopic.php?p=21685";

# Call the subroutines

#Log file wget-getpvr.pl contains the results of the wget command
#that tries to retrieve its instructions on what to display and
#where to get the updated pvr.pl file from.

&get_params;

my $text;   # Some text to be displayed by this script for the user.  It
            # is derived from the KnoppMyth forums post mentioned in the
            # $parametersurl variable above.
my $pvrurl; # The url where  the pvr.pl script can be downloaded from.
            # This is also derived from the URL above.

#Print the intro text taken from the support site message
print "$text\n";
#Let user know where we are getting the updated script from
print "PVRURL=$pvrurl\n";
print <<EOTEXT;

If the URL following the PVRURL= line above looks messed up, you
should visit the support site and use the information listed there.

Does the URL look like a correctly formatted URL? (y/n)

EOTEXT

my $response = <STDIN>;

while($response =~/n/){
  print "Please enter the URL that points to the updated pvr.pl script\n";
  $pvrurl = <STDIN>;
  chomp($response);
  print "Accept $pvrurl as the URL? (y/n)\n";
  $response=<STDIN>;
}

print <<EOTEXT;

I will now download the latest \"pvr.pl" script.
from the URL above.  Because the script must be
run as root, you should take a look at it to make sure
it does not do anything blatantly bad to your system.

Once you are OK with what it will do to your KnoppMyth
box, then please run it to begin the modification of
your KnoppMyth system for use with the PVR-350's TV-out
port.  To run the script, type this:

perl ./pvr.pl

Press ENTER to download the file.

EOTEXT

$response=<STDIN>;

my $cmd="wget -c -o wget-pvr.log2 $pvrurl";
`$cmd`;
print <<EOTEXT;

You should now have a file called pvr.pl in your current directory.

Please view the downloaded file and execute it when you are ready:

  perl ./pvr.pl

If the file is not there, view the wget-getpvr.log2 file to see
what may have happened.

EOTEXT
#### SUBROUTINES #############################################

sub get_params{

  # In order for this script to do it's thing, it needs 2 pieces
  # of information.
  # First, some text, which is displayed for the
  # user of this script to read.
  # Second, the url of where to find the additional script that
  # is updated after each new KnoppMyth release.

  # The only critical thing here is that this data is stored on
  # the KnoppMyth forums at URL
  # http://mysettopbox.tv.phpBB2/viewtopic.php?p=21685
  # Additionally, this post must contain some pseudo tags that
  # are searched for and used as the TEXT and URL parameters.
  # Should the URL of the forums or the behaviour of the html
  # that is generated by this site change, then it will be
  # necessary to modify this script accordingly.  Otherwise, it
  # is hoped that only the parameters TEXT and URL need to be
  # modified at the post above in order to keep things up to date.
 

  # Get the forums post slurped into a variable, with a log file
  # generated on the disk in the event the wget fails.
  my $cmd="wget -O - -c -o wget-getpvr.log $parametersurl";
  my @a=`$cmd`;
 
  my %parameters;
  foreach my $line(@a) {
    if($line =~/PVRTEXT/){
      if(! defined($parameters{text})){
        $parameters{text}=$line;
      }
    }
    if($line =~/PVRURL/){
      if(! defined($parameters{url})){
        $parameters{url}=$line;
      }
    }
  }

  my @text=split(/\[PVRTEXT\]/,$parameters{text});
  $_=$text[1];

  s/<a.*blank\">//; #Get rid of the html markup
  s/<\/a>//;
  $text=$_;

  my @url=split(/\[PVRURL\]/,$parameters{url});
  $_=$url[1];
  s/<a.*blank\">//; #Get rid of the html markup
  s/<\/a>//;
  $pvrurl=$_;
}


Last edited by SnapperDragon on Sat Oct 08, 2005 9:36 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 11:10 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
I'll added this to the latest development source...

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 9:28 am 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
I am currently working on the updates to include R5A16. Please check the first post in this thread to see where things stand.

_________________
MythRig: Shuttle SN41G2 + PVR-350->TV + KnoppMyth R5Beta7


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 09, 2005 1:22 am 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
This post is obsolete. It was basically my first post in this thread, but I moved it here for posterity. The first post is now more streamlined and contains info that is more relevant to the current release of KnoppMyth.


-----------------------------------


Current Version: 0.2.5

Supported KnoppMyth Versions: R4V5, R5A12, NTSC (PAL hopefully soon)

[Thanks to ALARSON's post ( http://mysettopbox.tv/phpBB2/viewtopic. ... ght=pvr350 )for putting together a great post on what to do to get the PVR-350 to ouput both X and TV to my set, I have gone a step further and created a script that will take care of all the details for those who are not comfortable messing with Linux.]

Please see the above link as to the specifics of how PVR-350 out is working. I am currently following the directions he posted, only just automating them. There is still a problem where you can't exit to the X desktop on R5A12, and this is being investigated.

WARNING:
=======
THIS SCRIPT IS STILL BEING DEVELOPED AND REFINED, SO IT MAY HAVE A FEW QUIRKS. I WILL BE DOING ADDITIONAL TESTING AND ADDING ADDITIONAL CODE TO IT THAT TAKES CARE OF OTHER SMALL ISSUES WITH KNOPPMYTH (WHICH, I MAY ADD, IS ONE NICE DISTRO!). PLEASE BE CAREFUL IF YOU HAVE PUT A LOT OF TIME INTO YOUR MYTH BOX. I RECOMMEND YOU USE A FRESH INSTALL, IF POSSIBLE SO THAT YOU DON'T LOSE ANY OF YOUR CONFIG WORK IF THE SCRIPT DECIDES TO DO BAD THINGS.

BUGS: If you find a bug, please run the sript with the -d option and redirect that to a file: "perl pvr.pl -d >debug.txt" and then PM me with the results. Try not to fill this thread with these as it will get confusing since the util is being modified and the posts will end up being moot. If you do decide to post a bug in this thread, please include the version of the utility you are using and which version of KnoppMyth.

Assumptions:
1. You are using KnoppMyth R4V5 or R5A12
2. You have setup KnoppMyth and verified TV works on your VGA monitor.
3. You are using the default userid/password for the MySQL db (mythtv/mythtv). I need this to update the setting telling MythTV to send TV-out to your PVR card.
4. You have a single PVR card installed. If not, I'm not quite sure what the results will be. Take one out before running the script to see if you can make it work first before trying with both cards.

What it does:

The script will figure out what your FB device is, what your BusID is (this one is well documented, but always for BUS 0, and lspci gives a format that is different than what is expected in the X config file...frustrated me for a bit). It will also detect your tuner type. Output will be through the PVR-350's SVIDEO or COMPOSITE port. Both are enabled in R5A12's version of the IVTV drivers. I also fix up glitches that are present that cause problems for the pvr-350 out as documented on this site). Basically, the script will try and do all the little things that are needed to make your PVR-350 output work for X and live TV/recordings.

The script will modify these files:
/etc/X11/XF86Config-4
/etc/X11/gdm/gdm.conf (R5A12 only)
/etc/mythtv/modules/ivtv
/home/mythtv/.xsession (R5A12 only)
/etc/init.d/bootmisc.sh (R5A12 only)

Update to mythconverg database for setting "PVR350OutputEnable".

What you need to do:

1. Get a root shell on your MythTV box. The best way is with the "su - root" command. This puts you in the /root directory. Then get the util like so:

wget http://dc1.snapperworld.net/files/mythtv/pvr.pl

2. Issue this command : perl pvr.pl -i (for options, use "perl pvr.pl -?" or no options )
3. Follow the prompts.
4. Reboot

This version works correctly with R5A12 and R4V5 as of version 0.2.5.

If something gets botched and you don't have any output on your TV or VGA, do this:

Press CTRL-ALT-F1 (maybe several times, but usually just once)
Login as root (su - root).
Issue "perl pvr.pl -r" to restore your settings.
Reboot

This script saves files in the /root/pvr350util directory.


Final Notes:
At some point, I'd like to rewrite this as a bash/shell script. It may make it nicer then if it is ever decided to be included with KnoppMyth. I'm just a PERL junkie :)

_________________
MythRig: Shuttle SN41G2 + PVR-350->TV + KnoppMyth R5Beta7


Top
 Profile  
 
 Post subject: Updated for R5A22
PostPosted: Tue Oct 25, 2005 7:18 pm 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
Just wanted to say that updates have been made and support is now available for R5A22 (sorry, NTSC only).

If someone wants to provide the XConfig-4 file which is setup and working for PAL, I'll be happy to include this as well. I just have no way of testing :(

_________________
MythRig: Shuttle SN41G2 + PVR-350->TV + KnoppMyth R5Beta7


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:34 am 
Offline
Joined: Wed Mar 30, 2005 3:47 am
Posts: 56
I used getpvr.pl in A22 on in a single-machine configuration and it worked just fine; TV-out on the machine's 350 worked perfectly. But that was just a test configuration...

In my current setup, I'm going to have a PVR-350 in a slave backend, and some -250's in the master backend. (The SBE will have -only- the 350, and no 250's.) Am i correct in assuming that it should Just Work to run getpvr.pl on the SBE (e.g., the machine where the 350 is) and it'll work even in a split-machine configuration? (I'm presuming this has been tested, but I figured I'd ask before I possibly shoot myself in the foot.)

Thanks!


Top
 Profile  
 
PostPosted: Thu Nov 03, 2005 8:50 pm 
Offline
Joined: Thu Nov 03, 2005 8:32 pm
Posts: 1
Location: Des Moines, IA
For some reason the script kept on setting BusID as "00:00:0". I manually edited /etc/X11/XF86Config-4 based on the output of "lspci -X".

mikael@mythtv:~$ cat /var/log/messages | grep "ivtv0-osd: fb"
Nov 3 08:39:48 mythtv kernel: ivtv0-osd: fb1: iTVC15 TV out frame buffer device

mikael@mythtv:~$ lspci -X | grep iTV
PCI:0:16:0 Multimedia video controller: Internext Compression Inc iTVC15 MPEG-2 Encoder


--------Part of /etc/X11/XF86Config-4----------

Section "Device"
Identifier "Hauppauge PVR 350 iTVC15 Framebuffer"
Driver "ivtvdev"

### change fb1 to whatever number you got in the previous section
Option "fbdev" "/dev/fb1"
Option "ivtvdev" "/dev/fb1"

### change the busid to whatever is reported by lspci. Note that
### output of lspci is hex, so add a preceding "0x" to the BusID
BusID "PCI:0:16:0"
EndSection

------------------------------------------------


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2005 7:46 am 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
Mikael:

Thanks for the heads-up. I will try and add a bit more flexibility in the script to allow user input to override the detected values. I'll see if I can spot what may have happened.

By the way, I cannot guarantee the results if you have a setup that is not near stock...meaning that you may have upgraded kernel or ivtv drivers. The other problem is that if any newer pvr-350's cause the lspci to emit a string different than what I expect based on the card that I have. I'll check to see what the script does based on the output you provided and make any adjustments necessary and then update the first post to let everyone know if it's been resolved.

_________________
MythRig: Shuttle SN41G2 + PVR-350->TV + KnoppMyth R5Beta7


Top
 Profile  
 
 Post subject: getpvr.pl for RA26?
PostPosted: Sun Dec 04, 2005 11:06 pm 
Offline
Joined: Sun Dec 04, 2005 9:46 am
Posts: 10
Location: Stone Mountain, GA. USA.
I notice that getpvr.pl doesn't fetch a script for RA26. Can anyone tell me
what the signifigant differences are between RA22 and RA26 as they related to the PVR-350? I'm pretty decent with perl but am only just taking baby steps into MythTV (and related software like ivtv) so I'm a little hesitant to go hacking on my own. Any advice for a PVR-350 owner looking to use RA26?

tia,


Top
 Profile  
 
 Post subject: Re: getpvr.pl for RA26?
PostPosted: Thu Dec 08, 2005 1:35 pm 
Offline
Joined: Mon Oct 20, 2003 12:11 pm
Posts: 18
DarG wrote:
I notice that getpvr.pl doesn't fetch a script for RA26. Can anyone tell me
what the signifigant differences are between RA22 and RA26 as they related to the PVR-350? I'm pretty decent with perl but am only just taking baby steps into MythTV (and related software like ivtv) so I'm a little hesitant to go hacking on my own. Any advice for a PVR-350 owner looking to use RA26?

tia,


I'd like to second the motion. I am still a newbie when it comes to MythTV (I did have an aborted attempt to set up a mythbox for a friend a year ago, but I am now trying it for myself), will this script work for RA26?

Can I just run this script:
http://dc1.snapperworld.net/files/mytht ... -pvr350.pl

Thanks,
tyro


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 10, 2005 2:35 pm 
Offline
Joined: Thu Dec 23, 2004 12:22 pm
Posts: 55
Location: Portland, OR
The script for A22 worked jsut fine on a clean install of A26 on mine today.

-Lane


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 18, 2005 8:17 am 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
It appears that the A5R22 script works as mentioned. Sorry for letting this go, but I only have one box and it was being used by the wife. I've updated the script, but as of this post, it is untested. I should have it tested later today as I'm rebuilding my box from R5A16 to 26.

_________________
MythRig: Shuttle SN41G2 + PVR-350->TV + KnoppMyth R5Beta7


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 5:24 pm 
Offline
Joined: Fri May 06, 2005 6:31 am
Posts: 79
Location: Spain
After I execute the script, do I have to change de refresh rate ?

/etc/X11/XF86Config-4
change to : VertRefresh "60"

Also, anyone have a problem with oversize screen when i'm not in myth tv ?


Top
 Profile  
 
PostPosted: Sun Jan 08, 2006 9:00 am 
Offline
Joined: Fri Dec 16, 2005 7:02 am
Posts: 15
I've got a wierd problem.....I ran your script on R5A12, worked great....but only for live tv. When I start mythtv, it only appears on my VGA monitor, only when I select watch tv does it switch to the PVR 350's TV out. I've searched all over every forum and I still haven't even seen anyone with a realatively close problem. Do you by chance have any ideas? Any help would be greatly appericated by this linux newbie.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 155 posts ] 
Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 11  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 15 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