Telstar

Forum o satelitski, kabelski, zemeljski in IP TV
Danes je So Apr 20, 2024 15:23

Vsi časi so UTC+02:00 Evropa/Ljubljana




Napiši novo temo  Odgovori na temo  [ 1 prispevek ] 
Avtor Sporočilo
 Naslov prispevka: kartica PCHDTV HD-3000 V4L
OdgovorObjavljeno: Po Maj 23, 2005 22:11 
Srecnez, kdor je lastnik kartice PCHDTV HD-3000 V4L

http://pchdtv.com/hd_3000.html

obvezno beri howto, kako jo lahko uporabis na Linuxu, na Gentoo.

Citiram:

Here's how I got my pcHDTV HD-3000 card going without xine-hd.

I'm using:
AMD64(3200)/Gentoo 2004.3
gentoo-dev-sources-2.6.11-r3
mplayer-1.0_pre6-r2
Video For Linux enabled in kernel


I assume you are logged in as root to install the drivers and tools.

Get the drivers and tools from www.pchdtv.com.
Code:
mkdir ~/pcHDTV
cd ~/pcHDTV

wget http://pchdtv.com/downloads/pcHDTV-2.0.tar.gz
wget http://pchdtv.com/downloads/tools-2.6-a.tar.gz

tar xvzf pcHDTV-2.0.tar.gz
tar xvzf tools-2.6-a.tar.gz

Make,install the video4linux drivers and tools.
Code:
cd ~/pcHDTV/pcHDTV-2.0
## With udev.
make && make install && make udev
# udev permissions file ends up in the wrong directory
mv /etc/udev/rules.d/10-pchdtv.permissions /etc/udev/permissions.d/

## Without udev.
make && make install

cd ~/pcHDTV/tools-2.6-a
# Before running make install you must edit the config file to remove the '-C' from the install line:
# install -C -mode=u=rwx,go=rx $(PROGS)$(PREFIX)/bin to have the following instead:
# install -mode=u=rwx,go=rx $(PROGS)$(PREFIX)/bin
make clean && make

Please note if you leave out this next step the dvb driver will load first if you use kernel auto module loading. That being said I have done this and have lost access to my NTSC tuner/Composite/S-Video inputs. If I boot into the dvb driver and remove cx88-dvb and and insert cx88-atsc by hand all seems well. Maybe it's just me?
Add to /etc/modules.autoload/kernel-2.6
Code:
cx88-atsc

Reboot or try modprobe cx88-atsc.

Verify the drivers are loaded:
Code:
dmesg
...
Linux video capture interface: v1.00
pcHDTV HD3000 driver version 2.0.0 loaded
cx88[0]: subsystem: 7063:3000, board: pcHDTV HD3000 HDTV [card=22,autodetected]
ACPI: PCI interrupt 0000:00:06.2[A] -> GSI 17 (level, low) -> IRQ 201
cx88[0]/2: found at 0000:00:06.2, rev: 5, irq: 201, latency: 64, mmio: 0xcf000000
cx88[0]/2 FW version: 113-4-194-3
cx88[0]/2: registered device video0 [atsc]
cx88[0]/0: found at 0000:00:06.0, rev: 5, irq: 201, latency: 64, mmio: 0xce000000
tuner 0-0061: chip found @ 0xc2 (cx88[0])
tuner 0-0061: type set to 52 (Thomson DDT 7610 (ATSC/NTSC))
cx88[0]/0: registered device video1 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
cx2388x dvb driver version 0.0.4 loaded
cx88[0]/2: atsc_open - device data
cx88[0]/2: device minor 0
cx88[0]/2: tuner_type 52

If the dmesg reports: 'DVB: registering frontend 0 (pcHDTV HD3000 HDTV)' then you have the dvb driver installed. You must remove it before installing the v4l driver.
Code:
modprobe -r cx88-dvb
modprobe cx88-atsc

