Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General pcHDTV topics -> Howto tune channels; WARNING TO POTENTIAL USERS
Post new topic  This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic 
Howto tune channels; WARNING TO POTENTIAL USERS
PostPosted: Tue May 16, 2006 11:28 am Reply with quote
appleton
 
Joined: 06 May 2006
Posts: 14




Hi.
Here is a summary of how I scanned for and tuned channels. I wanted to explain concisely this preceding link:
http://www.pchdtv.com/forum/viewtopic.php?t=1432&sid=7783472fd9a234dd56cc6fe05a1938aa
and this one too
http://pchdtv.com/forum/viewtopic.php?t=1446&sid=62806839b129831fc5cb69d647d5257e

I am working on Debian Etch (2.6.12 amd64 kernel) with a Sempron2600 and 512MB of memory. I am working with Comcast digital cable.
I have a pc3000 card and an nvidia G-Force MX4000 installed.


(0) Unrelated to this exercise, I had installed nvidia drivers. I omitted the procedure because it was utterly simple compared to what follows. The obnoxious nvidia splash screen I confirmed and then turned off with the
Option "NoLogo" "YES"
line under Device.

(1) I copied dvb-fe-or51132-qam.fw from my pc3000 cdrom to /usr/lib/hotplug/firmware/

(2) I got the atscscan program from CVS.
apt-get install cvs
(actually, I did dpkg -i cvs_1.12.9-15_amd64.deb)
cvs -z3 -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv co dvb-apps
cp -a dvb-apps dvb-apps_CVS
cd dvb-apps
make
...make exited with errors, but it did give me a working atscscan. I used it thus.
cd util/scan
./atscscan atsc/us-Cable-Standard-center-frequencies-QAM256 > raw.chans
which gave me a long 270+ line file.

(3) I found unencrypted files thus. I manually went through the file and found 26 lines that looked complete -- no :0: as the third to last entry.
I put each of these lines in a file called channels.conf. I then changed the first entry of each line to a distinct identifier, a number such as 1, 2, 3, ..26.

(4) I installed the patched videodev.h
cp /media/cdrom0/linux/FedoraCore2-Kernel-2.6-systems/drivers/FedoraCore2-HD3000-driver-rev-1.4.tar.gz .
tar -zxf FedoraCore2-HD3000-driver-rev-1.4.tar.gz
cd FedoraCore2-HD3000-driver-rev-1.4
install -c include/videodev.h /usr/include/linux

(5) Just to be absolutely certain that I had xvmc, I installed a library
apt-get install libxvmc1
(actually, I did dpkg -i libxvmc1_6.8.2.dfsg.1-7_amd64.deb)
At this point, I confirm the presence of xvmc. These exist,
/usr/include/xorg/xf86xvmc.h
/usr/include/xorg/xvmcext.h
and "dpkg -L nvidia-glx" shows
/usr/X11R6/lib/libXvMCNVIDIA_dynamic.so.1
/usr/X11R6/lib/libXvMCNVIDIA.so.1
/usr/X11R6/lib/libXvMCNVIDIA.so.1.0.7174
/usr/X11R6/lib/libXvMC.so.1
/usr/X11R6/lib/libXvMC.so.1.0

(6) As suggested in this link,
http://pchdtv.com/forum/viewtopic.php?t=331&sid=62806839b129831fc5cb69d647d5257e
I edited my /etc/X11/xorg.conf
by putting
Option "RenderAccel" "1"
at the end of the Device section.
I restarted X, logged in, and did
xdpyinfo
I saw "XVideo-MotionCompensation" in the extensions section

(6) I tried to configure xine-hd-lib with the following line,
echo /usr/local/lib/libxine-hd-ui-0.99.2 >> /etc/ld.so.conf
/sbin/ldconfig
./configure CC=/usr/bin/gcc-3.4 --with-xv-path=/usr/X11R6/lib/ --with-xvmc-path=/usr/include/xorg/
configure finds "Xv (XVideo *static*)" but not xvmc!
configure FAILS WITH EVERY PERMUTION OF --with-xvmc-path=/usr/include/xorg/
I continue.
make
make install
I procede to make a working xine.
cd ../xine-hd-ui-0.99.2
export LD_LIBRARY_PATH="/usr/local/lib"
./configure CC=/usr/bin/gcc-3.4
make
make install

