From owner-freebsd-multimedia@FreeBSD.ORG Mon Mar 29 22:30:58 2004 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 252E816A4CE for ; Mon, 29 Mar 2004 22:30:58 -0800 (PST) Received: from mpls-qmqp-03.inet.qwest.net (mpls-qmqp-03.inet.qwest.net [63.231.195.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 7C1D643D54 for ; Mon, 29 Mar 2004 22:30:57 -0800 (PST) (envelope-from pmckenna@csom.umn.edu) Received: (qmail 66586 invoked by uid 0); 30 Mar 2004 06:07:16 -0000 Received: from mpls-pop-07.inet.qwest.net (63.231.195.7) by mpls-qmqp-03.inet.qwest.net with QMQP; 30 Mar 2004 06:07:16 -0000 Received: from 63-231-169-227.mpls.qwest.net (HELO ?10.0.0.22?) (63.231.169.227) by mpls-pop-07.inet.qwest.net with SMTP; 30 Mar 2004 06:30:56 -0000 Date: Tue, 30 Mar 2004 00:31:28 -0600 Message-Id: From: "pete" To: multimedia@FreeBSD.ORG Mime-Version: 1.0 (Apple Message framework v613) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed X-Mailer: Apple Mail (2.613) Subject: ffmpeg and sound from bktr X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 06:30:58 -0000 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 AMD Features=0xc0440000 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: on motherboard apm0: found APM BIOS v1.2, connected at v1.2 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at 0.0 irq 10 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: 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: port 0xc400-0xc41f irq 5 at device 7.2 on pci0 usb0: 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: port 0xc800-0xc81f irq 5 at device 7.3 on pci0 usb1: 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: (vendor=0x1106, dev=0x3057) at 7.4 pcm0: port 0xcc00-0xcc3f irq 5 at device 8.0 on pci0 pcm0: bktr0: mem 0xea005000-0xea005fff irq 5 at device 11.0 on pci0 iicbb0: on bti2c0 iicbus0: on iicbb0 master-only iicbus1: on iicbb0 master-only smbus0: on bti2c0 smb0: 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: (vendor=0x109e, dev=0x0878) at 11.1 irq 5 de0: 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