Verify the entries your dev directory.
Code:
ls /dev/dvb*
/dev/dvb0.demux0 /dev/dvb0.dvr0 /dev/dvb0.frontend0
/dev/dvb0.net0

ls /dev/v4l/
radio0 vbi0 video video0 video1

ls /dev/dtv
/dev/dtv

Warning, if video1 or /dev/dtv is missing then cx88-atsc is not
installed or isn't working properly.

This is optional, if you want to use xine-hd. Otherwise you may use
it as a list of available HD channels.
Code:
dtvscan /dev/dtv > ~/.xine/channels.atsc


If dtvscan fails and you know what HD channels are available in
your area you can check the signal. Replace # is the channel number.
Code:
dtvsignal /dev/dtv #


Watch some HD TV! Replace # with a channel number.
Code:
getatsc /dev/dtv #|mplayer -vo xv -framedrop -vf pp=lb -autoq 6
-tsprog 0 -noconsolecontrols /dev/stdin


I not able to test this but -tsprog 0 is supposed to set the subchannel
your are requesting. Here's an example for channel 42.3.
Code:
getatsc /dev/dtv 42|mplayer -vo xv -framedrop -vf pp=lb -autoq 6
-tsprog 3 -noconsolecontrols /dev/stdin


If you want to get rid of the squiggly lines at the top or bottom try cropdetect. It will report a suggested crop value.
Code:
getatsc /dev/dtv 42|mplayer -vo xv -framedrop -vf pp=lb,cropdetect -autoq 6 -tsprog 3 -noconsolecontrols /dev/stdin
# then set it
getatsc /dev/dtv 42|mplayer -vo xv -framedrop -vf pp=lb,crop=1904:1056:8:16 -autoq 6 -tsprog 3 -noconsolecontrols /dev/stdin


And if you want to watch plain old TV. You'll want to adjust your video settings here, the driver doesn't set optimal viewing settings. See the mencoder settings below for some decent values.
Code:
tvtime
# or
xawtv


I have not done any HD recordings, but here's the syntax. Replace # with a channel number.
Code:
getatsc /dev/dtv # > myrecording.ts


If all goes well you should be on your way to viewing HD TV! Now let's try to make our composite in/tv tuner work to capture some home movies.

Here are some things I discovered when trying to grab video from the non-HD side of the card.

1. The video4linux driver only supports YUY2 output, greatly slowing things down. Also it prevented me from using transcode. Luckily with mencoder and the right codecs/options you can make this happen.
2. You must use the enclosed audio loopback cable.
3. Mencoder won't unmute the video4linux driver you may need to
run 'v4lctl volume mute off'. Tvtime doesn't have a problem with this
so it may be an mplayer issue.
4. Your capture device must be set correctly. You can use this to test sound capturing.
Code:
#test loopback cable, must have sox installed
v4lctl volume mute off
rec -c 2 -d /dev/dsp -f s -r 44100 -s w -t wav outfile.wav
mplayer outfile.wav

5. And here are some mplayer settings you might need to be familiar with.
amode=0 (0=mono, 1=stereo)
input=0 (0=tuner, 1=composite, 2=svideo)



This is what I used to pull some good quality video off the pcHDTV card. My 80 minute clip took a little over 4.5 gigs.
Code:
mencoder -tv driver=v4l2:normid=0:amode=0:input=1:brightness=70:contrast=25
hue=99:saturation=55:outfmt=yuy2:width=640:height=480:device=
/dev/video0:adevice=/dev/dsp:audiorate=44100:forceaudio:forcechan
=2:volume=95 -ovc lavc -lavcopts vcodec=mjpeg:vhq -vf pp=lb/hb/vb/dr,hqdn3d -oac mp3lame -o output.avi tv://


Some more mplayer examples:
Code:
# view channel 2
mplayer -tv driver=v4l2:norm=ntsc:channels=2-tv1:chanlist=us-bcast:input=0:
adevice=/dev/dsp:width=640:height=480:device=/dev/video0:
brightness=60:contrast=25:hue=99:saturation=55:outfmt=yuy2
-vf pp=lb tv://

