Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 00:31:28 -0600
From:      "pete" <pmckenna@csom.umn.edu>
To:        multimedia@FreeBSD.ORG
Subject:   ffmpeg and sound from bktr
Message-ID:  <E07F4E56-8213-11D8-A8F9-000A9597EBA2@csom.umn.edu>

next in thread | raw e-mail | index | archive | help
I have had ffmpeg capturing from my bktr card for a few
months. When I upgraded from 4.8  - 4.9 my sound broke.
I have rebuilt lame and ffmpeg, but the old record script
no longer works. I was using the line in of my sound card.
I'd like to use the direct sound from the bktr, but would be
happy to just get things working again for now.

Video is fine. Sound works in other apps including Fxtv.

Thanks

Pete

Capture script

#!/bin/sh

CHANNEL="$1"
LENGTH="$2"
NAME="$3"
# NOW=`date +"%Y%m%d-%H%M"`
NOW=`date +"%m_%d"`
   FILE=/usr/mcmac/"$NOW""-$NAME".avi
#  FILE=/usr/mcmac/"$NOW""-$NAME".mpg
if [ -z $LENGTH ]; then
   echo "Usage: vcr-now CHANNEL LENGTH(hh:mm:ss)"
   exit
fi
echo recording CH${CHANNEL} for ${LENGTH}
ulimit -c 0
/usr/local/bin/bsdbktr_tvtune_ch $CHANNEL
ORGMIX=`mixer -s`
ORGSRC=`mixer recsrc 2>&1 | sed 's/^.*: //'`
ORGVOL=`mixer -s vol  2>&1 | sed 's/^.*: //'`
mixer =rec line
mixer rec 80
mixer vol 0
echo file ${FILE}
echo vol ${ORGVOL}
# This guy works with Quicktime on the Mac so I can trim them. The -g  
does it I think
/usr/local/bin/ffmpeg -f avi -y -vcodec mpeg4 -acodec mp3 -ab 64 -b  
3200 -g 300 -cropleft 4 -bf 2 -r 29.97 -s 352x240 -t $LENGTH "$FILE"
mixer =rec ${ORGSRC} > /dev/null 2>&1
mixer ${ORGMIX} > /dev/null 2>&1
mixer ${ORGVOL} > /dev/null 2>&1

DMESG

Copyright (c) 1992-2003 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 4.9-STABLE #0: Fri Mar 12 23:38:23 CST 2004
     root@blotto:/usr/src/sys/compile/BLOTTO
Timecounter "i8254"  frequency 1193182 Hz
CPU: AMD Athlon(tm) processor (850.04-MHz 686-class CPU)
   Origin = "AuthenticAMD"  Id = 0x642  Stepping = 2
    
Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,C 
MOV,PAT,PSE36,MMX,FXSR>
   AMD Features=0xc0440000<RSVD,AMIE,DSP,3DNow!>
real memory  = 268369920 (262080K bytes)
avail memory = 256569344 (250556K bytes)
Preloaded elf kernel "kernel" at 0xc04a3000.
netsmb_dev: loaded
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 9 entries at 0xc00fdee0
apm0: <APM BIOS> on motherboard
apm0: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <VIA 8363 (Apollo KT133) PCI-PCI (AGP) bridge> at device 1.0 on  
pci0
pci1: <PCI bus> on pcib1
pci1: <Matrox MGA G400 AGP graphics accelerator> at 0.0 irq 10
isab0: <VIA 82C686 PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686 ATA100 controller> port 0xc000-0xc00f at device  
7.1 on pci0
atapci0: Correcting VIA config for southbridge data corruption bug
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xc400-0xc41f irq 5 at device  
7.2 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 0xc800-0xc81f irq 5 at device  
7.3 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
pci0: <unknown card> (vendor=0x1106, dev=0x3057) at 7.4
pcm0: <Creative CT5880-C> port 0xcc00-0xcc3f irq 5 at device 8.0 on pci0
pcm0: <SigmaTel STAC9721/23 AC97 Codec>
bktr0: <BrookTree 878> mem 0xea005000-0xea005fff irq 5 at device 11.0  
on pci0
iicbb0: <I2C bit-banging driver> on bti2c0
iicbus0: <Philips I2C bus> on iicbb0 master-only
iicbus1: <Philips I2C bus> on iicbb0 master-only
smbus0: <System Management Bus> on bti2c0
smb0: <SMBus general purpose I/O> on smbus0
bktr0: Hauppauge Model 61381 D123
bktr0: Detected a MSP3430G-A1 at 0x80
bktr0: Hauppauge WinCast/TV, Philips FR1236 NTSC FM tuner, msp3400c  
stereo, remote control.
pci0: <unknown card> (vendor=0x109e, dev=0x0878) at 11.1 irq 5
de0: <Digital 21140A Fast Ethernet> port 0xd000-0xd07f mem  
0xea004000-0xea00407f irq 11 at device 13.0 on pci0

Kernel

device          isa
device          pci

device          pcm0 at isa? irq 10 drq 1 flags 0x0
device          bktr

device          smbus
device          iicbus
device          iicbb
device           smb

/dev/dsp*

lrwxrwxrwx  1 root  wheel         4 Mar 23 23:26 /dev/dsp -> dsp0
lrwxrwxrwx  1 root  wheel         6 Mar 23 23:26 /dev/dsp0 -> dsp0.0
crw-rw-rw-  1 root  wheel   30,   3 Mar 23 23:26 /dev/dsp0.0
crw-rw-rw-  1 root  wheel   30, 0x00010003 Mar 23 23:26 /dev/dsp0.1
crw-rw-rw-  1 root  wheel   30, 0x00020003 Mar 23 23:26 /dev/dsp0.2
crw-rw-rw-  1 root  wheel   30, 0x00030003 Mar 23 23:26 /dev/dsp0.3
lrwxrwxrwx  1 root  wheel         5 Mar 23 23:26 /dev/dspW -> dspW0
lrwxrwxrwx  1 root  wheel         7 Mar 23 23:26 /dev/dspW0 -> dspW0.0
crw-rw-rw-  1 root  wheel   30,   5 Mar 23 23:26 /dev/dspW0.0
crw-rw-rw-  1 root  wheel   30, 0x00010005 Mar 23 23:26 /dev/dspW0.1
crw-rw-rw-  1 root  wheel   30, 0x00020005 Mar 23 23:26 /dev/dspW0.2
crw-rw-rw-  1 root  wheel   30, 0x00030005 Mar 23 23:26 /dev/dspW0.3

FFMpeg says:

blotto pete: ~ >mixer =rec line
Recording source: line
blotto pete: ~ >mixer rec 80
Setting the mixer rec to 80:80.
blotto pete: ~ >
blotto pete: ~ >
blotto pete: ~ >/usr/local/bin/ffmpeg -f avi -y -vcodec mpeg4 -acodec  
mp3 -ab 64 -b 3200 -g 300 -cropleft 4 -bf 2 -r 29.97 -s 352x240 -t  
00:00:10 ~mcmac/test.avi
Input #0, video4linux, from '':
   Duration: N/A, bitrate: N/A
   Stream #0.0: Video: rawvideo, yuv422, 352x240, 29.97 fps
Input #1, audio_device, from '':
   Duration: N/A, bitrate: N/A
   Stream #1.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
Output #0, avi, to '/usr/mcmac/test.avi':
   Stream #0.0: Video: mpeg4, 352x240, 29.97 fps, q=2-31, 3200 kb/s
   Stream #0.1: Audio: mp3, 44100 Hz, mono, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #1.0 -> #0.1
Press [q] to stop encoding
frame=  300 q=6.0 size=    3893kB time=10.0 bitrate=3187.5kbits/s
ffmpeg in free(): warning: page is already free




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E07F4E56-8213-11D8-A8F9-000A9597EBA2>