Working with Sources and Source Groups

Windows Media Encoder SDK banner art

The Windows Media Encoder SDK uses sources and source groups to specify the input streams that you want to encode:

  • A source is an audio stream, video stream, HTML stream, or script stream.
  • A source group is a synchronized collection of sources containing any combination of one audio source, one video source, one HTML source, and one script source.

For example, to encode a live concert, you would set up a source group to include one audio source and one video source. To encode a PowerPoint presentation, you would set up a source group to include one audio source, one video source, and one HTML source.

You can also set up multiple source groups in an encoding session to encode different content together. For example, to broadcast a live company meeting, you could set up four source groups corresponding to the main event, a welcome video, an intermission video, and a goodbye video.

An example of source groups.

Only one source group can be active at any time; you can either set a source group as active, or have a source group automatically roll over to another source group when the first has finished encoding.

Specify sources for an encoding session as follows:

  1. Create a source group collection to hold the source groups using IWMEncSourceGroupCollection.
  2. Create a source group to hold one or more input sources using IWMEncSourceGroup.
  3. Create the objects for the input sources and add them to the source group using IWMEncSource.
  4. Using IWMEncSource, specify what the input sources are. If your source is a device (such as a capture card or DV camera), you must first enumerate the available sources on your system using IWMEncPluginInfo, IWMEncSourcePluginInfoManager, and IWMEncDeviceControlPluginInfoManager.

See the following topics for more information about setting up sources.

Topic Description
Using a File as a Source Describes how to use media files (including .wma, .wmv, .asf, .avi, .wav, .mpg, .mp3, and .bmp file name extensions) for audio and video sources.
Using a Device as a Source Describes how to use devices, such as sound cards, capture cards, and digital devices such as DV cameras, for audio and video sources.
Using a Screen Capture as a Source Describes how to use a screen capture as a video source.
Using HTML as a Source Describes how to include an HTML stream as a source, which is useful for PowerPoint presentations.
Using Scripts as a Source Describes how to include captions, URLs, and custom script commands in a broadcast.

See Also