sound for cx88 analog capture

Dieter freebsd at sopwith.solgatos.com
Tue Dec 30 05:39:20 UTC 2008


I updated to the latest cx88 and am trying to get analog
working as described in "Capturing Raw Video" on the wiki.

I have the video working, but no audio.

Wiki says: "The ffmpeg command above uses the OSS-compatible cx88 audio
interface, and assumes that /dev/dsp1 is the OSS audio device that
corresponds to cx88audio0.

How do we determine if /dev/dsp1 corresponds to cx88audio0?

pcm0: <nVidia nForce4> port 0xf000-0xf0ff,0xec00-0xecff mem 0xfebfd000-0xfebfdfff irq 12 at device 4.0 on pci0
pcm0: [ITHREAD]
pcm0: <Avance Logic ALC655 AC97 Codec>
cx88audio0: <Conexant CX2388x Analog Audio> mem 0xfc000000-0xfcffffff irq 10 at device 7.1 on pci1
iicbus6: <Philips I2C bus> on cx88audio0
cx88audio0: [FILTER]
pcm1: <CX2388x PCM interface> on cx88audio0
cx88audio0: [FILTER+ITHREAD]

The /dev entries seem kinda screwy:

crw-rw-rw-  1 root  wheel    0, 202 Dec 29 13:10 /dev/dsp0.0
crw-rw-rw-  1 root  wheel    0, 207 Dec 29 13:10 /dev/dsp0.1
crw-rw-rw-  1 root  wheel    0, 203 Dec 29 13:10 /dev/dsp1.0
crw-rw-rw-  1 root  wheel    0, 209 Dec 29 13:10 /dev/dsp1
crw-rw-rw-  1 root  wheel    0, 210 Dec 29 13:10 /dev/dsp0

ls: /dev/pcm0: No such file or directory
ls: /dev/pcm1: No such file or directory

crw-rw-rw-  1 root  wheel    0, 205 Dec 29 13:10 /dev/cx88audio0

I changed the script to output dv format:

mkfifo /tmp/vpipe
/usr/local/bin/ffmpeg -v 2 \
    -f oss -ar 48000 -ac 2 -i /dev/dsp1 \
    -pix_fmt yuv422p -r 30000/1001 -s 640x480 -f rawvideo -i /tmp/vpipe \
    -pix_fmt yuv411p -r 30000/1001 -padleft 40 -padright 40 \
    /var/tmp/analog.dv

ffmpeg says:

Input #0, oss, from '/dev/dsp1':
  Duration: N/A, start: 1230593138.586555, bitrate: N/A
  Stream #0.0, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Input #1, rawvideo, from '/tmp/vpipe':
  Duration: N/A, bitrate: N/A
  Stream #1.0, 1001/30000: Video: rawvideo, yuv422p, 640x480, 1001/30000, 29.97 fps(r)
Output #0, dv, to '/var/tmp/analog.dv':
  Stream #0.0, 1/90000: Video: dvvideo, yuv411p, 720x480, 1001/30000, q=2-31, 200 kb/s, 29.97 fps(c)
  Stream #0.1, 1/90000: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #1.0 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame=  494 fps= 30 q=0.0 size=   57773kB time=16.5 bitrate=28755.7kbits/s dup=0 drop=0


More information about the freebsd-multimedia mailing list