Capture App Examples

Tune to channel 4 in the default profile and send MPEG transport stream to VLC at port 8802 and to a file at ~/out.m2t:

Tune to channel 45 in the DVBT_EU_UHF profile, send MPEG transport stream to /home/user/out.m2t in current directory, and automatically terminate capture after 28.7 minutes:

Capture audio only from channel 42 in the USA profile and send to sound card at /dev/dsp0:

Capture audio only from channel 42 in the USA profile and use a third-party app to handle the actual playback:

Capturing Raw Video

The best way I've found to capture raw video (e.g. from an analog TV station) is to use a named pipe to send the video frames to ffmpeg for encoding to an mpeg file. Future version of cx88 may have a live capture facility that can display the raw pixels directly to the screen (e.g. using SDL). The output from ffmpeg may also be piped into a player such as VLC for live viewing, but this is rather inefficient.

As in the above example, ffmpeg can be used to multiplex the audio and video output. 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. It also assumes that cx88video0 and cx88audio0 are the video and audio functions of the same capture card. Note that in the cx88 command, only the video data is sent to the named pipe.

ffmpeg can be a little daunting, so let's dissect the ffmpeg command:

Picture-In-Picture (PiP)

As one of my friends pointed out when I told him I added PiP support to cx88, this is a rather ridiculous feature. Analog video is going away to a large extent, and at any rate the chances of anyone having two tuner card and two programs that they want to watch simultaneously are practically NIL. This feature was intended as a proof-of-concept to demonstrate that the cx88 driver's buffering system was flexible enough to handle hardware-based picture overlay. And because the buffer composition is handled directly by the CX2388x DMA engine, it may not work correctly when DMA bounce buffers are used (nothing bad or dangerous will happen, but parts of your video may be garbled if the bounce buffers prevent the two DMA engines from using the same physical location in memory).

But in case anyone cares, here's how you do PiP with the cx88 capture app:

  1. Run ffmpeg just as in the example above.
  2. Run cx88 as follows:
    • cx88