(7) I compiled mplayer (making a deb package) with dvb support thus,
apt-get install fakeroot debhelper libgtk1.2-dev libconfhelper-perl libpng12-dev x-window-system-dev
apt-get install gcc-3.4
tar -jxf MPlayer-1.0pre7try2.tar.bz2
cd MPlayer-1.0pre7try2
MAKEFLAGS="CC=gcc-3.4" DEB_BUILD_OPTIONS="--enable-gui --enable-menu --enable-dvb --enable-xvmc" fakeroot debian/rules binary
cd ..
dpkg -i mplayer_1.0cvs_amd64.deb
the resulting mplayer did not recognize -vo xvmc!

(Cool I ran mplayer and xine to create their directories for user. I copied the channels.conf from step 3 to /home/user/.mplayer and .xine.
The command
xine
gave a nice beautiful xine interface -- TOTAL USELESS FOR DVB PLAYBACK. When I click on the "DVB" button, xine complained that
"There is no input plugin available to handle
dvb://26"
The command
mplayer -vo xvmc dvb://26
gave me "error opening/initializing the selected video device."
and mplayer quit.
I finally issued the following line,
gmplayer dvb://26
et voila, I saw the test channel for comcast (advertisements). The quality was terrible (blocky, jerky, and interlaced!); the display was 720x480.
I proceeded with 25, 24, etc. and managed to find all the major local channels (and a few "auxiliary" channels carried by the major networks and pbs). I found about 12 channels total.
THEIR QUALITY WAS AT BEST EXTREMELY POOR AND USUALLY UNACCEPTABLE FOR ANY PURPOSE WHATSOEVER.

The preceding exercise took well over 100hours of to figure out.
The result is, so far, atrocious.

I have a method (including a script that I wrote) that found additional channels, but I have no idea if it is of any use because my a/v quality is so poor. (I can't tell if encryption is causing problems or if my poor setup is causing them.)

Question#1: How do I get an "input plugin" for xine to play dvb://?
Question#2: How do I make xine and mplayer compile with xvmc?
Question#3: What have I done wrong such that my a/v quality is so abominable?
View user's profile Send private message
PostPosted: Wed May 17, 2006 1:25 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




In the make flags for mplayer, add --with-xvmclib=/usr/X11R6/lib/libXvMCNVIDIA.so

I have the library statically linked but this will probably still work.

I think it's the same deal with xine: change the xvmc path in configure to --with-xvmc-path=/usr/X11R6/lib/libXvMCNVIDIA.so
View user's profile Send private message
PostPosted: Thu May 18, 2006 12:01 pm Reply with quote
appleton
 
Joined: 06 May 2006
Posts: 14




Scott,
thanks very much for the suggestion. Unfortunately, it did not appear to help.
The command
./configure --enable-gui --enable-menu --enable-dvb --enable-xvmc --with-xvmclib=/usr/X11R6/lib/libXvMCNVIDIA.so
still gave
Checking for XvMC ... no

Ironically, this command and the command without the "--with-xvmclib=/usr/X11R6/lib/libXvMCNVIDIA.so" gave this toward the end of the configuration:
Video output: xvidix winvidix cvidix bl zr zr2 dxr3 dxr2 directx sdl vesa gif89a fbdev svga caca aa ggi xmga mga dga xvmc directfb tdfx_vid tdfxfb 3dfx quartz

If I did "./configure --enable-gui --enable-menu --enable-dvb" I still got the same video output -- yes, including xvmc.

Also, I noticed that the ./configure --help
gave
--with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
an option that did not specify a path.
An attempted configuration with --with-xvmclib=libXvMCNVIDIA
also failed to find xvmc as above.


As for xine,
I had tried
./configure CC=/usr/bin/gcc-3.4 --with-xv-path=/usr/X11R6/lib/ --with-xvmc-path=/usr/X11R6/lib/
still gave "Xv (XVideo *static*)" but not XvMC!
similarly,
./configure CC=/usr/bin/gcc-3.4 --with-xv-path=/usr/X11R6/lib/ --with-xvmc-path=/usr/X11R6/lib/libXvMCNVIDIA.so.1
gave the same result.

##############################################
The only good news that I have to share from this struggle is that
apt-get install tvtime
gave me an immediately functioning and easy to use analog tv viewer.
I was pleasantly surprized that analog would be a cinch.

But shouldn't I be able to have at least acceptable hdtv performance?
Only if I do
gmplayer -nosound dvb://25
for example,
do I get a pixelated picture that will play for more than 10sec.
Streaming to a file, too, ends up in a corrupted picture after playing, pixelated, for about 10sec or so.

Any suggestions as to where I can look to ameliorate these video and audio problems with hdtv?
View user's profile Send private message
PostPosted: Thu May 18, 2006 1:41 pm Reply with quote
xyzzy
 
Joined: 12 Feb 2006
Posts: 225




appleton wrote:
Scott,
thanks very much for the suggestion. Unfortunately, it did not appear to help.
The command
./configure --enable-gui --enable-menu --enable-dvb --enable-xvmc --with-xvmclib=/usr/X11R6/lib/libXvMCNVIDIA.so
still gave
Checking for XvMC ... no

For mplayer, you should use "--enable-xvmc --with-xvmclib=XvMCNVIDIA" to turn on XvMC. The default for xvmclib is XvMCNVIDIA so you don't actually have to set that. You do need to enable it with --enable-xvmc. Make sure that either /usr/X11R6/lib/libXvMCNVIDIA.a or /usr/X11R6/lib/libXvMCNVIDIA.so exists.
View user's profile Send private message
PostPosted: Fri May 19, 2006 10:10 am Reply with quote
appleton
 
Joined: 06 May 2006
Posts: 14




Alas, I had tried that last option, "--enable-xvmc --with-xvmclib=XvMCNVIDIA"
to no avail.

I should say that I do have these files:
/usr/X11R6/lib/libXvMCNVIDIA_dynamic.so.1
/usr/X11R6/lib/libXvMCNVIDIA.so.1
/usr/X11R6/lib/libXvMCNVIDIA.so.1.0.7174
/usr/X11R6/lib/libXvMC.so.1
/usr/X11R6/lib/libXvMC.so.1.0
where the three of them are links to two real files:
/usr/X11R6/lib/libXvMCNVIDIA.so.1.0.7174
/usr/X11R6/lib/libXvMC.so.1.0

I made these symlinks:
ln -s /usr/X11R6/lib/libXvMCNVIDIA.so.1 /usr/X11R6/lib/libXvMCNVIDIA.so
ln -s /usr/X11R6/lib/libXvMCNVIDIA.so.1 /usr/X11R6/lib/libXvMCNVIDIA.a
ln -s /usr/X11R6/lib/libXvMC.so.1.0 /usr/X11R6/lib/libXvMC.so
But the symlinks had no effect on configuring:
Checking for XvMC ... no

By the way, is it the lack of xvmc that is causing the hdtv picture and sound to almost immediately break up and then freeze up? Or could there be another cause?
View user's profile Send private message
PostPosted: Fri May 19, 2006 1:34 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




You might want to try the Nvidia XvMC library that comes with their driver instead. I've never seen anyone need to get it through apt-get when they have Nvidia's driver installed.
View user's profile Send private message
PostPosted: Sun May 21, 2006 11:31 pm Reply with quote
xyzzy
 
Joined: 12 Feb 2006
Posts: 225




That doesn't seem to be the same thing I have:
/usr/X11R6/lib/libXvMC.so.1
/usr/X11R6/lib/libXvMC.so.1.0
/usr/X11R6/lib/libXvMCW.so.1
/usr/X11R6/lib/libXvMCW.so.1.0
/usr/X11R6/lib/libXvMC.a
/usr/X11R6/lib/libXvMC.so
/usr/X11R6/lib/libXvMCW.a
/usr/X11R6/lib/libXvMCW.so
/usr/X11R6/lib/libXvMCNVIDIA.a
/usr/X11R6/lib/libXvMCNVIDIA.so.1.0.7676
/usr/X11R6/lib/libXvMCNVIDIA_dynamic.so.1

The last three were from the nvidia driver package, all the others were part of xorg.

After you run mplayer's configure progam, look at the file configure.log. Find the XvMC section, it will tell you what program it tried to compile and with what options, and what errors there were.
View user's profile Send private message
PostPosted: Tue May 23, 2006 3:54 pm Reply with quote
appleton
 
Joined: 06 May 2006
Posts: 14




Thanks for the comparison.
I am now making progress!

One missing file made a significant difference.
Also, changing nvidia drivers made a very big difference.

1) work on my original installation
I had already done this
apt-get install libxvmc1
which gave
/usr/X11R6/lib/libXvMC.so.1.0
/usr/X11R6/lib/libI810XvMC.so.1.0
and symlinks
/usr/X11R6/lib/libXvMC.so.1
/usr/X11R6/lib/libI810XvMC.so.1

After your comment, I did
apt-get install libxvmc-dev
which gave
/usr/X11R6/lib/libI810XvMC.a
/usr/X11R6/lib/libXvMC.a
and symlinks (to previous .so.1 from above)
/usr/X11R6/lib/libI810XvMC.so
/usr/X11R6/lib/libXvMC.so

Strangely, the glx and the glx-dev packages (from debian) for the nvidia driver both lacked libXvMCNVIDIA.a,
so I simply extracted it from the original package and copied it, thus.
sh NVIDIA-Linux-x86_64-1.0-7174-pkg0.run -x
cd NVIDIA-Linux-x86_64-1.0-7174-pkg0/usr/X11R6/lib
cp -a libXvMCNVIDIA.a /usr/X11R6/lib/

So, now my /usr/X11r6/lib/ was similar to yours
and I was able to compile mplayer with xvmc!

Despite running mplayer -vo xvmc -vf ffmepg12 dvb://a
(where a is the name of a channel in ~/.mplayer/channels.conf)
all channels were pixelated during motion. I did get playback for, oh,
30 seconds or so before the picture crashed. Sound sometimes, but not always, lagged behind the picture. Also,
gmplayer -vf ivtc -autosync 30 dvb://a
and
gmplayer -vf kerndeint -autosync 30 dvb://a
both gave poor performance.


2) work on a fresh installation
I reinstalled the entire system, this time using
NVIDIA-Linux-x86_64-1.0-8756-pkg2.run
I could no longer compile xvmc into mplayer -- compiling failed.
Playback without xvmc is dreadful and dies after 15sec, tops, with tons of errors.

