Unlagged/Raw Capture with PVR-150

Jonathan Thiessen jjthiessen at uwaterloo.ca
Sat Mar 5 14:11:00 UTC 2011

Good day,

I am running FreeBSD 8.2-RELEASE (GENERIC) on amd64.  I often use my
PVR-150 for latency sensitive operations (namely playing Wii).  Using
the multimedia/pvrxxx port, one is presented with a single device node,
/dev/cxm0, which by default presents an MPEG1/2 stream (with audio and
video synched).  However, this stream is sufficiently lagged so as to
make gaming impossible (maybe 1 second, or so).

After a little poking around, I found that one could easily disable the
MPEG encoder by changing 'sc->mpeg = 1;' to 'sc->mpeg = 0;' in cxm_open
(cxm.c:2498).  This gave me an unlagged raw YUV/NV12 video stream on
/dev/cxm0 (playable using `mplayer -rawvideo
format=nv12:h=480:w=720:fps=29.97 -nocache -demuxer 26 -framedrop
/dev/cxm0`).  However, doing so makes me lose audio.

My plan is to pick up a composite to stereo 3.5mm adaptor next week, and
just run it through my soundcard (unless a more elegant software
solution exists/could easily be made to exist).

I must admit that I've never done any kernel module hacking before.  Is
it easy to/has anyone tried to expose multiple device nodes in
pvrxxx/cmx (MPEG1/2, raw PCM, raw YUV/NV12), as it is done in ivtv
(e.g., /dev/video0, /dev/video24, and /dev/video32 respectively)?

Thank you for your time.

Have a good one ;)
Jonathan Thiessen
mailto:jjthiessen at uwaterloo.ca

More information about the freebsd-multimedia mailing list