# view channel 5
mplayer -tv driver=v4l2:norm=ntsc:channels=5-tv1:chanlist=us-bcast:input=0:
adevice=/dev/dsp:width=640:height=480:device=/dev/video0:
brightness=60:contrast=25:hue=99:saturation=55:outfmt=yuy2
-vf pp=lb tv://

# view composite input
mplayer -tv driver=v4l2:input=1:adevice=/dev/dsp:width=640:height=480:
device=/dev/video0:brightness=60:contrast=25:hue=99:
saturation=55:outfmt=yuy2 -vf pp=lb tv://

# view svideo input
mplayer -tv driver=v4l2:input=2:adevice=/dev/dsp:width=640:height=480:
device=/dev/video0:brightness=60:contrast=25:hue=99:
saturation=55:outfmt=yuy2 -vf pp=lb tv://


Some more mencoder examples:
Code:
# record channel 2
mencoder -tv driver=v4l2:norm=ntsc:normid=0:amode=1:
channel=2-tv1:
chanlist=us-bcast:input=0:brightness=70:contrast=25:hue=99:
saturation=55:outfmt=yuy2:width=640:height=480:device=
dev/video0:adevice=/dev/dsp:audiorate=44100:forceaudio:
forcechan=2:volume=95 -ovc lavc -lavcopts vcodec=mjpeg:vhq -vf pp=lb/hb/vb/dr,hqdn3d -oac mp3lame -o output.avi tv://2

# record channel 5
mencoder -tv driver=v4l2:norm=ntsc:normid=0:amode=1:
channel=5-tv1:
chanlist=us-bcast:input=0:brightness=70:contrast=25:hue=99:
saturation=55:outfmt=yuy2:width=640:height=480:device=
/dev/video0:adevice=/dev/dsp:audiorate=44100:forceaudio:
forcechan=2:volume=95 -ovc lavc -lavcopts vcodec=mjpeg:vhq -vf pp=lb/hb/vb/dr,hqdn3d -oac mp3lame -o output.avi tv://5

# record composite input
mencoder -tv driver=v4l2:normid=0:amode=0:input=1:brightness=70:contrast=25:
hue=99:saturation=55:outfmt=yuy2:width=640:height=480:
device=/dev/video0:adevice=/dev/dsp:audiorate=44100:forceaudio:
forcechan=2:volume=95 -ovc lavc -lavcopts vcodec=mjpeg:vhq -vf pp=lb/hb/vb/dr,hqdn3d -oac mp3lame -o output.avi tv://

# record svideo input
mencoder -tv driver=v4l2:normid=0:amode=0:input=2:brightness=70:contrast=25:
hue=99:saturation=55:outfmt=yuy2:width=640:height=480:
device=/dev/video0:adevice=/dev/dsp:audiorate=44100:forceaudio:
forcechan=2:volume=95 -ovc lavc -lavcopts vcodec=mjpeg:vhq -vf pp=lb/hb/vb/dr,hqdn3d -oac mp3lame -o output.avi tv://

Also, I should probably note when viewing a 1920 x 1080 HD stream it uses around 65-75% of my cpu.


Na vrh
   
Prikaži prispevke prejšnjih:  Razvrsti po  
Napiši novo temo  Odgovori na temo  [ 1 prispevek ] 

Vsi časi so UTC+02:00 Evropa/Ljubljana


Kdo je na strani

Po forumu brska: 0 registriranih uporabnikov in 6 gostov


Ne morete pisati prispevkov v temi
Ne morete odgovarjati na teme v forumu
Ne morete urejati prispevkov v temi
Ne morete brisati vaših prispevkov forumu
Ne morete dodati priponk prispevkom

Pojdi na:  
cron
Teče na phpBB® Forum Software © phpBB Limited