Continuing on the newly installed box (with 8756), I find that xine compiles with both XvMC and XvMCNVIDIA. (Presumably, with both of the ".a" files in place, I could have compiled xine with both on the original 7174 installation.) Nonetheless, when I run xine and click on the "DTV" button (yes, channels.conf is under ~.xine/), xine tells me
xine: found demuxer plugin: Elementary mpeg stream demux plugin
xine: found input plugin: file input plugin
xine: cannot find input plugin for MRL [dvb://]
xine: input plugin cannot open MRL [dvb://]
input_dtv: file not found >dtv://<
xine: found input plugin : dtv input plugin
xine: found demuxer plugin: Elementary mpeg stream demux plugin
xine: found input plugin: file input plugin

These errors were the same as when I compiled xine without XvMC and XvMCNVIDIA. I get similar errors when I try to do
xine dvb://a
where a is a channel in ~.xine/channels.conf


3) Progress (with new installation)
gmplayer -vf ivtc -autosync 30 dvb://a
failed, but
gmplayer -vf kerndeint -autosync 30 dvb://a
gave a splendid picture with NO errors.
My cpu (Sempron2600 amd64) was constantly hitting loads of 89% or so, and the picture was a bit jerky. So, I had two possible issues to consider:
i) possibly 7174 is a less than optimum nvidia driver for hdtv
ii) possibly I could gain some benefits from a faster CPU.

I will do a few more fresh installations to study the driver issue.
Upgrading to 8756 appears to have made a major difference, but I want to be absolutely certain.



But, I could still use some help.
Are there any other tricks or options for optimizing mplayer?
What is the trick to having xine show dtv?
(Also, less important, can xine run without a gui? Can xine play a playlist?)
View user's profile Send private message
Howto tune channels; WARNING TO POTENTIAL USERS
  pcHDTV Forum Index -> General pcHDTV topics
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 vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  This topic is locked: you cannot edit posts or make replies.  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin