Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2005 23:18:47 -0300
From:      Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
To:        FreeBSD-multimedia@FreeBSD.org
Subject:   Help with TV capture (mplayer/brooktree/audigy)
Message-ID:  <20050421021909.28497.qmail@exxodus.fedaykin.here>

next in thread | raw e-mail | index | archive | help

--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

	I am having a bit of trouble capturing/watching TV on my box.

$ uname -a
FreeBSD exxodus.fedaykin.here 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Apr  6 21:27:42 BRT 2005     root@exxodus.fedaykin.here:/usr/obj/usr/src/sys/LIOUX  i386

	For starters, neither fxtv nor xawtv work here. They both
hard lock my system, it just freezes once I start either application.
The system simply freezes. The power button does not work, I have
to hit reset.

	I contacted fxtv's developer who told me that 

"Ouch.  When this has happened in the past, it's typically been
because the motherboard and/or video card isn't well supported by
FreeBSD.  Fxtv uses the very old trick of pointing the TV board
output to the memory-mapped linear frame buffer of the video card
"in the application".  Back when it was written there wasn't any
other option.  Now we have Xv and other methods, which are much
better and cleaner for TV apps to use.  Fxtv was just never revised
to use these."

	So I turned to mplayer :) Here goes my setup. I have satellite
cable which means I cannot use the BrookTree's tunner since the tv
input is encoded. I connected the satellite decoder to the video
input connector.

	This is the mplayer line that is working:

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv://

	1) I was a getting enough image blurring to confuse codecs
if I decided to record programming so I added some noise filtering

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv:// -vf hqdn3d

or

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv:// -vf pp=hb/vb/dr/al

	2) Every few seconds the video stream seems to choke; thus,
giving me an effect similar to the famous interlaced "blinders
effect" so I added a deinterlacer filter

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv:// -vf filmdint

or

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv:// -vf pp=lb

	So the mixed lines were:

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv:// -vf hqdn3d,filmdint

or

$ mplayer -tv driver=bsdbt848:noaudio:width=640:height=480:input=0:norm=ntsc tv:// -vf pp=hb/vb/dr/al/lb

	However, I am getting poor performance. The video stream
seems to stutter. I would prefer not to loose a lot of resolution
but I would appreciate any help on how to maintain a good compromise
of performance vs quality. Only compromise enough quality to achieve
a smooth video stream (standard fps without chokes).

	Furthermore, I am not sure how can I get audio input. I can
listen to dvds, mp3s, ogms just fine though.

	I connected the audio output to the mic connector of the
audigy sound card. Nonetheless, I am not sure how can I hear this
audio. Yeah, I am a bit clueless. :) I am using the latest audigy
driver found at

http://chibis.persons.gfk.ru/audigy/

	I used the following commands

mixer rec 100           ## set record bus volume
emuctrl amp 4           ## amplify every input four times
emuctrl set out13 100   ## set recording volume for DSP output
emuctrl rset in6 100    ## set recording volume for DSP input
wavrec test.wav         ## record 10s using wavrec from ports/audio/wavplay port.

	However, I got nothing :(

$ cat /dev/emu10kx0
FreeBSD EMU10Kx Audio Driver

Hardware resource usage:
DSP General Purpose Registers: 154 used, 512 total
DSP Instruction Registers: 168 used, 1024 total
Card supports AC97 codec and 5.1 output, Audigy DSP code with Audigy2 hacks

Installed devices:
EMU10Kx Mixer Interface on emu10kx0
	          FX BUSes  Inputs    Outputs   
	Playback  1         8         18       
	Recording 1         8         0        
EMU10Kx PCM Interface on pcm0
	Analog mode, S/PDIF output is PCM stereo

$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <EMU10Kx PCM Interface> on emu10kx0 (16p/1r/4v channels duplex default)

	Help!!! :) Anyone?

	Regards,

--
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
feature, n: a documented bug | bug, n: an undocumented feature

--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dmesg.boot"

Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 5.4-STABLE #0: Wed Apr  6 21:27:42 BRT 2005
    root@exxodus.fedaykin.here:/usr/obj/usr/src/sys/LIOUX
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) XP 2600+ (1917.81-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0400000<AMIE,DSP,3DNow!>
real memory  = 2146697216 (2047 MB)
avail memory = 2095230976 (1998 MB)
ACPI APIC Table: <A M I  OEMAPIC >
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 <Version 0.3> irqs 0-23 on motherboard
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <A M I OEMRSDT> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA KT880 host to PCI bridge> mem 0xe0000000-0xefffffff at device 0.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
drm0: <Matrox G400/G450 (AGP)> mem 0xfe000000-0xfe7fffff,0xfeafc000-0xfeafffff,0xfa000000-0xfbffffff irq 16 at device 0.0 on pci1
info: [drm] AGP at 0xe0000000 256MB
info: [drm] Initialized mga 3.1.0 20021029 on minor 0
bktr0: <BrookTree 878> mem 0xfd9fe000-0xfd9fefff irq 19 at device 7.0 on pci0
smbus0: <System Management Bus> on bktr0
iicbb0: <I2C bit-banging driver> on bktr0
iicbus0: <Philips I2C bus> on iicbb0 master-only
iicsmb0: <SMBus over I2C bridge> on iicbus0
smbus1: <System Management Bus> on iicsmb0
bktr0: Hauppauge Model 44001 C110
bktr0: Hauppauge WinCast/TV.
pci0: <multimedia> at device 7.1 (no driver attached)
fxp0: <Intel 82550 Pro/100 Ethernet> port 0xb800-0xb83f mem 0xfebc0000-0xfebdffff,0xfebfe000-0xfebfefff irq 18 at device 8.0 on pci0
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:02:b3:2d:b2:de
emu10kx0: <Creative Audigy (Unknow model) [SB????]> port 0xbc00-0xbc3f irq 17 at device 10.0 on pci0
pcm0: <EMU10Kx PCM Interface> on emu10kx0
pcm0: <SigmaTel STAC9721/23 AC97 Codec>
pci0: <input device> at device 10.1 (no driver attached)
pci0: <serial bus, FireWire> at device 10.2 (no driver attached)
atapci0: <VIA 6420 SATA150 controller> port 0xc800-0xc80f,0xcc00-0xcc03,0xd000-0xd007,0xd400-0xd403,0xd800-0xd807 irq 20 at device 15.0 on pci0
ata2: channel #0 on atapci0
ata3: channel #1 on atapci0
atapci1: <VIA 8237 UDMA133 controller> port 0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 15.1 on pci0
ata0: channel #0 on atapci1
ata1: channel #1 on atapci1
uhci0: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 21 at device 16.0 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xe000-0xe01f irq 21 at device 16.1 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xe400-0xe41f irq 21 at device 16.2 on pci0
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <VIA 83C572 USB controller> port 0xe800-0xe81f irq 21 at device 16.3 on pci0
usb3: <VIA 83C572 USB controller> on uhci3
usb3: USB revision 1.0
uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
pci0: <serial bus, USB> at device 16.4 (no driver attached)
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model MouseMan+, device ID 0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
fdc0: <floppy drive controller (FDE)> port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc8800-0xc9fff,0xc0000-0xc87ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
fb0 at vga0
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
Timecounter "TSC" frequency 1917807946 Hz quality 800
Timecounters tick every 0.868 msec
IP Filter: v3.4.35 initialized.  Default = pass all, Logging = disabled
ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to accept, logging disabled
acd0: DVDR <HL-DT-ST DVDRAM GSA-4120B/A115> at ata0-master UDMA33
acd1: CDRW <HL-DT-ST GCE-8525B/1.02> at ata0-slave UDMA33
ad2: 152627MB <ST3160021A/3.06> [310101/16/63] at ata1-master UDMA100
cd0 at ata0 bus 0 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GSA-4120B A115> Removable CD-ROM SCSI-0 device 
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
cd1 at ata0 bus 0 target 1 lun 0
cd1: <HL-DT-ST CD-RW GCE-8525B 1.02> Removable CD-ROM SCSI-0 device 
cd1: 33.000MB/s transfers
cd1: Attempt to query device size failed: NOT READY, Medium not present - tray closed
Mounting root from ufs:/dev/ad2s4a

--UugvWAfsgieZRqgk--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050421021909.28497.qmail>