[mythtv-users] Is the pchdtv card looking good?

Brandon Beattie bbeattie-maillist at linkexplorer.com
Thu Sep 18 18:37:46 EDT 2003


Hi Steve, I'll answer the best I can, but I'm not a guru at everything
you've asked. :)

On Thu, Sep 18, 2003 at 07:04:01PM -0400, Steve Bower wrote:
> Brandon> It grabs data from /dev/video32 (The device for the pcHDTV
> Brandon> card) and puts it into the mythTV video buffer, either for
> Brandon> livetv, or for writing it to disk.  But yes, same idea as used
> Brandon> in dtvdump.
> 
> Hi Brandon,
> 
> Since you implemented the current pchdtv support, I wanted to ask you a
> few basic questions (I've received my card and am working on getting it
> going in mythtv):
> 
> - In what format is the data stored in the ".nuv" file?  I'm able to
> schedule recordings (and data goes into the recording file), but I'm
> unable to play them back.  I get "avformat error: -1" from the backend,
> which then exits (I submitted a patch to let it continue with the error
> instead of exiting).  Attempting to play with xine yields no useful
> results, and the utilities that came with the card can't seem to make
> any sense of it either.  I made /dev/video3 a symlink to /dev/dtv0 so
> the setup gui would find the card.

Even though it's stored as a .nuv, it's a pure dump of the data frmo
/dev/video32, which is mpeg2-ts.  mplayer and xine (older versions)
won't play them, as they didn't have support.  If you are using the
xine-hd that came on the CD, it should be able to play the .nuv files.
(I'm not sure if the extension is throwing xine off though???)  If your
backend is running, you can run the mythtv program alone on one of the
files you recorded and it should work.  If it doesn't, data somehow was
corrupted... :-/  There's a few things I've seen that do this, most it's
very random depending on where you start recording in the HD stream.
Maybe something will need to be improved on my "wait for 10 good packets
then start saving data" algorithm that is being done right now.  

I get several errors, segfaults (I need to update my cvs because this
was not my fault. :)  The AVCodec -1 error is that mythtv isn't able to
recognize the data at the begning of the file.  (Bad start on record?
If you have a patch, that would be helpful :)  ...)  Also, sometimes I
see errors for 1920x1080 or 1920x3748 (second number is random).  Also
bad data I believe.  I've been so busy lately I havn't been able to work
on much at all.  Pretty much at all. :(.

> 
> - How does mythtv handle the logical->physical channel mapping?  Do I
> need to edit the channel table in mysql for the correct frequencies (I
> can't tell what got recorded above because I can't play it back!)?  I'm
> guessing there's no support for PSIP yet...  :-)

I'll attach a little how-to on getting the card working in myth, it
addresses that you have to change the chanfreq for which real HD channel
to tune to.  .. There is no support for subchannels right now, jack the
maker of the card told me he would work on that.  (Saturday)

> - Have you been able (or attempted) to use a pchdtv card in the same
> "cell" as an NTSC card?  I tried it with a PVR-250 in my master backend
> and the pchdtv in a slave backend, but I couldn't get any recordings or
> channel changes to do anything with the pchdtv card.


No, but some people have had success and others haven't.  Someone was
able to, but the pcHDTV tuner wasn't found and a force on the tuner
module was needed.  Other reports that jack broke bttv for some cards.
I haven't touched my ntsc card due to lack of time. :(

> I've put the pchdtv card on its own master backend now, and am trying to
> get it working in that simple case.  I've been able to record (and view)
> stuff with the getatsc program that came with the card, so I know the
> card and reception are fine.
> 
> I'm experiencing the same issues with both the 0.11 release and today's
> CVS version.  I'm willing to contribute what I can to make things more
> seamless, once I get my brain around the code...  :-)

That would be nice.  I'm not too talented at this area, and I'm sad to
say that I'm not sure how much of a help I'll be.. When I had time, I
created the linux HTPC how-to, and my next major goal is to finish
editing this mini-howto for myth, so people can start to improve things
rather than having to rely on me.

> BTW, what's the "dtvdump" program you mention above?  I don't see it on
> the cdrom that came with the card (and a google search was fruitless).

It may be called getatsc.  I have pre-release drivers/binaries .. I'll
have to get a CD from him with the official release.

Let me know if you need any thing else.  I'm on IRC most nights, and
e-mail is a good way to get me, I check this dozens of times a day.

--Brandon

> 
>   Thanks,
>     Steve.

> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

-------------- next part --------------
To login for access to the CVS site:
cvs -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs login

To download modules:
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythtv 
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythmusic
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythvideo
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythdvd
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythweather
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythweb
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythgallery
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs checkout mythgame

To build a module:
cd <directory>
make distclean (If you have previously built before)
./configure (Not all modules will have this -- Be aware that each time you cnofigure, you may have to specify --enable-<option> for every option you want)
make (If the build will not start, run qmake then make)
sudo make install

On the first install of each module you have to load the database files.  They are often in a  <module>db/ directory.  Look through all directories for any .sql files.  Load these into the myth database as per instructions in the README's.  All sql files are loaded with something like `mysql -u <user> -p (if password is set) < <file.sql>` Most modules only have 1 sql, but this is not always true.  The main mythtv has mc.sql and if you are using cvs, also import the cvs.sql

Create some directories such as /mythtv/live, /mythtv/recordings,/mythtv/video,/mythtv/music.  

For mythtv install, run the setup program in the setup directory before running mythbackend and mythfrontend.  In the general settings enter the directories for hose directories that you just created.  In the card settings, Choose /dev/video32 for our HD card and pcHDTV ATSC for the card type.  For video sources you need to pick a name for the source (I use HDTV) and enter your zipcode.  For input connections, select the television settings and then select the video source HDTV.  Also set the starting channel to a known HD channel that you always get a very good/strong signal on.

Run the mythfilldatabase command  (first time only)

Make sure you have apache installed.  Also install phpmyadmin.  Once you can access phpmyadmin over the web select to edit the mythconverg database.  Select channels and then click the browse button.  For each channel listed, click on the link.  On each page will find a field called freqid.  Change the freqid to the real HD channel frequency.  If Channel 2 (NTSC/regular TV) is HD Channel 38, ener38 for the freqid.  Do this for each channel in the database.  If you have a channel with no matching HD channel, select to delete that channel.

Start mythbackend in one xterm/window and then start mythfrontend in another xterm/window.  Select TV and Watch TV.  Give about 10 seconds for the video t appear.  It should work.  If not, check the xterms/windows for error messages (You may have chosen a bad directory for storing the liveTV buffer, or may not have permission to write there, or the starting channel is weak and not possible to display.  It's always good to have the HD version of xine to make sure you can get some channels.  

If you ever switch to a channel and myth appears to freeze (but no crash) you may have to quit mythfrontend, quit mythbackend, go into the setup directory in the mythtv directory (When you built myth, or when you installed prebuilt packages) and run he main mythtv setup  program (This is no the setup settings in mythfrontend).  Go to the input connections and change the starting channel back to a channel that works well.  Start mythbackend and mythfrontend again and be carefl of switching to that channel. If you never get this channel well, reposition yor antenna or delete the channel via phpmyadmin.



More information about the mythtv-users mailing list