[mythtv-users] 2nd tuner HD-3000 card
Michael Jung
ricecrazy at yahoo.com
Sat Mar 11 23:23:46 UTC 2006
Hi Jon,
This worked for me - thank you very much! Am now running the HD-3000 as a second tuner. It works for both recordings and Watch Live TV - I can switch between the PVR-250 and the HD-3000 when watching live tv by pressing "Y." Below is a re-cap of what I did, maybe this will help others.
I do have a question and was wondering what your take on this would be. Playback stutters at the beginning using xine, then eventually smooths out after 5 seconds or so.. It stutters more when there's something going on in the background (like commercial flagging). To fix this, should I add more RAM (current running 512MB) or swap graphics cards (currently Geforce MX440, but I have a Geforce 6600 I can take from another machine)?
Thanks. Here's my recap:
1. Install the card into the box, hook the antenna up to it (coaxial input).
2. Download the firmware from pchdtv's site, un-tar it, and copy it into /lib/firmware.
3. Fedora Core 4 automatically recognizes the card and assigns it as /dev/video1, but in order to enable DVB support, I had to unload some modules and load others.
To do this, I ran this:
# /sbin/modprobe -rv cx88_blackbird
# /sbin/modprobe -rv cx88-dvb
# /sbin/modprobe -rv cx8800
# /sbin/modprobe -v cx88-dvb
The end result of this is that /dev/video1 is gone and is replaced by:
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/net0
In order to automate this unloading/loading every time, I put these lines in /etc/rc.local:
/sbin/modprobe -rv cx88_blackbird
/sbin/modprobe -rv cx88-dvb
/sbin/modprobe -rv cx8800
/sbin/modprobe -v cx88-dvb
There is apparently some problem with permissions for these devices in Fedora Core 4, so I ran this fix here:
http://pchdtv.com/forum/viewtopic.php?t=944
After rebooting, if I do:
# cd /dev/dvb/adapter0
# ls -l
The outcome should be:
crw-rw---- 1 root mythtv 212, 4 Mar 11 01:19 demux0
crw-rw---- 1 root mythtv 212, 5 Mar 11 01:19 dvr0
crw-rw---- 1 root mythtv 212, 3 Mar 11 01:19 frontend0
crw-rw---- 1 root mythtv 212, 7 Mar 11 01:19 net0
What seems to be important is that each device has "crw-rw---" and not "crw------."
4. I downloaded dvb-apps, installed it, set up a test channel, and ran azap to see if I was getting any stations to lock on.
I used this guide to set up dvb-apps, starting with the section "Using the DVB kernel modules."
http://www.penlug.org/twiki/bin/view/Main/DigitalTelevisionDVB
atscscan took a long time to run (about 15 minutes). It will report a lot of "tuner failed" messages but that is not a problem with the test, so let it run for awhile.
azap told me I had FE_HAS_LOCK on several stations so at that point I assumed I was good to go.
5. I went to labs.zap2it.com and created a new lineup, so now I have two lineups: One for Comcast Digital cable (which is what my PVR-250 is using) and this new one that is local broadcast. I combed through the listings and saved only the "DT" stations since all I am interested in is recording over-the-air HD.
6. I ran mythtvsetup and configured a new capture card.
Card type: "Digital Video Broadcast card (DVB)" (NOT pchdtv HD-3000)
DVB card number: 0
Card name comes up as: Oren OR51132 VSB QAM Frontend
Card Type comes up as: ATSC
I also went to Advanced Configuration and checked "Record in TS format instead of PS."
7. Then I followed the directions in the script below, including running the script.
That was it. I hope this helps other people who were in the same situation I was.
- mdj
Jonathan Lin <jonlin at linsvilla.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi there,
The main problem with HDTV and OTA is that you got to have good
signal. run azap and make sure you have lock all the time. Even tho at
my house, I get about 10 OTA channels, I can realistically watch only 6.
Attached is a script someone wrote long time ago to modify the zap2it
channel guide with what mythtv scans. open up the perl script and
follow it's instruction down to the dot. Let me know if you run into
any other problems.
Jon Lin
Michael Jung wrote:
> I am trying to add a pchdtv HD-3000 card to my existing Myth setup, and for the life of me I can't figure out how to get it to work. Can somebody provide some advice?
>
> Current setup is:
> Athlon 2200+
> MSI K7N2GM2-LSR nForce2 board
> 512MB of RAM
> 64MB Geforce MX 440 card
> Hauppauge PVR-250
>
> Distro is Fedora Core 4, kernel is 2.6.15-1.1831_FC4.
>
> This setup has been running about 3 weeks with no problems. The PVR-250 is set up to control my Motorola DCT2xxx series cable box via serial port. It's outputting via the MX440's S-Video port to a standard defintion TV. Sound is output from the motherboard's stereo out into the TV.
>
> For the HD-3000, I'd like to use it to capture OTA signals. I'd like to both record them and watch live TV on it, both output to my standard definition TV. The coax input is hooked up to a Zenith Silver Sensor. I'm in Los Angeles, CA and according to antennaweb I'm 25 miles away from the towers.
>
> I installed the card and copied the firmware in. This stuff seems to load fine. I tried testing with dvb-apps and I was able to get a channels.conf of several channels. azap is able to lock into several of these channels with signals around 3xxx to 8xxx.
>
> When I try to cat /dev/dvb/adaptor0/dvr0 > test.mpg, it only works sometimes. Sometimes it writes a huge file and sometimes it writes a relatively large file for the same amount of time. When it works, I can play it using mplayer test.mpg and get sound but no video, and I can play it using xine test.mpg and get video but no sound. I'm assuming (perhaps wrongly) that the card itself is fine and I just need to fix some configuration stuff in mplayer and xine at some point.
>
> Now, onto MythTV. I set up a 2nd lineup in Zap2It that contains just digital channels with the account I use currently. That lineup is configured as a 2nd video source in mythtv-setup. I set up the card as a DVB card, and assigned it to that video source.
>
> When I launch MythTV, I can now see the digital channels in the program listings guide. When I go to Watch Live TV, the PVR-250 comes up. I hit Y, then the screen goes blank for awhile, the it goes back to the MythTV menu.
>
> mythbackend.log looks like this:
>
> -----------
>
> 2006-03-09 21:41:07.177 DVB#0 Using DVB card 0, with frontend Oren OR51132 VSB/Q
> AM Frontend.
> 2006-03-09 21:41:07.182 DVB#0 ERROR - Unable to find channel in database.
> 2006-03-09 21:41:07.187 DVB#0 ERROR - Failed to get channel options for channel
> .
> 2006-03-09 21:41:07.191 DVB#0 Recorder: Card opened successfully (using TS mode)
> .
> 2006-03-09 21:41:07.196 DVB#0 ERROR - No PIDS set, please correct your channel s
> etup.
> 2006-03-09 21:41:08.202 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:09.210 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:10.219 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:11.226 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:12.234 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:13.242 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:14.250 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:15.258 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:16.266 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:17.274 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:18.282 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:19.291 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:19.291 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:20.298 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:21.306 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:22.254 Couldn't read data from the capture card in 15 seconds. Stopping.
> 2006-03-09 21:41:22.315 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:22.331 Changing from WatchingLiveTV to None
> 2006-03-09 21:41:23.326 DVB#0 WARNING - No data from card in 1 second.
> 2006-03-09 21:41:23.340 Closing DVB recorder
> 2006-03-09 21:41:23.343 Closing DVB channel
>
> -------------
>
> I have tried Googling for various error messages and have not come across anything that I understand. I am relatively new to Linux (about 3 weeks).
>
> Where do I even begin to start troubleshooting this?
>
> Thanks for any advice you can provide.
>
>
> ---------------------------------
> Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEEYojHf+0pExvKQARArPOAJ9hzp5jrlJqEQK1z51hL7v0V1u8lwCfZzzf
Yi4XJmp35fBR4jrXP7RjvMo=
=8Z1Y
-----END PGP SIGNATURE-----
#!/usr/bin/perl -w
#Last Updated: 2005.05.15 (xris)
#
# hdtvscan2dd.pl:
#
# Connects to the mythtv database and imports scanned hdtv channel id's
# into an existing DataDirect listing. Thanks to mchou for the original
# shell script that this is based on.
#
# 1. Run mythtvsetup
# 2. Create a profile called "HDTV (dd)" and attach it to a valid listing from
# your DataDirect account.
# 3. Create a profile called "HDTV (scan)" but don't attach it to any listing
# source.
# 4. Associate the "scan" profile with your air2pc tuner card
# 5. Exit mythtvsetup and run mythfilldatabase
# 6. Open mythtvsetup again
# 7. Go into the Channel Editor and perform a "Full" channel scan into the
# "scan" profile.
# 9. Exit mythtvsetup and run this script.
# 10. Restart mythbackend...
#
# Load DBI
use DBI;
# Some variables we'll use here
my ($db_host, $db_user, $db_name, $db_pass);
# Read the mysql.txt file in use by MythTV.
# could be in a couple places, so try the usual suspects
my $found = 0;
my @mysql = ("/usr/local/share/mythtv/mysql.txt",
"/usr/share/mythtv/mysql.txt",
"/etc/mythtv/mysql.txt",
"/usr/local/etc/mythtv/mysql.txt",
"$ENV{HOME}/.mythtv/mysql.txt",
"mysql.txt"
);
foreach my $file (@mysql) {
next unless (-e $file);
$found = 1;
open(CONF, $file) or die "Unable to open $file: $!\n\n";
while (my $line = ) {
# Cleanup
next if ($line =~ /^\s*#/);
$line =~ s/^str //;
chomp($line);
# Split off the var=val pairs
my ($var, $val) = split(/\=/, $line, 2);
next unless ($var && $var =~ /\w/);
if ($var eq 'DBHostName') {
$db_host = $val;
}
elsif ($var eq 'DBUserName') {
$db_user = $val;
}
elsif ($var eq 'DBName') {
$db_name = $val;
}
elsif ($var eq 'DBPassword') {
$db_pass = $val;
}
}
close CONF;
}
die "Unable to locate mysql.txt: $!\n\n" unless ($found && $db_host);
# Connect to the database
$dbh = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass)
or die "Cannot connect to database: $!\n\n";
# Make sure we disconnect
END {
$dbh->disconnect if ($dbh);
}
# Pull out the scanned source
my %sources;
my %sourceid;
my $sh = $dbh->prepare('SELECT name, sourceid FROM videosource WHERE lineupid IS NULL');
$sh->execute();
die "$DBI::errstr\n\n" if ($DBI::errstr);
while (my $row = $sh->fetchrow_hashref) {
$sources{$row->{'sourceid'}} = $row->{'name'};
$sourceid{'scan'} = $row->{'sourceid'};
}
# More than one scanned source?
if ($sh->rows > 1) {
# need some work here
die "More than one 'scan' type sourceid was found. I don't support this yet.\n";
}
# Finish
$sh->finish;
# Not found?
if (!$sourceid{'scan'}) {
die "Couldn't find a video source without a datadirect lineup id.\n",
"Please create a blank video source and do not attach it to DataDirect.\n\n";
}
# Bring up the possible other choices
undef %sources;
$sh = $dbh->prepare('SELECT name, sourceid FROM videosource'
.' WHERE lineupid IS NOT NULL AND lineupid NOT RLIKE "^DI(TV|SH)"'
.' ORDER BY name');
$sh->execute();
die "$DBI::errstr\n\n" if ($DBI::errstr);
while (my $row = $sh->fetchrow_hashref) {
$sources{$row->{'sourceid'}} = $row->{'name'};
$sourceid{'dd'} = $row->{'sourceid'};
}
# More than one dd source?
if ($sh->rows > 1) {
# need some work here
die "More than one 'datadirect' type sourceid was found. I don't support this yet.\n";
}
# Finish
$sh->finish;
# Not found?
if (!$sourceid{'dd'}) {
die "Couldn't find a valid video source with a datadirect lineup id.\n",
"Please create a video source for your local/cable broadcasts and\n",
" attach it to a DataDirect lineup.\n\n";
}
# Copy some required info from the scan list to the dd list
my $rows_updated = 0;
$sh = $dbh->prepare('SELECT * FROM channel WHERE sourceid=?');
my $sh2 = $dbh->prepare('UPDATE channel SET mplexid=?, serviceid=?, atscsrcid=?, freqid=?'
.' WHERE sourceid=? AND REPLACE(channum, "_", "")=?');
$sh->execute($sourceid{'scan'});
die "$DBI::errstr\n\n" if ($DBI::errstr);
while (my $row = $sh->fetchrow_hashref) {
$sh2->execute($row->{'mplexid'}, $row->{'serviceid'}, $row->{'atscrcid'}, $row->{'freqid'},
$sourceid{'dd'}, $row->{'channum'});
die "$DBI::errstr\n\n" if ($DBI::errstr);
$rows_updated += $sh2->rows;
}
$sh2->finish;
$sh->finish;
# Trap an error
if ($rows_updated < 1) {
die "Couldn't find any matching rows between the scanned and DataDirect listings.\n\n";
}
# Update the cardinput with the preferred sourceid and starting channel
$sh = $dbh->prepare('SELECT channum FROM channel WHERE sourceid=? ORDER BY REPLACE(channum,"_","")+0 ASC LIMIT 1');
$sh->execute($sourceid{'dd'});
die "$DBI::errstr\n\n" if ($DBI::errstr);
my ($startchan) = $sh->fetchrow_array();
$sh->finish;
$dbh->do('UPDATE cardinput SET sourceid=?, startchan=? WHERE sourceid=?', undef,
$sourceid{'dd'}, $startchan,
$sourceid{'scan'});
# Copy the scanned dtv_multiplex settings over to the dd source
$dbh->do('DELETE FROM dtv_multiplex WHERE sourceid=?', undef,
$sourceid{'dd'});
$dbh->do('UPDATE dtv_multiplex SET sourceid=? WHERE sourceid=?', undef,
$sourceid{'dd'}, $sourceid{'scan'});
# Remove the scan source from the database
$dbh->do('DELETE FROM videosource WHERE sourceid=?', undef,
$sourceid{'scan'});
$dbh->do('DELETE FROM channel WHERE sourceid=?', undef,
$sourceid{'scan'});
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
-----
Michael Jung
http://www.michaeljung.net
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20060311/3e22dcdd/attachment.htm
More information about the mythtv-users
mailing list