From owner-freebsd-multimedia@FreeBSD.ORG Thu May 15 10:09:54 2003 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 6F3EA37B404 for ; Thu, 15 May 2003 10:09:54 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32FA543F93 for ; Thu, 15 May 2003 10:09:52 -0700 (PDT) (envelope-from tamaru@myn.rcast.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id B754C2181B4 for ; Fri, 16 May 2003 02:09:49 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) h4FH9mDQ019634; Fri, 16 May 2003 02:09:48 +0900 Received: from gin.myn.rcast.u-tokyo.ac.jp (cognac.myn.rcast.u-tokyo.ac.jp [157.82.66.106])2.9.3.2) with ESMTP id AIR19947; Fri, 16 May 2003 02:09:48 +0900 (JST) Date: Fri, 16 May 2003 02:11:09 +0900 Message-ID: From: Hiroharu Tamaru To: "Pete" In-Reply-To: References: <20030514192351.67241aa8.steve@sohara.org> User-Agent: User-Agent: Wanderlust/2.10.0 (Venus) Emacs/21.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII cc: multimedia@freebsd.org Subject: Re: ffmpeg w/bktr no sound 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: Thu, 15 May 2003 17:09:54 -0000 Hi. At Wed, 14 May 2003 12:38:01 -0500, Pete wrote: > On Wednesday, May 14, 2003, at 12:23 PM, Steve O'Hara-Smith wrote: > > > On Wed, 14 May 2003 11:08:45 -0500 > > Pete McKenna wrote: > > > > PM> I'm still working on getting ffmpeg encoding to work and the video > > PM> is fine but I get no audio. I have mucked with the mixer settings > > and > > PM> such to no avail. > > > > What does mixer recsrc say ? > > Recording source: line > > > > > PM> I use fxtv to set the channel, for now and when I turn off > > PM> line in the mixer the fxtv audio dies. It is plugged into > > > > So you can hear it with ffmpeg running ? > > no I hear nothing while recording, should I hear the > tv audio while using ffmpeg ? I hear a whump sound > like an amp being turned on when it starts. > > > > > PM> the sound cards line in. Based on this I set mixer recsrc > > PM> to line, but still nothing. It's broadcast NTSC signal. > > > > Using mixer =rec line ? > > Yes > > > > > PM> Mixer phin is currently set to 0:0 and what does 'mixer rec' say? This is what I run as my at(1) job: ====== begin: vcr-now ====== #!/bin/sh CHANNEL="$1" LENGTH="$2" NOW=`date +"%Y%m%d-%H%M"` if [ -z $LENGTH ]; then echo "Usage: vcr-now CHANNEL LENGTH(hh:mm:ss)" exit fi echo recording CH${CHANNEL} for ${LENGTH} ulimit -c 0 bsdbktr_tvtune $CHANNEL ORGMIX=`mixer -s` ORGSRC=`mixer recsrc 2>&1 | sed 's/^.*: //'` mixer =rec line mixer rec 80 # 29.97 14.985 9.99 7.4975 ffmpeg -y -me zero -intra -r 9.99 -s 640x480 -t $LENGTH -b 4800 -ab 128 -ac 2 -deinterlace -croptop 2 vcr-"$NOW".mpg 2> /dev/null mixer =rec ${ORGSRC} > /dev/null 2>&1 mixer ${ORGMIX} > /dev/null 2>&1 # ====== end: vcr-now ====== My bsdbktr_tvtune.c is a modified version that take channel number, not freq. FWIW. ====== begin: bsdbktr_tvtune.c ====== #include #include #include #include /* * - just tunes in a frequency - only opens the tuner */ main(int argc, char **argv) { unsigned long freq; unsigned int chnl, type; int tuner_fd = open("/dev/tuner0", O_RDWR); if (tuner_fd < 0) { perror("/dev/tuner0"); exit(1); } if (argc < 1) { printf ("Usage:\ntv_tune \n\n"); exit(1); } /* Command line parameter is a frequency */ type = CHNLSET_JPNBCST; if (ioctl(tuner_fd, TVTUNER_SETTYPE, &type) < 0) perror("Tuning (TVTUNER_SETTYPE) failed"); chnl = atoi(argv[1]); if (ioctl(tuner_fd, TVTUNER_SETCHNL, &chnl) < 0) perror("Tuning (TVTUNER_SETCHNL) failed"); } ====== end: bsdbktr_tvtune.c ======