Date: Sat, 6 Mar 1999 11:58:38 -0500 (EST) From: Bernie Doehner <bad@uhf.wireless.net> To: multimedia@freebsd.org Subject: Trouble with mpegaudio/musicin (Video capture works fine). Message-ID: <Pine.BSF.4.05.9903061148040.15644-100000@uhf.wireless.net>
next in thread | raw e-mail | index | archive | help
Hello All: Program Versions: fxtv 0.48, mpeg_encode-1.5b mpegaudio-3.9 mpg123-0.59o sox-12.12 Hardware (not that it matters), is a OPTI931 audio card, Millenium II PCI video card. When trying to record video with the following parameters: TARGET: MPEG IMAGE CAPTURE: FORMAT: RGB SPEED: 30 fps IMAGE ENCODE: PPM AUDIO CAPTURE: (ENABLE) 16-bit Signed (LSB) Stereo 44,100 samp/s AUDIO ENCODE: FORMAT: MPEG-2 the conversion script fails with: ======FRAMES READ: 47 ::STATUS:: 0 ::EXEC:: rm /usr/tmp/test.param ::STATUS:: 0 ::EXEC:: sox -t raw -s -w -c 2 -r 44100 /usr/tmp/test.AUDraw -t aiff /usr/tmp/test.aiff && mpeg_musicin -l 2 -p 1 /usr/tmp/test.aiff /usr/tmp/test.mp2 && rm /usr/tmp/test.aiff >>> Using Audio IFF sound file headers SmpFrqIndex: 0 is not a legal sample rate in "/usr/tmp/test.aiff". ::STATUS:: 1 Command Failed: sox -t raw -s -w -c 2 -r 44100 /usr/tmp/test.AUDraw -t aiff /usr/tmp/test.aiff && mpeg_musicin -l 2 -p 1 /usr/tmp/test.aiff /usr/tmp/test.mp2 && rm /usr/tmp/test.aiff Conversion Aborted. In looking at common.c in mpegaudio ports build directory I see function: int SmpFrqIndex(sRate) /* convert samp frq in Hz to index */ long sRate; /* legal rates 32000, 44100, 48000 */ { if(sRate == 44100L) return(0); else if(sRate == 48000L) return(1); else if(sRate == 32000L) return(2); else { fprintf(stderr, "SmpFrqIndex: %ld is not a legal sample rate\n", sRate); return(-1); /* Error! */ } } And at musicin.c at line 195 we have: info->sampling_frequency = SmpFrqIndex((long)pcm_aiff_data.sampleRate); printf(">>> %.f Hz sampling frequency selected\n", pcm_aiff_data.sampleRate); This is where I think I am failing.. Question: Why on earth would pcm_aiff_data.sampleRate be 0, and not 41100L? Is there something wrong with my versions of the different components, before I start digging deeper into the code? Thanks. Bernie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9903061148040.15644-100000>