Sections
You are here: Home Members Daniel Wagner DirectShow Video Lib (DSVL) Documentation

DirectShow Video Lib (DSVL) Documentation

This webpage documents the configuration file of the DSVL library by Thomas Pintaric. DSVL is supported by OpenVideo. DSVL can be downloaded from here

This documentation describes the configuration file as of version 0.0.8c.

An absolute minimal configuration file that should work with any setup looks like this :

  <dsvl_input>
    <camera show_format_dialog="true">
      <pixel_format>
        <RGB24/>
      </pixel_format>
    </camera>
  </dsvl_input>

This configuration will open the camera-native configuration dialog and ask the user to specify the desired camera configuration.

Configuring the camera at every application start by hand is tedious. It is therefore often prefered setup a specific configuration, which can be done using the attributes of the camera element. DSVL can also play back a video instead of reading images from a camera. To do this create an element called avi_file instead of the camera element.

Camera Configuration

The following attributes can be used to exactly configure the camera element:

  • show_format_dialog

    Shows the configuration dialog.

  • device_name

    Specifies the device name of the camera to use. The camera name does not have to be complete - instead a substring is sufficient. Use DirectShow GraphEdit to find out about installed cameras on your machine. A device_name looks like this:

    @device:pnp:\\?\usb#vid_046d&pid_08b1&mi_00#6&f0c0dab&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global

  • friendly_name

    Specifies the device's user-realable name. The camera name does not have to be complete - instead a substring is sufficient. Use DirectShow GraphEdit to find out about installed cameras on your machine. A device_name looks like this:

    Logitech QuickCam for Notebooks Pro

  • ieee1394id

    Selects a device by its unique 64-bit device identifier, as defined by the IEEE 1394 standard. Hexadecimal value expected, i.e. "437d3b0201460008". Use the IEEE 1394 ID-Tool (comes with DSVL) to determine your camera's ID. Only applies to DV camcorders!

  • frame_width

    Preferred video width, e.g. 720 for PAL (720x576).

  • frame_height

    Preferred video height, e.g. 576 for PAL-D1 (720x576).

  • frame_rate

    Preferred frame rate in frames per second (fps), e.g. 25.0 for PAL or 30.0 for NTSC.

Movie Playback Configuration

The following attributes can be used to configure the avi_file element:

  • file_name

    Specifies the input file name, if it's just a file name (without its full path), the WIN32 API fuction SearchPath() (Winbase.h) will be used to locate the file.

  • use_reference_clock

    If set to false, the reference clock will not be used to synchronize samples. Use this flag for offline post-processing.

  • loop_avi

    Makes the AVI playback loop continously

  • render_secondary

    Render secondary streams. An AVI file can contain an arbitrary number of multiplexed A/V substreams, usually there are at most 2 substreams (1st: video, 2nd: audio). DSVideoLib will only try to render stream 0x00 (assuming that it's video) and ignore the remaning substreams. Use this flag to force IGraphBuilder->Render(IPin*) calls on substreams 1..n, but DO NOT SET this flag if your AVI file contains more than one video stream.

Pixel Format Configuration

The pixel_format element can must have exactly one child element to specifiy the output pixel format:

  • RGB32

    Uncompressed 32-bit RGB output (4th byte is unused). This is the only pixel format that can use the attributes flip_h and flip_v to flip the image. DirectShow Mediasubtype MEDIASUBTYPE_RGB32.

  • RGB24

    Uncompressed 24-bit RGB output. DirectShow Mediasubtype MEDIASUBTYPE_RGB24.

  • RGB565

    Uncompressed 16-bit RGB output. DirectShow Mediasubtype MEDIASUBTYPE_RGB565.

  • RGB555

    Uncompressed 16-bit RGB output. DirectShow Mediasubtype MEDIASUBTYPE_RGB555.

  • UYVY

    Packed YUV output. A Y sample at every pixel, a U and V sample at every second pixel horizontally on each line; every vertical line sampled. Probably the most popular of the various YUV 4:2:2 formats. Byte ordering (lowest first) is U0, Y0, V0, Y1, U2, Y2, V2, Y3, U4, Y4, V4, Y5, where the suffix 0 is the leftmost pixel and increasing numbers are pixels increasing left to right. Each 4-byte block is 2 image pixels. DirectShow Mediasubtype MEDIASUBTYPE_UYVY.

  • YUY2

    YUY2 format output. Same as UYVY but with different pixel ordering. Byte ordering (lowest first) is Y0, U0, Y1, V0, Y2, U2, Y3, V2, Y4, U4, Y5, V4, where the suffix 0 is the leftmost pixel and increasing numbers are pixels increasing left to right. Each 4-byte block is 2 image pixels. DirectShow Mediasubtype MEDIASUBTYPE_UYVY.

Document Actions
[Powered by Plone]