Introduction

A module that combines audio and video into one file.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Available in LEADTOOLS Multimedia toolkits.

Introduction

DirectShow filters are multimedia components that can be used to process or enhance video and audio multimedia streams. The LEADTOOLS Multimedia SDK includes full or evaluation versions* of the key DirectShow filters listed below. Browse the Table of Contents for a complete listing of all filters included and covered by this help file.

Codecs (Compressers-Decompressers) are required for encoding (creating) and decoding (playing) audio and video files. With LEAD iCompress™ codecs, you can compress large media files with no perceivable loss of quality. LEAD Codecs with iCompress™ technologies are the unprecedented leader in audio and video compression technology. LEAD codecs deliver the highest quality sound and high definition images to your multimedia formats. Supporting both industry standard formats, as well as integrating our own industry leading compression algorithms, LEAD codecs can produce the highest quality formats at the smallest file size. This provides you with opportunities compress any video content up to only 20% of its original file size, making it easier to stream online, place on popular handheld devices (such as the PSP™ or iPod®) or share. LEADTOOLS Multimedia includes evaluation versions* of the key LEAD Audio/Video Codecs listed below. Browse the Table of Contents for a complete listing of all codecs included and covered by this help file.

Also included are evaluation versions [*] of the DVD writer, DVD burner, MPEG-1 multiplexer , MPEG-2 multiplexer, ISO multiplexer, Screen capture filter, Network filters (source, mux, sink and protocol manager), and DICOM medical toolkit filters.

[*] Evaluation versions included with LEADTOOLS Multimedia toolkit. For pricing on filter and codec client licenses, contact sales@LEADTOOLS.com .

Key Features:

Video Filters - Enhancements

Video Filters - Special Effects

Audio Filters

Other Filters, Multiplexers, Demultiplexers, and DICOM

LEAD Audio Codecs featuring iCompress™*

LEAD Video Codecs featuring iCompress™*

Requirements

Supported Environments

Video Filters - Enhancements

  • LEAD Video Add Filter - Brightens a frame by adding two or more frames. Useful in correcting video taken in low-light conditions. For example, astronomers or video surveillance applications should find this filter useful.

  • LEAD Auto Contrast Filter -Changes the contrast without changing colors (hue). It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream.

  • LEAD Auto Intensity Filter - Performs color leveling on the RGB channel (the sum of the R, G, and B channels), without changing colors. It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm.

  • LEAD Auto Level Filter - Performs color leveling on the individual R, G and B channels, treating each of the R, G and B channels as a separate entity, without changing colors. It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream.

  • LEAD Color Space Converter - Converts between numerous YUV and RGB data. Supported YUV formats: YUY2, UYVY, YV12, YVYU, IYU2, IYU1, Y41P, YVU9, IY41, IUYV, I420, IYUV, V210, v210, NV12. Supported RGB formats: RGB24, RGB32, ARGB32, RGB565, RGB555, ARGB1555, RGB8, RGB4, RGB1, LGRY.

  • LEAD Video Color Replace Filter - Replaces any range of colors in a video stream with another range of colors.

  • LEAD Video Color Filter - Adjusts Hue, Saturation, Brightness, Contrast.

  • LEAD Video Deblocking Filter -Smoothes edges and removes the blocky artifacts present in highly compressed MJPEG or MPEG movies. Extremely useful for improving movies created by digital cameras that can take highly compressed, small video clips.

  • LEAD Video Deinterlace Filter [*] - Deinterlaces video with a pattern, deinterlaces only a region of interest (rectangle), and specifies segments in the video to deinterlace and how to deinterlace the segment (no deinterlace, interlace, deinterlace with pattern).

  • LEAD Video Resize Filter [*] - Resizes the video by adjusting the width and height of the frames using normal resize, resample (bilinear interpolation), bicubic interpolation.

  • LEAD Video Crop Filter [*] - Play, convert or capture only a specific rectangular area within the video.

  • LEAD Video Rotation Filter [*] - Flips, Reverses, Rotates 90, 180, and 270 degrees. Very useful when certain devices capture video in a rotated state.

  • LEAD Video Unsharp Mask Filter [*] - Powerful algorithm for edge enhancing. Improves the quality of some movies that look "washed out" because of resizing. The Video Unsharp Mask Filter produces better results than Video Edge Enhance.

  • LEAD Video Edge Enhance Filter - Improves the quality of some movies that look "washed out" because of resizing. The LEAD Video Edge Enhance Filter is similar to Video Unsharp Mask Filter, but much faster.

  • LEAD Video Mosaic Filter - Conceals a specific area in the video by making it blocky.

  • LEAD Video Gamma Correction Filter - Applies Gamma Correction (nonlinear brightness) to a video.

  • LEAD Video Histogram Equalize Filter [*] - Automatically increases the contrast and details in videos by using the histogram. This effect enhances videos that are too dark or too bright.

  • LEAD Video Histogram View Filter [*] - Draws the running histogram of a video stream. The filter also provides access to the histogram array through its programming interface. The histogram can be viewed for a single channel or for all channels.

  • LEAD Video Text Overlay Filter [*] - Adds static or moving text to videos with control over the font, font size, border and background. Additionally, an external XML file can be used to specify text to appear on specific frames.

  • LEAD Video Overlay Filter [*] - Superimpose a logo over a video or play a video inside a video (PiP).

  • LEAD Still Image Reader - Adds support to DirectShow to read any file format supported by LEADTOOLS. (For example, open CMP or TIFF files in Media Player.) The filter registers the following extensions with DirectShow: pict, pct, pic, dib, gif, cmp, png, jpg, jff, jpe, jtf, fjif, tiff, tif, pcd, but can be customized to register any of the 120+ file formats supported by LEADTOOLS.

  • LEAD Still Image Writer - Adds support to DirectShow to save any file format supported by LEADTOOLS. It can save several single images (movie0001.cmp, movie0002.cmp, etc) or, it can save all images in one multi-page file (movie.tif).

  • LEAD Video Callback Filter [*] - Each video sample is provided in a callback for additional processing before being forwarded to the next component in the graph. The filter can be used during capture, playback or conversion.

  • LEAD Video Motion Detection [*] - Motion is emphasized by a frame around the motion and/or displaying a frame of only the motion (areas of the frame without motion are black). Programmatically, the filter will fire a callback each time a frame is received. If motion is detected, the bounding rectangles containing the motion can be retrieved. The possible notifications received with each frame are motion has started, motion, motion has stopped and still. Filter settings include object size, sensitivity and more.

Video Filters - Special Effects

  • LEAD Video Emboss Filter - Creates an emboss or bumpmap effect. Can also be used as a DirectX filter with in DirectShow Editing Services (DES).

  • LEAD Video EFX Aging Filter - Adds random scratches and noise to the movie as if it were an old film.

  • LEAD Video EFX Brightness Filter -"Hides" moving objects. In places where there is movement, the brightness of the background changes allowing you to see that there is movement, but you can only guess what it is by the shape.

  • LEAD Video EFX BumpMap Filter - Applies a bumpmap effect to the video stream.

  • LEAD Video EFX Dizzy Filter - Applies an effect to the movie that simulates a dizzy feeling.

  • LEAD Video EFX Fire Filter - Makes moving objects appear to be on fire.

  • LEAD Video EFX Ghost Filter - Renders moving objects as invisible.

  • LEAD Video EFX Glass Tile Filter - Makes the video appear as if it is being viewed through glass tiles.

  • LEAD Video EFX Hologram Filter - Draws a holographic-like shadow of moving objects.

  • LEAD Video EFX Lens Filter - Adds a fish eye-like effect to the movie. Can also be used to magnify an area in a video.

  • LEAD Video EFX Lightning Filter - Draws lightning sparks around moving objects.

  • LEAD Video EFX Maze Filter - Distorts the movie into a crystal maze.

  • LEAD Video EFX Motion Blur Filter - Makes moving objects blurry. It gives the appearance of a random glow around the motion.

  • LEAD Video EFX Motion Emboss Filter - Makes moving objects appear to be embossed.

  • LEAD Video EFX Motion Mosaic Filter - Makes moving objects blocky in appearance.

  • LEAD Video EFX Motion Scan Filter - Scans one line per frame and draws it to the destination (Radar effect), distorting the moving objects.

  • LEAD Video EFX Particles Filter - Renders moving objects into small particles, joining the particles to reform the object when it stops moving.

  • LEAD Video EFX Predator Filter - Create video effects similar to the Predator movies.

  • LEAD Video EFX Rain Filter - Adds rain drops to the video as if the video is a pool of water.

  • LEAD Video EFX Streak Filter - Simulates very fast movement.

  • LEAD Video EFX Wave Filter - Renders waves around moving objects. The video is the surface of a body of water and moving objects will generate concentric waves as if something touched the surface of the water.

Audio Filters

  • LEAD VUMeter Filter - Detects the strength of an audio stream. Provides a visual indication of the audio level.

  • LEAD Echo Filter - Adds an echo audio effect.

  • LEAD Volume Control Filter - Adjusts the volume. Useful for bringing audio files to the same level so audio from one source is not louder than audio from another source.

  • LEAD Chorus Filter - Creates several layers of the same sound. This effect adds depth and resonance to a sound.

  • LEAD Flanger Filter - Adds a ghosting effect.

  • LEAD Phaser Filter - Makes the audio thinner or fuller.

  • LEAD Audio Detection* - Detects audio silence/noise. Very useful for applications such as security (can start capture when there is noise and stop capture when there is silence).

  • LEAD Audio Callback - Each audio sample is provided in a callback for additional processing before being forwarded to the next component in the graph. This filter can be used during capture, playback or conversion.

  • LEAD Ogg Splitter - Plays and converts OGG files.

  • LEAD OGG Mulitplexer - Creates OGG files using the LEAD Capture or Convert modules.

Other Filters

  • LEAD MPEG-1 Multiplexer - Creates MPEG-1 files.

  • LEAD MPEG-2 Multiplexer - Create sMPEG-2 files.

  • LEAD Frame Rate Control Filter [*] - Changes the frame rate of the passing video stream.

  • LEAD Dynamic Rate Control Filter [*] - Changes the playback rate of the passing video stream.

  • LEAD RGB Converter - Converts to and from RGB1 grayscale, RGB1 color, RGB4 grayscale, RGB4 color, RGB8 color, RGB8 grayscale, RGB15 (5:5:5), RGB16 (5:6:5), RGB24, RGB32 and 12 and 16 bit grayscale color spaces.

  • LEAD Screen Capture Filter - Captures the screen. Use this filter to record video files for training or technical support purposes.

  • LEAD Screen Capture Codec - Lossless video compression filter designed to be used with the screen capture filter. Provides very high compression ratios without any loss of quality.

  • LEAD Windows Media Reader - Plays Windows Media files from a local file or URL. It is required for playing Windows Media files from an URL under Vista.

  • DICOM Filters Evaluation - Creates and plays DICOM files without programming!

    • Register the DICOM Reader and view any DICOM file in LEAD's MM player or Windows Media Player.

    • Use the DICOM Writer filter to capture straight into a DICOM file or convert any video to a DICOM file. The DICOM Writer uses a template DICOM file containing the non-image DICOM tags needed to create valid DICOM files, and has built-in data compression support. The DICOM Writer is also designed to integrate seamlessly with the LEADTOOLS Medical Imaging toolkits where it can stream directly into a LEADTOOLS DICOM DataSet

    • DICOM and 16 bit grayscale functionality require a LEADTOOLS Medical Imaging product in conjunction with a LEADTOOLS Multimedia product. Contact Sales@LEADTOOLS.com for more information.

    • LEAD MPEG-2 Transport UDP Sink - Streams MPEG-2 Transport data to a UDP or TCP port.

    • LEAD MPEG-2 Transport UDP Source - Streams MPEG-2 Transport data from a UDP or TCP port.

    • LEAD MPEG-2 Transport RTSP Source - Streams data from an RTSP server.

LEAD Video Codecs featuring iCompress™*

  • H.264 Codec

  • H.264 Transcoder

  • MPEG-4 Codec

  • MPEG-2 Codec

  • H.263 Codec

  • MCMW Codec

  • MCMP/MJPEG Codec

  • MJPEG2000 Codec

  • MPEG-2 Transport Demultiplexers

LEAD Audio Codecs featuring iCompress™*

  • AAC Codec

  • AAC Transcoder

  • AMR Codec

  • Vorbis Codec

Requirements

LEADTOOLS Multimedia features require that DirectShow 8.0 to be installed. There are also a number of files that you must include when you build your application . To use the filters in your application, you must expose the ILMMCommon Interface.

Certain filters and codecs require runtime licenses in order to be included with your application. For information on licensing the LEADTOOLS Filters and Codecs, refer to Multimedia Filters and Codec Licensing.

Supported Environments

LEADTOOLS comes in Win32 and x64 editions. The environments supported depend upon the specific product, platform and function being used. For more information, refer to Supported Platforms / Operating Systems.

Demos| Sample Programs | Unlocking Features | Install Directory | Redistributables | Documentation | Support | Licensing

© Copyright LEAD Technologies, Inc. 1991-2010. ALL RIGHTS RESERVED


Copyright notice

Copyright Notices

Copyright © LEAD Technologies, Inc. 1991-2010. ALL RIGHTS RESERVED

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL, DC120V154_32.DLL, LFDCRu.dll, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCSu.dll, and LFKDCu.dll files contain material that is Copyright © Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

Portions of the LFCRWu.dll, CDSDK.reg, CDSDK.dll, CDRAPCLS.dll, czs_ui.dll, deimg.dll, deImg010.dll, deImg110.dll, deImg153.dll, deimg301.dll, deimg401.dll, deImg404.dll, deimg602.dll, Deimg603.dll, DeImgd60.dll, pscAdimg.dll, pscCllct.dll, pscCStUI.dll, pscDcd.dll, pscDevUI.dll, pscDvlp.dll, Pscl2STI.dll, pscll.dll, pscParse.dll, pscSetup.dll, psdkdll.dll, psdkReg.dll, psParse.dll. file contain material that is Copyright © Canon, Inc. 2002.

Portions of the LFFPX7.DLL and LFKODAK.DLL files contain material that is Copyright © Hewlett Packard, 1996.

Portions of the Vorbis Audio Codec are copyright © 2002, Xiph.org Foundation.

Portions of the Ogg Filters are copyright © 2001 Tobias Waldvogel.

Portions of the Professional and Plus OCR and ICR Modules are Copyright © Nuance Communications, Inc. 1995-2009. ALL RIGHTS RESERVED.

Portions of the Advantage OCR Module contain software developed using the Tesseract Open Source OCR Engine, originally developed at Hewlett Packard Laboratories Bristol and at Hewlett Packard Co, Greeley Colorado and are distributed under the Apache License, Version 2.0 (the "License"); A copy of the License may be obtained at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Portions of the LEADTOOLS Raster PDF Read Plug In are Copyright © 1996, 2000 Artifex Software Inc. All rights reserved.

File filters for decoding MrSID - and DjVu - formats are provided under a license from Lizardtech, Inc.

The "FlashPix" format uses Microsoft's OLE structured storage.

Portions of the DICOM help files in Medical Imaging product line are reprinted with permission from the National Electrical Manufacturers Association -Copyright 1998 by the National Electrical Manufacturers Association. All rights including translation into other languages, reserved under the Universal Copyright Convention, the Berne Convention or the Protection of Literacy and Artistic Works, and the International and Pan American Copyright Conventions.

Portions of LEADTOOLS PACS Imaging contain software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/), including cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. Copyright Tim Hudson 1995-1998 (tjh@cryptsoft.com) All rights reserved.

Portions of LEADTOOLS PACS Imaging contain software based on the MD5 Message Digest Algorithm developed by RSA Data Security, Inc. Copyright (c) 1991-92 RSA Data Security, Inc. All Rights Reserved.

Portions of LEADTOOLS Multimedia (RTSP Source Filter) use the MDS Message-Digest Algorithm, Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.

Portions hereof licensed under US patent 5,327,254 and foreign counterparts.

Trademarks

LEAD®, LEADTOOLS® and LEADVIEW® are registered trademarks of LEAD Technologies, Inc.

Microsoft, Windows, Windows NT, Visual Basic, Visual FoxPro, Vista, and Access are either trademarks or registered trademarks of the Microsoft Corporation.

All other brands or product names used in this help file are either registered trademarks or trademarks of their respective holders.

Address and Contact Information

LEAD Technologies, Inc.
Suite 200
1927 South Tryon Street
Charlotte, NC 28203

(704) 332-5532
FAX: (704) 372-8161
E-mail: support@leadtools.com
Technical support: (704) 372-9681 or support@leadtools.com
Home page: http://www.leadtools.com

Demos | Sample Programs | Unlocking Features | Install Directory | Redistributables | Documentation | Support | Licensing


Supported Platforms / Operating Systems

Imaging, Document Imaging and Medical Imaging Toolkits

Win32 (x86) platforms

Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, Windows 7

Win64 (x64) platforms

Windows XP 64-Bit Edition, Windows Server 2003 64-Bit Edition, Windows Server 2008 64-Bit Edition, Windows Vista 64-Bit Edition, Windows 7 64-Bit Edition

Windows Mobile 5*

Windows Mobile 6*

Multimedia Toolkit – COM

Win32 (x86) platforms – All objects and functions.

Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, Windows 7

Win64 (x64) platforms – All objects and functions.

Windows XP 64-Bit Edition, Windows Server 2003 64-Bit Edition, Windows Server 2008 64-Bit Edition, Windows Vista 64-Bit Edition, Windows 7 64-Bit Edition

Windows Mobile 6* – ltmmPlayCtrl object and functions, ltmmCaptureCtrl object and functions

Multimedia Toolkit – API

Win32 (x86) platforms – All interfaces and functions.

Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, Windows 7

Win64 (x64) platforms – All interfaces and functions.

Windows XP 64-Bit Edition, Windows Server 2003 64-Bit Edition, Windows Server 2008 64-Bit Edition, Windows Vista 64-Bit Edition, Windows 7 64-Bit Edition

Windows Mobile 6* – ltmmPlay interface and functions, ltmmCaptureCtrl object and functions

Multimedia Filters

Win32 (x86) platforms –All filters

Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, Windows 7

Win64 (x64) platforms – All filters

Windows XP 64-Bit Edition, Windows Server 2003 64-Bit Edition, Windows Server 2008 64-Bit Edition, Windows Vista 64-Bit Edition, Windows 7 64-Bit Edition

Windows Mobile 6*

    • LEAD H263 Decoder (2.0)

    • LEAD H264 Decoder (3.0)

    • LEAD MPEG-2 Decoder (2.0)

    • LEAD MPEG-4 Decoder

    • LEAD MCMP/MJPEG Decoder (2.0)

    • LEAD MPEG Audio Decoder

    • LEAD MPEG2 Transport Demultiplexer

    • LEAD MPEG2 Program Demultiplexer

    • LEAD ISO Demultiplexer

    • LEAD Video Text Overlay Filter (2.0)

* Can be found on many modern mobile devices, including:

  • Windows Mobile Professional, which runs on 'Windows Phones' (smartphones) having touchscreens

  • Windows Mobile Standard, which runs on 'Windows Phones' having regular screens

  • Windows Mobile Classic, which runs on 'Windows Mobile Classic devices' (Pocket PCs).


ILMMCommon Interface

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILMMCommon Interface

This interface is exposed by the majority of LEAD filters. The interface provides basic functionality and information common to all filters that expose it.

This interface can be obtained using a direct QueryInterface call on the filter object.

A Note About BSTR Properties:

When "getting" a BSTR property, the memory containing the string is allocated with SysAllocString. When this string is no longer needed, free this memory by calling SysFreeString if you are working in an environment such as C or C++ that does not automatically delete the memory. VB automatically deletes the memory, so VB programmers do not need to free the memory themselves.

Interface Properties:

Type | Name | Parameter Description | Description
BSTR | FilterName |  | Contains the friendly name of the filter. A note about BSTR properties.
long | FilterState |  | Indicates the current filter state. Possible values are:
 |  |  | Value | Description
 |  |  | 0 | The filter is stopped.
 |  |  | 1 | The filter is paused.
 |  |  | 2 | The filter is running.
long | InputPinsCount |  | Contains the number of input pins on the filter.
long | OutputPinsCount |  | Contains the number of output pins on the filter.
BSTR | InputPinName (long nPinIndex) | The zero based index of the input pin to retrieve its name. | Contains the name of the input pin at the specified index. A note about BSTR properties.
BSTR | OutputPinName (long nPinIndex) | The zero based index of the output pin to retrieve its name. | Contains the name of the output pin at the specified index. A note about BSTR properties.
BOOL | IsLEADInputPinConnected (long nPinIndex) | The zero based index of the input pin to check its connection state. | Indicates whether the input pin at the specified index is connected to another pin.
BOOL | IsLEADOutputPinConnected (long nPinIndex) | The zero based index of the output pin to check its connection state. | Indicates whether the output pin at the specified index is connected to another pin.
long | InputPinStreamType (long nPinIndex) | The zero based index of the input pin to retrieve its stream type. | Contains the stream type of the input pin at the specified index. Possible values are:
 |  |  | Value | Meaning
 |  |  | AudioStream | [0] The stream type currently used is audio.
 |  |  | VideoStream | [1] The stream type currently used is video.
 |  |  | TextStream | [2] The stream type currently used is text.
long | OutputPinStreamType (long nPinIndex) | The zero based index of the output pin to retrieve its stream type. | Indicates the stream type of the output pin at the specified index. Possible values are:
 |  |  | Value | Meaning
 |  |  | AudioStream | [0] The stream type currently used is audio.
 |  |  | VideoStream | [1] The stream type currently used is video.
 |  |  | TextStream | [2] The stream type currently used is text.
long | InWidth (long nPinIndex) | The zero based index of the input pin to retrieve its connected video width. | Indicates the video width for the input pin at the specified index. (Applicable for video streams only).
long | InHeight (long nPinIndex) | The zero based index of the input pin to retrieve its connected video height. | Indicates the video height for the input pin at the specified index. (Applicable for video streams only).
long | OutWidth (long nPinIndex) | The zero based index of the output pin to retrieve its connected video width. | Indicates the video width for the output pin at the specified index. (Applicable for video streams only).
long | OutHeight (long nPinIndex) | The zero based index of the output pin to retrieve its connected video height. | Indicates the video height for the output pin at the specified index. (Applicable for video streams only).
long | InBits (long nPinIndex) | The zero based index of the input pin to retrieve its connected video bits per pixel. | Indicates the bits per pixel value of the video stream for the input pin at the specified index. (Applicable for video streams only).
long | OutBits (long nPinIndex) | The zero based index of the output pin to retrieve its connected video bits per pixel. | Indicates the bits per pixel value of the video stream for the output pin at the specified index. (Applicable for video streams only).
long | InChannels (long nPinIndex) | The zero based index of the input pin to retrieve the number of channels for the connected audio stream. | Indicates the number of channels for the input pin at the specified index (Applicable for audio streams only).
long | OutChannels (long nPinIndex) | The zero based index of the output pin to retrieve the number of channels for the connected audio stream. | Indicates the number of channels for the output pin at the specified index (Applicable for audio streams only).
long | InBitsPerSample (long nPinIndex) | The zero based index of the input pin to retrieve the bits per sample value for the connected audio stream. | Indicates the bits per sample value for the input pin at the specified index. (Applicable for audio streams only).
long | OutBitsPerSample (long nPinIndex) | The zero based index of the output pin to retrieve the bits per sample value for the connected audio stream. | Indicates the bits per sample value for the output pin at the specified index. (Applicable for audio streams only).
long | InSamplesPerSec (long nPinIndex) | The zero based index of the input pin to retrieve the bits per sample value for the connected audio stream. | Indicates the samples per second (frequency) value for the input pin at the specified index. (Applicable for audio streams only).
long | OutSamplesPerSec (long nPinIndex) | The zero based index of the output pin to retrieve the bits per sample value for the connected audio stream. | Indicates the samples per second (frequency) value for the output pin at the specified index. (Applicable for audio streams only).
long | InputAspectRatioX (long nPinIndex) | The zero based index of the input pin for which to retrieve the X part of the aspect ratio for the connected video stream. | Indicates the X (width) part of the aspect ratio of the video stream at the specified index. (Applicable for video streams only).
long | InputAspectRatioY (long nPinIndex) | The zero based index of the input pin for which to retrieve the Y part of the aspect ratio for the connected video stream. | Indicates the Y (height) part of the aspect ratio of the video stream at the specified index. (Applicable for video streams only).
BSTR | InputPinStreamSubType (long nPinIndex) | The zero based index of the input pin to retrieve its stream sub type string. | Contains the stream sub type CLSID as a string. A note about BSTR properties

Interface Methods:

HRESULT CommitSettings ()

Description

Writes filter settings to the registry. The Multimedia filters save their settings to the registry only at filter destruction. This method will force the filter to save its settings to the registry before it is released. If the filter has no settings to write to the registry, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT ExportSettings (BSTR FileName)

Parameters

FileName

character string containing the destination file name.

Description

Writes filter settings to a file. The destination file can have one or more filters settings, where every filter is identified by its own section as follows:

[Filter 1]

Setting1=value

&

Setting(n)=value

&

[Filter m]

Setting1=value

&

Setting(n)=value

The file format is the same as windows INI.

If the filter has no settings to expose, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT ImportSettings (BSTR FileName)

Parameters

FileName

character string containing the source file name.

Description

Reads and sets filter settings from a file, written using the ExportSettings method. The ExportSettings method insures that the file is formatted correctly and the right values are written. If the filter has no settings to set, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT LoadFromMemory (char * pMem)

Parameters

pMem

pointer to a character string containing the filter settings to load.

Description

Reads filter settings from a memory buffer. The passed buffer must be filled using the WriteToMemory method.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT LoadSettings ()

Description

Loads filter settings from the registry. The Multimedia filters import the settings from the registry only at creation time. This method will force the filter to re-load its settings from the registry. If the filter has no settings to load from the registry, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT CommitSettings ()

Description

Writes filter settings to the registry. The MM filters save their settings to the registry only at filter destruction. This method will force the filter to save its settings to the registry before its released.

If the filter has no settings to write to the registry, E_NOTIMPL is returned.

Return

S_OK if connected.

HRESULT WriteToMemory (char * pMem, long *lSize)

Parameters

pMem | pointer to a character string to be updated with the filter settings.
lSize | pointer to a variable to be updated with the size of the written settings, in bytes.

Description

Writes filter settings to a memory buffer. The filter settings will be written in binary format. Dont try to read individual settings from the buffer; the output buffer can be only used with the LoadFromMemory method.

Return

S_OK if connected, S_FALSE otherwise.


LEADTOOLS and DirectShow

Also known as a decompressor, this is a module or algorithm to decompress data.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

The DirectShow component responsible for playing the video. Some renderers might have useful settings you can adjust if you have problems playing the video.DirectShow component responsible for playing the video. Some renderers might have useful settings you can adjust if you have problems playing the video.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A module that combines audio and video into one file.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

LEADTOOLS and DirectShow

What is DirectShow

Filters and Filter Graphs

Filter Definitions

Filter Graphs

Connecting Filters

Some Common Filter Graphs

DirectShow "Merit System" Registries

Competing Codecs

Capture and Control

Where does the LEADTOOLS Multimedia SDK Fit In?

DirectShow Interfaces

DirectShow Extensions

Debugging

References

Table 1: Media Types Supported by the LEAD MPEG2 Multiplexer

Figure 1: A simple capture graph

Figure 2: A complex capture graph

Figure 3: A simple conversion graph

Figure 4: A simple playback graph

What is DirectShow

Microsoft® DirectShow® is an extensible, filter-based framework, based on the Microsoft® Windows® Component Object Model (COM), that provides a common interface for media across many of Microsoft's programming languages. It can render or record media files on-demand by the user or developer. DirectShow also contains DirectX® plug-ins for audio signal processing, and DirectX Video Acceleration for accelerated video playback.

Microsoft produced the DirectShow multimedia framework and API, which replaced the Video for Windows technology (VFW), to enable software developers to perform various operations on media files. DirectShow development tools and documentation are distributed as part of the Microsoft Platform SDK. Eventually, Microsoft plans to replace DirectShow with Windows Media Foundation (WMF), beginning with Windows Vista.

Most video-related Windows applications, such as Microsoft's Windows Media Player, Winamp, and Windows Movie Maker, use DirectShow to manage multimedia content. DirectShow's most notable competitor is Apple Computer's QuickTime framework.

Filters and Filter Graphs

DirectShow divides multimedia task processing, such as video playback, into a set of steps. Each step, or stage in the processing of the data is called a filter. Filters are connected together by input and output pins. Filters can be connected in different ways for different tasks to build a filter graph that lists all necessary filters to perform a specific task. Developers can add custom effects or other filters at any stage in the graph, then render the results to a file, URL or camera.

DirectShow Base Classes, a set of C++ classes provided in the DirectShow SDK, are used to build most filters. These handle much of the creation, registration and connection logic for the filter.

Filter Definitions

Since the entire concept of rendering, converting, and capturing files in DirectShow in based on filters and filter graphs, it is important to understand the role of each filter.

Source filter. This is usually the first filter in the graph. It is responsible for reading the input data. The data may come from a file on disk, a network, or any other method.

Demulitplexer. This filter is responsible for splitting the media streams. It is usually connected to the source filter. For example, the filter input might be the actual file or network stream, while the output would be separate audio and video streams.

Video / Audio Decoder . These filters handle the actual decoding or decompression. They do not demultiplex, so data should be demultiplexed before it is passed to the decoder. Therefore, they are usually connected to the demultiplexer output. For example, the video decoder input might be a compressed video stream such as MPEG2, and the output could be raw video data.

Renderer. These filters are used to actually render data. Data could be audio, video, or both. For example, when playing a media file with both audio and video, a video renderer would handle displaying the video on the screen, and an audio renderer would handle directing the audio data to the sound device. The input of the renderer is usually uncompressed data coming from the decoder.

Audio / Video Encoder . These filters are used to compress data, audio or video. The input is usually uncompressed audio or video data, and the output is the compressed version of the same data.

Multiplexer. This filter is responsible for joining media streams. Input is usually compressed data from an audio/video encoder. The output is a single stream containing both video and audio data.

Sink Filter. These filters are usually the last filters in the graph. They can handle writing the data to disk to create a media file, or they can send the data to some other location, such as over a network.

Video / Audio Processor. These are usually custom filters used to perform some type of data processing or generate some type of event. LEAD has created many video and audio processors, such as the Video Resize Filter, used to resize a video stream. Usually, these filters only handle uncompressed data, so they would be inserted in the filter graph before the encoder or after the decoder.

Filter Graphs

DirectShow filter graphs are widely used in video playback, in which the filters provide steps such as file parsing, video and audio de-multiplexing, decompressing, and rendering. They are also used for video and audio recording and editing, and for interactive tasks such as DVD navigation. During rendering, the filter graph searches the Windows Registry for registered filters, builds the graph, connects the filters together, and, at the developer's request, plays, pauses, etc. based on the created graph. GraphEdit, a free utility that ships with the DirectShow SDK, can be used to build and test custom graphs, filter by filter.

Connecting Filters

Each filter in a filter graph handles a specific task, and each filter is usually designed to handle a specific type of data or stream.

For example, to create an MPEG2 file, you would need an MPEG2 Encoder and an MPEG2 Multiplexer. Most likely, the MPEG2 Encoder will only create MPEG2 compressed data and the MPEG2 Multiplexer will only accept MPEG2 video and certain types of audio related to MPEG2 as inputs. The same goes for decoding and demultiplexing. An MPEG2 Decoder will only decode MPEG2 video, and an MPEG2 Demultiplexer will only accept as inputs a stream containing MPEG2 video and certain types of audio related to MPEG2.

When you try to connect filters that do not agree on data types, the connection is usually refused and the graph will not run. This is why it is important to know what media types each filter supports.

For example, Table 1: Media Types Supported by the LEAD MPEG2 Multiplexer lists media types supported by the LEAD MPEG2 Multiplexer. If you attempt to connect any media type other than those listed to the input of the LEAD MPEG2 Multiplexer, it will refuse the connection.

Table 1: Media Types Supported by the LEAD MPEG2 Multiplexer

 | Video | Audio
Type: | MEDIATYPE_Video | MEDIATYPE_Audio
Subtypes: | MEDIATYPE_MPEG1Video MEDIASUBTYPE_MPEG1Payload MEDIASUBTYPE_MPEG2_VIDEO | MPEG1AudioPayload MEDIASUBTYPE_MPEG1Audio FORMAT_WaveFormatEx (WAVE_FORMAT_MPEGLAYER3 format) MEDIASUBTYPE_MPEG2_AUDIO MEDIASUBTYPE_DOLBY_AC3 MEDIASUBTYPE_DVD_LPCM_AUDIO

Some Common Filter Graphs

The following figures illustrate basic filter graphs for capture, conversion, and playback:

Figure 1: A simple capture graph

Figure 2: A complex capture graph

Figure 3: A simple conversion graph

Figure 4: A simple playback graph

DirectShow "Merit System" Registries

For the filter graph to use filters automatically, they need to be registered in a separate DirectShow registry entry, as well as being registered with COM. (However, if the application adds the filters manually, they do not need to be registered at all.)

DirectShow uses a "merit system" to determine which filter is used to handle a specific task. The "merit" of each filter is determined by a value which is stored in the registry—and that value is determined by the creator of the filter. The actual properties or quality of a filter have nothing to do with its merit. For example, to decompress MPEG2 data, you need an MPEG2 decoder. If multiple MPEG2 decoders exist on the machine, the decoder with the highest value in the registry will be used.

Competing Codecs

Many companies now develop codecs in the form of DirectShow filters, resulting in the presence of several filters that can decode the same media type. "Codec hell" ensues when multiple DirectShow filters, all used for encoding or decoding the same media type, exist on a given computer. Under the merit system, implementations often compete with one another by registering themselves with increasingly elevated priority.

Thus, although DirectShow is capable of dynamically building a graph to render a given media type, it becomes difficult for developers to rely on this functionality when the resulting filter graph is variable. It is possible that filter graphs will change over time, as new filters are introduced to the computer. This can result in a support nightmare for developers and businesses. Developers often resort to manually building filter graphs to be certain of their contents, which cripples one of DirectShow's more appealing features.

Capture and Control

DirectShow also has many interfaces which allow for capturing from and controlling many types of webcams, TV tuners, and other devices that have a DirectShow driver. Options include controlling the TV tuner, and setting many common device properties such as capture size, color space, and frame rate.

However, actual control over the device is limited by what the manufacturer of that device has exposed in the DirectShow driver, and what has been implemented in the device itself. For example, one device may support capturing at 3 different resolutions, while another supports 10. One device may allow you to change the frame rate, while another may not.

Where does the LEADTOOLS Multimedia SDK Fit In?

The many advantages of DirectShow: connecting filters programmatically, creating custom filters, and so forth, can be quite complex—and programmers often complain about this complexity.

DirectShow Interfaces

LEAD's™ solution—the LEADTOOLS Multimedia SDK—handles these issues "under the hood," and exposes this functionality to the developer through dozens of easy-to-use interfaces.

DirectShow Extensions

By default, DirectShow supports several common media file formats, such as MPEG1 (decoding only), MP3, Windows Media Video, and plain static images. But DirectShow is also completely extensible, and extensions allow it to support any container format available—including any audio or video codec.

LEAD has created dozens of these extensions, which are included with the LEADTOOLS Multimedia SDK. A current list of available encoders, decoders, multiplexers, demultiplexers, sink / source, and other filters is at LEADTOOLS DirectShow Filters

(http://leadtools.com/SDK/Multimedia/Multimedia-DirectShow-Filters.htm).

Debugging

DirectShow filters provide a modular solution for dealing with many different multimedia tasks, but can pose a problem if you do not know which filters are being used in your graph. Most issues can be resolved through examining the graph currently in use. There are several useful tools to help with this.

EditGraph Method. The "EditGraph" method, provided in all three major interfaces (Capture, Control, and Play) in the LEADTOOLS Multimedia SDK, allows you to view the current graph using GraphEdit, a free utility that ships with the DirectShow SDK. Once this method is called, a message box appears bearing notification that the current graph has been registered. At this point, open GraphEdit and select the "Connect To Remote Graph" option. Your graph will be listed as an available graph. Select it, and the visible graph will be built in GraphEdit.

Example 1: Debugging Using GraphEdit. An MPEG2 file plays on one machine, but does not play on another machine. Probably, there are different filters in use on the different machines. Run GraphEdit on each machine, and compare the filter graphs. You will most likely see a difference in the filters being used on the two machines. If a non-LEAD decoder is being used which is not handling the data properly, unregister that decoder, so that the LEAD decoder will be used and the file will render correctly.

AMCAP. AMCAP is a free capture utility that ships with the Microsoft DirectX SDK. It is not a LEAD product, but uses the same DirectX code as LEAD to capture from capture devices. For this reason, it is a good application to test with on devices that appear to function incorrectly with LEAD.

Example 2: Debugging Using AMCAP. Using the LEAD Capture Control, the preview image for a device is all black. Build a preview image for the same device using AMCAP. If the preview is also all black in AMCAP, the problem is most likely the device driver. In that case, obtain an update from the manufacturer (if available). However, if the same problem does not occur using AMCAP, you should contact the LEADTOOLS Support Department with details of the issue and the make/model of the device.

References

MSDN DirectShow documentation. Retrieved on July 7, 2007.

Wikipedia DirectShow entry. Retrieved on November 7, 2007

LEADTOOLS Multimedia API WebHelp

LEADTOOLS Multimedia COM WebHelp

LEADTOOLS DirectShow Filters


LEADTOOLS Multimedia Product Comparison Chart

Inclusions of filters below indicate that a licensed version of the filter is included with the product. The Multimedia SDK includes at least an evaluation version of all filters that may be used for development and testing. Every SDK includes full developers documentation, components, base classes, sample applications.

Features:

Multimedia Capture

Multimedia Playback

Multimedia Conversion

Still Image Compression

Multimedia Processing

Play DVD

Create DVD Image

Burn DVD/ISO Image

Pause Live Capture

Rewind Live Capture

Fast-forward Live Capture

Pause Live UDP/TCP Stream

Rewind Live UDP/TCP Stream

Fast-forward Live UDP/TCP Stream

Video Conferencing

Stream Live Video

Stream Video Files

Video Codecs:

LEAD MPEG-4 Encoder

LEAD MPEG-4 Decoder

LEAD H.264 Encoder

LEAD H.264 Decoder

LEAD H.264 Transcoder

LEAD MPEG-2 Encoder

LEAD MPEG-2 Decoder

LEAD H.263 Encoder

LEAD H.263 Decoder

LEAD MCMP/MJPEG Encoder

LEAD MCMP/MJPEG Decoder

LEAD MCMW Encoder

LEAD MCMW Decoder

LEAD MJ2K Encoder

LEAD MJ2K Decoder

LEAD Screen Capture Encoder

LEAD Screen Capture Decoder

LEAD Theora Encoder

LEAD Theora Decoder

Audio Codecs:

LEAD AAC Encoder

LEAD AAC Decoder

LEAD AAC Transcoder

LEAD AC3 Encoder

LEAD AMR Encoder

LEAD AMR Decoder

LEAD MPEG Audio Encoder

LEAD Vorbis Encoder

LEAD Vorbis Decoder

DVD Filters:

LEAD DVD Writer

LEAD DVD Burner (COM object)

DVR Filters:

LEAD DVR Sink

LEAD DVR Souce

Convert Filters:

LEAD RGB Converter

LEAD Color Space Converter

Multiplexers:

LEAD MPEG-1 Multiplexer

LEAD MPEG-2 Multiplexer

LEAD MPEG-2 Transport Multiplexer

LEAD ISO Multiplexer

LEAD OGG Multiplexer

LEAD Network Multiplexer

LEAD FLV Multiplexer

Demultiplexers:

LEAD MPEG-2 Transport Demultiplexer

LEAD MPEG-2 Program Demultiplexer

LEAD ISO Demultiplexer

LEAD OGG Splitter

LEAD Network Demultiplexer

LEAD FLV Demultiplexer

LEAD Windows Media Reader

Source / Reader Filters:

LEAD MPEG-2 Transport UDP Source

LEAD MPEG-2 Transport RTSP Source

LEAD Still Image Reader

LEAD Screen Capture Source

LEAD DICOM Reader

LEAD Network Source

Sink/Writer Filters:

LEAD MPEG-2 Transport UDP Sink

LEAD Still Image Writer

LEAD DICOM Writer

LEAD Network Sink Filter

Network Filters

LEAD Network Protocol Manager Filter

Audio Filters:

LEAD VUMeter Filter

LEAD Echo Filter

LEAD Volume Control Filter

LEAD Chorus Filter

LEAD Flanger Filter

LEAD Phaser Filter

LEAD Audio Detection

LEAD Audio Callback

Video Post Processing Filters:

LEAD Auto Contrast Filter

LEAD Auto Intensity Filter

LEAD Auto Level Filter

LEAD Frame Rate Control Filter

LEAD Video Dynamic Rate Control Filter

LEAD Video Add Filter

LEAD Video Callback Filter

LEAD Video Color Filter

LEAD Video Color Replace Filter

LEAD Video Crop Filter

LEAD Video Deblocking Filter

LEAD Video Deinterlace Filter

LEAD Video Edge Enhance Filter

LEAD Video Emboss Filter

LEAD Video Gamma Correction Filter

LEAD Video Histogram Equalize Filter

LEAD Video Histogram View Filter

LEAD Video Mosaic Filter

LEAD Video Motion Detection

LEAD Video Overlay Filter

LEAD Video Resize Filter

LEAD Video Rotation Filter

LEAD Video Text Overlay Filter

LEAD Video Unsharp Mask Filter

Special Effects Filters:

LEAD Video EFX Brightness Filter

LEAD Video EFX BumpMap Filter

LEAD Video EFX Dizzy Filter

LEAD Video EFX Fire Filter

LEAD Video EFX Ghost Filter

LEAD Video EFX Glass Tile Filter

LEAD Video EFX Hologram Filter

LEAD Video EFX Lens Filter

LEAD Video EFX Lightning Filter

LEAD Video EFX Maze Filter

LEAD Video EFX Motion Blur Filter

LEAD Video EFX Motion Emboss Filter

LEAD Video EFX Motion Mosaic Filter

LEAD Video EFX Motion Scan Filter

LEAD Video EFX Particles Filter

LEAD Video EFX Predator Filter

LEAD Video EFX Rain Filter

LEAD Video EFX Streak Filter

LEAD Video EFX Wave Filter


LEAD Video Add Filter

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Add Filter

The LEAD Video Add filter can be used for enhancing night vision or dropping more light on dark sources to clarify objects. The effect is performed in 2 ways, the first yields a frame rate divided by the number of added frames, while the other almost preserves the frame rate by using previous frames to output each sample. The output is of course not the same from the two methods. The filters functionality is exposed through both user and programming interfaces.

Filter Interface | ILMVAdd, ILMVAddDisp , ILMMCommon
Interface ID | IID_ILMVAdd, IID_ILMVAddDisp
Input/output Media Type | MEDIATYPE_Video
Filter CLSID | CLSID_LMVAdd
Property Page CLSID | CLSID_LMVAddPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVAdd.dll
Header | ILMVAdd.h

Platforms

Win32, x64

LEAD Video Add Filter User Interface


LEAD Video Add Filter User Interface

The LEAD Video Add filter brightens a frame by adding two or more frames. This filter is only suited to extremely dark images and can be used in such practical applications as astronomy or video surveillance. The property page is shown in the figure below:

The Add property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Preserve Frame Rate check box | If selected, use previous frames to enhance frame rate. The output is not exactly the same as when this check box is clear.
Average check box | Enables frame averaging.
Frames to Add spin edit box | Number of frames to add.
Factor of Frame drop-down list box and spin edit box | Indicates the usage factors of each frame (i.e. Factor [0] = 80% then 80 percent of the values in the first frame is used in the addition process).


ILMVAdd Interface

ILMVAdd Interface

Data types:

ADDATTRIBUTES:

typedef struct _ADDATTRIBUTES
{
BOOL bEnable;
BOOL bPreserveFrameRate;
BOOL bAverage;
INT nFrames;
INT nFactors[MAX_BUFFERS];
INT nCurFrame; /* internal use */
} ADDATTRIBUTES;

Describes addition attributes.

Member | Description
bEnable | TRUE to enable the effect.
bReserveFrameRate | TRUE to use previous frames to enhance frame rate, the output is not exactly the same as when setting this member to FALSE.
bAverage | TRUE to enable frame averaging
nFrames | Number of frames to add.
nFactors | Array of nFrames that contains the usage factors of each frame (i.e. nFactors[0] = 80% then 80 percent of the values in the first frame is used in the addition process).

Interface methods:

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT SetAddAttributes(ADDATTRIBUTES AddAttributes )

Parameters

AddAttributes

An ADDATTRIBUTES structure that contains properties to set.

Description

Sets the properties for the add effect. Attributes are set permanently and they can’t be canceled. If the filter is streaming, the effect will take place immediately.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetAddAttributes(ADDATTRIBUTES * pAddAttributes )

Parameters

pAddAttributes

A valid pointer to an ADDATTRIBUTES structure to be updated with the current settings.

Description

Retrieves the current addition attributes.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth | A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.
plInHeight | A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.
plOutWidth | A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.
plOutHeight | A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIOBitCount(int *pInBitCount, int *pOutBitCount)

Parameters

pInBitCount | A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.
pOutBitCount | A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Return

S_OK if successful, S_FALSE otherwise.


ILMVAddDisp Interface

ILMVAddDisp Interface

Properties:

Type | Name | Description
BOOL | Enable | TRUE to enable the effect.
BOOL | PreserveFrameRate | TRUE to use previous frames to enhance frame rate, the output is not exactly the same as when setting this member to FALSE.
BOOL | Average | TRUE to enable frame averaging.
int | Frames | Number of frames to add.
BOOL | IsLEADInputPinConnected | Read only; returns TRUE if the filter’s input pin is connected.
BOOL | IsLEADOutputPinConnected | Read only; returns TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.

Methods

HRESULT GetFrameFactor ( int index, int *pVal)

Parameters

index: | an integer variable that holds the frame index for which to get the factor.
pVal: | a valid pointer to an integer to be updated with the frame factor.

Description

Retrieves the factor of some frame in the currently active array of frames.

Returns

S_OK: Success.

E_POINTER: Invalid pointer passed.

E_INVALIDARG: Invalid parameter passed.

HRESULT SetFrameFactor ( int index, int newVal)

Parameters

index: | an integer variable that holds the frame index for which the factor is to be set.
newVal: | an integer variable that holds the new frame factor value.

Description

Sets the factor of some frame in the currently active array of frames.

Returns

S_OK: Success.

E_INVALIDARG: Invalid parameter passed.


LEAD Video Auto Contrast Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Auto Contrast Filter

The LEAD Video Auto Contrast filter performs color leveling at the luminance (grayscale) level, introducing no color cast. It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm.

Filter Interfaces | ILMVAutoCont , ILMMCommon
Interface ID | IID_ILMVAutoCont
Input/Output Media Types | MEDIATYPE_Video And the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVAutoCont
Property Page CLSID | CLSID_LMVAutoContPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVAutoCont.dll
Header | ILMVAutoCont.h

Platforms

Win32, x64

LEAD Video Auto Contrast User Interface


LEAD Video Auto Contrast Filter User Interface

LEAD Video Auto Contrast Filter User Interface

The LEAD Video Auto Contrast filter changes the contrast without changing colors (hue). It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm. The property page is shown in the figure below:

The Auto Contrast property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the auto contrast effect.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.decompressor before you can play (see) it.decompressor before you can play (see) it.decompressor before you can play (see) it.decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Also known as a decompressor, this is a module or algorithm to decompress data.


ILMVAutoCont Interface

ILMVAutoCont Interface

Properties:

Type | Name | Description
BOOL | EnableAutoCont | TRUE to enable the effect.


LEAD Video Auto Intensity Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Auto Intensity Filter

The LEAD Video Auto Intensity filter performs color leveling on the RGB channel (the sum of the R, G, and B channels), introducing no color cast.

It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm.

Filter Interfaces | ILMVAutoInt , ILMMCommon
Interface ID | IID_ILMVAutoInt
Input/Output Media Types | MEDIATYPE_Video And the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVAutoInt
Property Page CLSID | CLSID_LMVAutoIntPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVAutoInt.dll
Header | ILMVAutoInt.h

Platforms

Win32, x64

LEAD Video Auto Intensity User Interface


LEAD Video Auto Intensity Filter User Interface

LEAD Video Auto Intensity Filter

User Interface

The Auto Intensity Video filter performs color leveling on the RGB channel (the sum of the R, G, and B channels), without changing colors. It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm. The property page is shown in the figure below:

The Auto Intensity property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.


ILMVAutoInt Interface

ILMVAutoInt Interface

Properties:

Type | Name | Description
BOOL | EnableAutoInt | TRUE to enable the effect.


LEAD Video Auto Level Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Auto Level Filter

The LEAD Video Auto Level Filter performs color leveling on the individual R, G and B channels, treating each of the R, G and B channels as a separate entity, introducing no color cast.

It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm.

Filter Interfaces | ILMVAutoLvl , ILMMCommon
Interface ID | IID_ILMVAutoLvl
Input/Output Media Types | MEDIATYPE_Video And the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVAutoLvl
Property Page CLSID | CLSID_LMVAutoLvlPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVAutoLvl.dll
Header | ILMVAutoLvl.h

Platforms

Win32, x64

LEAD Video Auto Level User Interface


LEAD Video Auto Level Filter User Interface

LEAD Video Auto Level Filter

User Interface

The Auto Level Video filter performs color leveling on the individual R, G and B channels, treating each of the R, G and B channels as a separate entity, without changing colors. It makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the video stream. It also maximizes the tonal range of the image and enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm. The property page is shown in the figure below:

The Auto Level property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.decompressor before you can play (see) it.decompressor before you can play (see) it.decompressor before you can play (see) it.decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Also known as a decompressor, this is a module or algorithm to decompress data.


ILMVAutoLvl Interface

ILMVAutoLvl Interface

Properties:

Type | Name | Description
BOOL | EnableAutoLvl | TRUE to enable the effect.


LEAD Video EFX Brightness Filter

LEAD Video EFX Brightness Filter

This filter detects any object that moves and changes its intensity (brightness).

Filter Interface

ILMVBright

Interface ID

IID_ILMVBright

Input/Output Media Types

MEDIATYPE_Video

And the following subtypes:

MEDIASUBTYPE_RGB24

Filter CLSID

CLSID_LMVBright

Property Page CLSID

CLSID_LMVBrightPropertyPage

Filter category

DirectShow

Executable

LMVMtnFX.dll

Header

ILMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Brightness Filter User Interface


LEAD Video EFX Brightness Filter User Interface

LEAD Video EFX Brightness Filter

User Interface

The Brightness filter 'hides' moving objects. In places where there is movement, the brightness of the background changes allowing you to see that there is movement, but you can only guess what it is by the shape. The property page is shown in the figure below:

Use the Brightness property page to change the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandoning them by selecting Cancel. To display general information about a control, position the mouse pointer over it. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
First frame as reference check box | Enables or disables setting the first frame in every play session as the reference frame. If this is selected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie). If this is cleared, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.
Set current frame as reference button | Sets the current frame as the reference frame.
Threshold slider | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.
Brightness slider | The relative lightness or darkness of a color. Value range: -1000 to 1000.


ILMVBright Interface

ILMVBright Interface

Data types:

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

ILMVBright Interface

Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
VARIANT_BOOL | FirstFrameIsReference | Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).
Long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.
Long | Brightness | Value used to control the amount of the intensity. The intensity ranges from -1000 to 1000. A positive value increases (or lightens) the brightness of the bitmap image. A negative value decreases (or darkens) the brightness of the bitmap image.

Methods:

Method | Parameters | Description
SetReferenceFrame | byte* pBuffer, [in] long lRGBColor, [in] REFERENCE_FRAME opt | Sets the reference frame of the movie.
 |  | Parameters | Description
 |  | pBuffer | Buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
 |  | lRGBColor | Pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
 |  | Opt | Flag that controls the reference frame. Possible values are:
 |  |  | Value | Meaning
 |  |  | REF_USEBUFFER | only the pBuffer member is used.
 |  |  | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 |  |  | REF_USECOLOR | the lRGBColor parameter is used.


LEAD Video Callback Filter (2.0)

LEAD Video Callback Filter (2.0)

The LEAD Video Callback is an in-place filter, which will call a method on a user callback interface, each time it receives a frame. This can be used to manipulate the image data. For example, this callback filter provides the ability to use the LEADTOOLS toolkit to perform any image processing with just this one filter.

Filter Interface | ILMVCallback, ILMVUserCallback , ILMMCommon
Interface ID | IID_ILMVCallback
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_CallbackFilter
Property Page CLSID | CLSID_CallbackFilterPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVCalBk2.dll, DSKernel2.dll
Header | ILMVCallback2.h

You need to unlock the LEAD Video Callback Filter (2.0) to use it in RELEASE mode.

Platforms

Win32, x64

For more information, refer to:

Evaluation Mechanism Overview.


ILMVCallback Interface

ILMVCallback Interface

This is the interface for the LEAD Video Callback Filter.

Properties:

Type | Name | Description
VARIANT | InputPalette | [read-only] Use this property to read the input palette. This is valid only for videos that have an input palette (usually 8-bit). The variant is returned as an array of bytes (VT_ARRAY | VT_UI1).
VARIANT | OutputPalette | Use this property to view and change the output palette. Keep in mind that when you change the output palette, the output pin will attempt to reconnect. It is recommended you rebuild the graph after you change the output palette to avoid broken graphs. The variant should be an array of bytes (VT_ARRAY | VT_UI1).
double | CurrentPosition | [read-only] Use this property to get the position (in seconds) of the current sample passed to the callback. It is recommended you call this property to get the current position from inside ILMVUserCallback::ReceiveProc rather than trying to get the current position from the graph or LTMM object.
long | CurrentFramePosition | [read-only] Use this property to get the frame number of the current sample passed to the callback. It is recommended you call this property to get the current position from inside ILMVUserCallback::ReceiveProc rather than trying to get the current position from the graph or LTMM object.
VARIANT_BOOL | CallInSameThread | Enables or disables the calling of the CallbackProc notifications in the same thread that set the ReceiveProcObj property. The default value is VARIANT_TRUE. Possible values are:
 |  | Value | Meaning
 |  | VARIANT_TRUE | Call the notifications in the same thread that set the callback. This reduces the performance and requires the application to process messages, otherwise the callback will not get called. It is the default and is required for platforms that have problem with multithreading. VB 6.0 and dotnet applications should use this mode.
 |  | VARIANT_FALSE | Call the notifications in any thread of the process. Use this setting for best performance in platforms that can handle this. This is the recommended mode for C++ applications.

Interface Methods:

HRESULT put_ReceiveProcObj(IUnknown *pCallback)

Parameters

pCallback

a valid pointer to a user callback interface interface.

Description

(Write-only) Sets the callback object pointer.

If not NULL, the ReceiveProc method of this interface will be called with every audio buffer.

Set to NULL (or to "Nothing" in VB) if you do not wish to receive notifications anymore. (For example, before you delete (release) the callback object interface).

Return

S_OK if successful, S_FALSE otherwis.


ILMVUserCallback Interface

ILMVUserCallback Interface

The ILMVUserCallback interface is a user-defined interface. It must be registered by calling the put_ReceiveProcObj method of the ILMVCallback interface. This interface has one method.

Interface Methods:

HRESULT ReceiveProc (long pData, long lWidth, long lHeight, long lBitCount, long lSize, long bTopDown)

Parameters

pData | a valid pointer to the frame data, passed in a long variable.
lWidth | width of the frame
lHeight | height of the frame
lBitCount | bits per pixel of the frame
lSize | size of the frame buffer, in bytes
bTopDown | indicates whether the image in the passed buffer (pData) is top-down (1) or bottom-up (0).

Description

This method is called for each frame received by the Video Callback Filter. The user can modify each frame by making changes on the frame's data.

Return

After working on the frame data, this function can return one of the following values:

Value | Meaning
VDCALBK_ERR_OK | Success. the filter will continue normally be delivering the processed frame.
VDCALBK_ERR_DROP | Instructs the filter not to deliver the frame. The filter will drop the frame and continue normally with the next frame in the stream.
VDCALBK_ERR_DELIVERLASTFRAME | Instructs the filter to deliver the previous frame--the last one delivered. The filter saves the last frame it delivers downstream in case the user wants to deliver the same frame more than once.

Note for C/C++ users: you can simply cast pData to a pointer to unsigned char.

Note for .NET users: For more examples on how to use the frame data in .NET applications, look at the sample code from ILMAUserCallback2 Interface.

Note for .NET users: These callbacks are implemented in .NET as a function without a return value. In order to be able to return a value other than VDCALBK_ERR_OK from your app, you need to throw a HRESULT exception before returning from ReceiveProc. One way do do this is as in the following example:

public class ReturnValueException : Exception
{
public ReturnValueException(object HResultValue)
{
HResult = (int)HResultValue;
}
}

public class LEADCallbackPlay : LMVCallbackLib.ILMVUserCallback
{
public void ReceiveProc(int pData, int lWidth, int lHeight, int lBitCount, int lSize, int bTopDown)
{
' you need to throw an error only if you want to return anything other that VDCALBK_ERR_OK
' throw new ReturnValueException(LMVCallbackLib.VdCalBkErrConstants.VDCALBK_ERR_DROP);
}
}


LEAD Video Color Filter

LEAD Video Color Filter

The LEAD Video Color filter provides the ability to change some color attributes of the streaming video. The filter can change the video brightness, contrast, hue, and saturation, in addition to an invert colors option. The above changes can be applied to a selected area (rectangle) only by changing the "Effect Area" attributes in the property page or using SetCropAttributes from the programming interface.

Filter Interface | ILMVColor, ILMVColorDisp , ILMMCommon
Interface ID | IID_ILMVColor, IID_ILMVColorDisp
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVColor
Property Page CLSID | CLSID_LMVColorPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVClr.dll
Header | ILMVClr.h

Platforms

Win32, x64

LEAD Video Color Filter User Interface


LEAD Video Color Filter User Interface

The Color Video filter changes the video's brightness, contrast, hue, and saturation. These changes can be applied to a selected area (rectangle) by changing the "Effect Area" attributes in the property page. The property page is shown in the figure below:

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. To display general information about a control, position the mouse pointer over it. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Brightness slider | The relative lightness or darkness of a color. Value range: -100 to 100.
Contrast slider | Describes apparent difference in lightness between lighter and darker pixels. Value range: –100 to 100.
Hue slider | The color reflected from or transmitted through an object. Value range: -180 to 180.
Saturation slider | The strength or purity of a color. Value range: –100 to 100.
Invert check box | If selected, the colors will be inverted.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVColor Interface

ILMVColor Interface

Data types:

COLORATTRIBUTES:

typedef struct
{
BOOL bEnable;
long lBrightness;
long lContrast;
long lHue;
long lSaturation;
BOOL bInvert;
BOOL bDEnable;
long lDBrightness;
long lDContrast;
long lDHue;
long lDSaturation;
BOOL bDInvert;
} COLOR_ATTRIBUTES;

Describes color effects.

Member | Description
bEnable | TRUE to enable effects.
lBrightness | The relative lightness or darkness of a color. Value range: -100 to 100.
lContrast | Describes apparent difference in lightness between lighter and darker pixels. Value range: 100 to 100.
lHue | The color reflected from or transmitted through an object. Value range: -180 to 180.
lSaturation | The strength or purity of a color. Value range: 100 to 100.
bInvert | TRUE to invert colors.
bDEnabled | Default enable effects
lDBrightness | Default brightness value. Original default value is 10.
lDContrast | Default contrast value. Original default value is 0.
lDHue | Default Hue value. Original default value is 0.
lDSatuartion | Default Saturation value. Original default value is 0.
bDInvert | Default Invert value. Original default value is FALSE.

typedef struct
{
long lLeft;
long lTop;
long lRight;
long lBottom;
BOOL bEnabled;
long lDLeft;
long lDTop;
long lDRight;
long lDBottom;
BOOL bDEnabled;
} CROP_ATTRIBUTES;

Describes cropping area.

Member | Description
lLeft | The left coordinate of the cropped rectangle. The default value is 0.
lTop | The top coordinate of the cropped rectangle. The default value is 0.
lRight | The right coordinate of the cropped rectangle. The default value is 1.
lBottom | The bottom coordinate of the cropped rectangle. The default value is 1.
bEnabled | Flag that indicates whether to enable or disable affect area. Possible values are:
 | Value | Meaning
 | TRUE | Enable affect area.
 | FALSE | Disable affect area.
lDLeft | Default left.
lDTop | Default top.
lDRight | Default right.
lDBottom | Default bottom.
bDEnabled | Default effect area enable status

Interface Methods:

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT SetColorAttributes(COLOR_ATTRIBUTES color_attributes)

Parameters

color_attributes

a COLOR_ATTRIBUTES structure that contains color attributes to set.

Description

Sets the color attribute. Attributes are set permanently, cant be canceled, and if the filter is streaming, effect will take place immediately.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetColorAttributes(COLOR_ATTRIBUTES *color_attributes)

Parameters

color_attributes

a valid pointer to a COLOR_ATTRIBUTES structure to be updated with the current settings.

Description

Retrieves the current color attributes.

Return

S_OK if successful, S_FALSE other wise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth | A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.
plInHeight | A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.
plOutWidth | A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.
plOutHeight | A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Return

S_OK if successful, S_FALSE other wise.

HRESULT GetIOBitCount(int *pInBitCount, int *pOutBitCount)

Parameters

pInBitCount | A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.
pPBitCount | A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.


ILMVColorDisp Interface

ILMVColorDisp Interface

Interface Properties:

Type | Name | Description
BOOL | Enabled | TRUE to enable effects.
long | Brightness | The relative lightness or darkness of a color. Value range: -100 to 100.
long | Contrast | Describes apparent difference in lightness between lighter and darker pixels. Value range: –100 to 100.
long | Hue | The color reflected from or transmitted through an object. Value range: -180 to 180.
long | Saturation | The strength or purity of a color. Value range: –100 to 100.
BOOL | Invert | TRUE to invert colors.
BOOL | DefaultEnabled | Default enable effects.
long | DefaultBrightness | Default brightness value. Original default value is 10.
long | DefaultContrast | Default contrast value. Original default value is 0.
long | DefaultHue | Default Hue value. Original default value is 0.
long | DefaultSatuartion | Default Saturation value. Original default value is 0.
BOOL | DefaultInvert | Default Invert value. Original default value is FALSE.
long | Left | The left coordinate of the effect area rectangle.
long | Top | The top coordinate of the effect area rectangle.
long | Right | The right coordinate of the effect area rectangle.
long | Bottom | The bottom coordinate of the effect area rectangle.
BOOL | EffectAreaEnabled | Enables or disables area effect.
long | DefaultLeft | Default left. Original default value is 0.
long | DefaultTop | Default top. Original default value is 0.
long | DefaultRight | Default right. Original default value is 1.
long | DefaultBottom | Default bottom. Original default value is 1.
long | DefaultEffectAreaEnabled | Default enable effect area.
BOOL | IsLEADInputPinConnected | Read only; returns TRUE if the filter’s input pin is connected.
BOOL | IsLEADOutputPinConnected | Read only; returns TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.


LEAD Video Color Replacement Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Color Replacement Filter

The LEAD Video Color Replacement filter replaces a color with another color over the video stream. The filter uses the HSV color space.

Filter Interface | LMVColorRep , ILMMCommon
Interface ID | IID_ILMVColorRep
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVColorRep
Property Page CLSID | CLSID_LMVColorRepPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVClrRp.dll
Header | ColorRep.h

Platforms

Win32, x64

LEAD Video Color Replacement Filter User Interface


LEAD Video Color Replacement Filter User Interface

LEAD Video Color Replacement Filter

User Interface

The Color Replacement filter replaces any range of colors in a video stream with another range of colors. The effect uses the HSV color space. The property page is shown in the figure below:

Use the Color Replacement property page to change the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. To display general information about a control, position the mouse pointer over it. The following table shows the controls and their descriptions:

Control | Description
Enable Color Replacement check box | Enables/Disables the effect.
Start Color button (…) | Sets the start color in RGB format. This is the color that will be replaced.
Hue Range slider and edit box | Sets the color range.
Replace Color |
H slider and edit box | Sets the hue value for the replacement color.
S slider and edit box | Sets the saturation value for the replacement color.
V slider and edit box | Sets the brightness value for the replacement color.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.


ILMVColorRep Interface

ILMVColorRep Interface

Interface Properties:

Type | Name | Description
long | StartColor | Sets or gets the start color in RGB format. This is the color that will be replaced.
short | AngleRange | Sets or gets the color range.
short | EndColorHValue | Sets or gets the hue value for the replacement color.
short | EndColorSValue | Sets or gets the saturation value for the replacement color.
short | EndColorVValue | Sets or gets the brightness value for the replacement color.


LEAD Color Space Converter

LEAD Color Space Converter User Interface

The Color Space Converter can accept a variety of YUV and RGB formats and convert them to RGB and YUV. Currently, neither a user interface is available nor a programming interface.

It will perform automatic conversion from VideoInfo2 media type (which can contain non-square pixel aspect ratio information) to VideoInfo (which contains only square pixels). The conversion is done by resizing the video. If more advanced resizing or aspect ratio correction is needed, you can use the LEAD Video Resize filter .

This filter replaces the LEAD YUV Converter filter.

Filter Interface | None
Interface ID | None
Input/Output Media Types | MEDIATYPE_Video MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12 MEDIASUBTYPE_YVYU MEDIASUBTYPE_IYU2 MEDIASUBTYPE_IYU1 MEDIASUBTYPE_Y41P MEDIASUBTYPE_YVU9 MEDIASUBTYPE_IY41 MEDIASUBTYPE_IUYV MEDIASUBTYPE_I420 MEDIASUBTYPE_IYUV MEDIASUBTYPE_V210 MEDIASUBTYPE_v210 MEDIASUBTYPE_NV12 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_ARGB32 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555 MEDIASUBTYPE_ARGB1555 MEDIASUBTYPE_RGB8 MEDIASUBTYPE_RGB4 MEDIASUBTYPE_RGB1 MEDIASUBTYPE_LGRY
Filter CLSID | CLSID_LMVConvYUV
Property Page CLSID | None
Filter category | CLSID_LegacyAmFilterCategory
Executable | LMVYUVxf.dll
Header | None

For more information on the various YUV formats, please consult the Microsoft documentation or web sites such as http://www.fourcc.org.

Platforms

Win32, x64


LEAD Video Crop Filter (2.0)

LEAD Video Crop Filter (2.0)

The LEAD Video Crop filter is used to extract areas from a source movie, a graphical representation is provided to show and modify the desired rectangle position and size. The cropped rectangle can be as small as 1x1. The filter's functionality is exposed through both user and programming interfaces.

Filter Interface | ILMMCommon
Interface ID | IID_ILMVCrop
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVCrop
Property Page CLSID | CLSID_LMVCropPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVCrop2.dll, DSKernel2.dll
Header | ILMVCrop2.h

Platforms

Win32, x64

LEAD Video Crop Filter User Interface (2.0)

This filter is included as part of the following modules:

LEADTOOLS DVD Module for API

LEADTOOLS Video Streaming Module for API

LEADTOOLS DVD Module for COM

LEADTOOLS Video Streaming Module for COM


LEAD Video Crop Filter User Interface (2.0)

The Crop Video filter lets you play, capture or convert only a specific rectangular area within the video. The cropped rectangle can be as small as 1x1. The property page is shown in the following figure:

Changes will be applied directly to the streaming media by selecting Apply or OK, or abandoned by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Normal Radio Button | The filter operates the default way.
Outline Radio Button | Highlight the cropping area with a rectangle.
Auto Radio Button | The filter automatically detects the cropping coordinates.
Left spin edit box | The left coordinate of the cropped rectangle.
Top spin edit box | The top coordinate of the cropped rectangle.
Right spin edit box | The right coordinate of the cropped rectangle.
Bottom spin edit box | The bottom coordinate of the cropped rectangle.
Automatically Stop check box | If selected, allows stopping of the graph automatically. This is needed when the dimensions change while the graph is running. You must re-run the graph after the change is applied.


ILMVCrop Interface

ILMVCrop Interface

This is the interface for the LEAD Video Crop Filter.

typedef enum eCROP_MODE
{
CROP_MODE_NORMAL = 0,
CROP_MODE_OUTLINE,
CROP_MODE_AUTO,
}CROP_MODE

Hold Cropping mode

Constant | Description
CROP_MODE_NORMAL | The filter operates the default way.
CROP_MODE_OUTLINE | Highlight the cropping area with a rectangle.
CROP_MODE_AUTO | The filter automatically detects the cropping coordinates.

Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Set to VARIANT_TRUE to enable Cropping.
long | Left | The left coordinate of the cropped rectangle.
long | Top | The top coordinate of the cropped rectangle.
long | Right | The right coordinate of the cropped rectangle.
long | Bottom | The bottom coordinate of the cropped rectangle.
VARIANT_BOOL | AutoStop | If VARIANT_TRUE, allows stopping the graph automatically, this is needed when the dimensions change while the graph is running. You need to re-run the graph after the change is applied.
VARIANT_BOOL | IsLEADInputPinConnected | Read only; returns VARIANT_TRUE if the filter’s input pin is connected.
VARIANT_BOOL | IsLEADOutputPinConnected | Read only; returns VARIANT_TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.
CROP_MODE | CroppingMode | Set the Cropping mode, the cropping mode is one of the CROP_MODE values
VARIANT_BOOL | ChangeSettings | Set to VARIANT_TRUE to start setting the cropping attributes, the new settings will take effect when setting the ChangeSettings property to VARIANT_FALSE.

Interface Methods:

HRESULT ResetToDefaults ()

Parameters

None.

Description

Reset the crop filter values to defaults values.

Returns

S_OK if connected, S_FALSE otherwise.


LEAD Video Deblocking Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Deblocking Filter

The LEAD Video Deblocking filter is a DirectShow transform filter that performs deblocking on a video stream. The deblocking is applied to raw RGB data and is not related to a specific decoder output. The filter accepts block size and first block offset parameters to deblocking paths and the beginning of the blocked area. If the block size and first block offset do not match the blocks in the passed video sample, the filter is not expected to give satisfactory results. Two algorithms are currently offered to perform deblocking, 2-Lines and 4-Lines. The filter exposes its functionality through both user and programming interfaces.

Filter Interface | ILMVDeblock , ILMMCommon
Interface ID | IID_ILMVDeblock
Input/Output Media Types | MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 This filter does not change the passing media types.
Filter CLSID | CLSID_LMVDeblock
Property Page CLSID | CLSID_LMVDeblockPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVDblck.dll
Header | ILMVDblck.h

Platforms

Win32, x64

LEAD Video Deblocking Filter User Interface


LEAD Video Deblocking Filter User Interface

The Deblocking Video filter smoothes edges and removes the blocky artifacts present in highly compressed MJPEG or MPEG movies. This effect is extremely useful for improving movies created by digital cameras that create highly compressed, small video clips. Two algorithms are currently offered to perform deblocking, 2-Lines and 4-Lines. The property page is shown in the figure below:

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Deblocking Algorithm drop-down list box

Sets one of the supported deblocking algorithms offered by this filter.

First block offset group

X spin edit box

Offset from the beginning of the sample buffer to the actual (desired) horizontal start. Default value is zero.

Y spin edit box

Offset from the beginning of the sample buffer to the actual (desired) vertical start. Default value is zero.

Block size group

Width spin edit box

The expected block width in the passing stream. Possible values range from 2 to half of the passing sample width. If the filter input pin is not connected, the filter assumes dimensions of 1600 X 1600. For any value below the lower limit, a minimum value of 2 will be used. For any value beyond the upper limit, the maximum possible value will be used. Default value is 8.

Height spin edit box

The expected block height in the passing stream. Possible values range from 2 to half of the passing sample height. If the filter input pin is not connected, the filter assumes dimensions of 1600 X 1600. For any value below the lower limit, a minimum value of 2 will be used. For any value beyond the upper limit, the maximum possible value will be used. Default value is 8.

Edge threshold slider

The threshold is used to preserve hard edges in the image. If the edge in the video sample is greater than the threshold, then it will be preserved, otherwise it is smoothed. A value of 0 preserves all the edges in the original video sample, while a value of 255 will smooth all the edges. Modify the Threshold value if you want to preserve some edges. If you do not wish to preserve any edges, set Edge threshold to 255. This control is only used if the Deblock Algorithm is Four Line.


ILMVDeblock Interface

ILMVDeblock Interface

Data Types

This filter has no specific data types, but offers the following enumeration for use with its programming interface:

enum DEBLOCKMETHOD
{
DEBLOCK_TWOLINES = 0,
DEBLOCK_FOURLINES
};

Describes the deblocking algorithms.

Interface Properties

Type | Name | Description
VARIANT_BOOL | Enabled | Enable/Disable Deblocking. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | DeblockAlgorithm | One of the supported deblocking algorithms offered by this filter. Possible values are: DEBLOCK_TWOLINES, or DEBLOCK_FOURLINES
long | BlockWidth | The expected block width in the passing stream. Possible values range from 2 to half of the passing sample width. If the filter input pin is not connected, the filter assumes dimensions of 1600 X 1600. For any value below the lower limit, a minimum value of 2 will be used. For any value beyond the upper limit, the maximum possible value will be used. Default value is 8.
long | BlockHeight | The expected block height in the passing stream. Possible values range from 2 to half of the passing sample height. If the filter input pin is not connected, the filter assumes dimensions of 1600 X 1600. For any value below the lower limit, a minimum value of 2 will be used. For any value beyond the upper limit, the maximum possible value will be used. Default value is 8.
long | HorizontalOffset | Offset from the beginning of the sample buffer to the actual (desired) horizontal start. Default value is zero.
long | VerticalOffset | Offset from the beginning of the sample buffer to the actual (desired) vertical start. Default value is zero.
BYTE | EdgeThreshold | The threshold is used to preserve hard edges in the image. If the edge in the video sample is greater than the threshold, then it will be preserved, otherwise it is smoothed. A value of 0 preserves all the edges in the original video sample, while a value of 255 will smooth all the edges. Modify the Threshold value if you want to preserve some edges. If you do not wish to preserve any edges, set EdgeThreshold to 255. This property is only used if the DeblockAlgorithm property is DEBLOCK_FOURLINES. If the DeblockAlgorithm is DEBLOCK_TWOLINES, the EdgeThreshold property is ignored.
VARIANT_BOOL | IsLEADInputPinConnected | Read only. Gets the filters input pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.
VARIANT_BOOL | IsLEADOutputPinConnected | Read only. Gets the filters output pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.
long | InWidth | Read only. Gets the input video stream width in pixels. Should hold the same value as the OutWidth property.
long | InHeight | Read only. Gets the input video stream height in pixels. Should hold the same value as the OutHeight property.
long | OutWidth | Read only. Gets the output video stream width in pixels. Should hold the same value as the InWidth property.
long | OutHeight | Read only. Gets the output video stream height in pixels. Should hold the same value as the InHeight property.
long | InBits | Read only. Gets the input video stream bits per pixel. Should hold the same value as the OutBits property.
long | OutBits | Read only. Gets the input video stream bits per pixel. Should hold the same value as the InBits property.


LEAD Video Deinterlace Filter (2.0)

LEAD Video Deinterlace Filter (2.0)

The LEAD Video Deinterlace filter converts interlaced video to make it a progressive scan video.

Analog, interlaced video is what devices like VCRs, laserdiscs, and game consoles output.

Filter Interface | ILMVDeinterlace , ILMMCommon
Interface ID | IID_ILMVDeinterlace
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVDeinterlace
Property Page CLSID | CLSID_LMVDeinterlacePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVDeitr2.dll, DSKernel2.dll
Header | ILMVDeinterlace2.h

Platforms

Win32, x64

LEAD Video Deinterlace Filter User Interface

This filter is included as part of the following modules:

EADTOOLS DVD Module for API

LEADTOOLS Video Streaming Module for API

LEADTOOLS DVD Module for COM

LEADTOOLS Video Streaming Module for COM


LEAD Video Deinterlace Filter User Interface (2.0)

The Deinterlace Video filter removes the interlaced effect present in video captured from devices such as DV camcorders. The Deinterlace filter property pages provide a user interface for changing the filter's attributes. There is an "Auto Deinterlace" option which will check the video for interlacing and apply deinterlacing only if necessary. The Deinterlace Settings page is shown in the following figure:

The ROI Settings page provides a user interface for changing Region Of Interest attributes and is shown in the figure below:

The Import/Export settings page provides a user interface to import and export the deinterlace settings and is shown in the figure below:

Changes will be applied directly to the streaming media by selecting Apply or OK, or abandoning changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Deinterlace Settings Page

Enable Deinterlace check box

Enables or disables deinterlacing. If this box is cleared (Disabled), all other controls will be disabled and the current values for those controls will have no effect.

Start with even lines check box

Indicates which line to begin processing in the incoming frame. If this is selected, the filter starts processing the incoming frame from the first even line, line 0. If the box is cleared, it starts processing the incoming frame at line 1. Line numbers are relative to the first line of the Region of Interest. If the "top" of the ROI is at line 100, then line 0 for processing is actually line 100 and line 1 for processing is actually line 101.

Merge Fields check box

Indicates whether to merge even and odd fields into a single frame.

Double frame rate check box

Indicates whether to output frames at twice the input rate. If this box is selected, the filter outputs 2 frames for each incoming frame, making the output frame rate of the filter double the input frame rate. The filter does this by deinterlacing the incoming frame twice, first using even lines, and second using odd lines.

Start with even frame check box

Indicates whether to start doubling the frame rate from the first even frame, frame zero. If this box is selected, and the Double frame rate box is selected, the filter will start doubling the frame rate from the first even frame, frame 0.

Global Pattern Controls:

Enable check box

Enables or disables deinterlacing. If this box is selected, a deinterlacing pattern is applied to all frames in the stream, unless a frame is in a segment. If a frame is in a segment, then the frame will be deinterlaced according to the segment settings.

Preamble edit box

Specifies the number of preamble edit frames in the global pattern. The preamble frames are a group of frames at the beginning of the stream that can be either deinterlaced, or passed untouched, according to the preamble "Deinterlace" and "No Deinterlace" radio buttons.

Deinterlace/No Deinterlace radio buttons

Specify whether to deinterlace the preamble frames.

No Deinterlace edit box

Specifies the number of preamble frames that will pass untouched.

Deinterlace edit box

Specifies the number of preamble frames that will be deinterlaced, following the "No Deinterlace" frames.

Segments controls:

Time Format drop-down list box

Used to select the time format for segments. Two options are available: the time format in the form HH:MM:SS:mS, and the frame format which is actually a frame position with respect to the start of the stream (zero).

Segments list

Lists the currently added segments using the selected time format.

Add Segment / Remove Segment buttons

The "Add Segment" button adds a new segment to the list, either above the currently selected segment, or to the end.

The "Remove Segment" deletes the selected segment from the list.

Up and Down buttons

Use the "Up" and "Down" buttons to change the order of segments in the list. The filter will not verify the segments’ times with respect to previous and next segment.

Segment Start Time / Segment Start Frame edit boxes

Used to specify the segment start position; either in time or frames, based on the value in the Time Format drop-down list box.

Segment Operation radio buttons

Specify the segment operation mode.

No Deinterlace: Pass all frames in the selected segment untouched.

Deinterlace: Deinterlace all frames in the selected segment.

Deinterlace Pattern: Deinterlace frames in the selected segment according to the defined pattern of the segment.

Segment Pattern options

Used to specify the selected segment's deinterlacing pattern.

ROI Settings Page

Enable check box

Enables or disables a region of interest. If this box is selected, a region of interest is enabled, to which deinterlacing will be applied. All pixels outside the defined ROI are passed untouched.

If the Deinterlace box on the Deinterlace Settings Page is cleared, then enabling the ROI has no effect.

ROI boundaries edit boxes

The "Left", "Right", "Top", and "Bottom" edit boxes define the boundaries of the ROI, in pixels.

The "Left" range: 0 to "Right" – 1.

The "Right" range: "Left" + 1 to video width.

The "Top" range: 0 to "Bottom" – 1.

The "Bottom" range: "Top" + 1 to video height.

Enable Protected Area check box

Enables or disables the protected area settings. The protected area, defined by its four boundaries, is an area that will be excluded from deinterlacing. The protected area is independent of the ROI, and each area can have any settings within the allowed range.

Protected Area boundaries edit boxes

The "Left", "Right", "Top", and "Bottom" edit boxes define the boundaries of the protected area, in pixels.

The "Left" range: 0 to "Right" – 1.

The "Right" range: "Left" + 1 to video width.

The "Top" range: 0 to "Bottom" – 1.

The "Bottom" range: "Top" + 1 to video height.

Import/Export settings page

Import button | Select to import the Deinterlace settings from a file.
Export button | Select to export the Deinterlace setting to a file.


ILMVDeinterlace Interface

ILMVDeinterlace Interface

This is the interface for the LEAD Video Deinterlace Filter.

Data types:

SEGMENT_OPERATION_MODE:

typedef enum SEGMENT_OPERATION_MODE
{
MODE_NO_DEINTERLACE = 0,
MODE_DEINTERLACE_ALL,
MODE_ DEINTERLACE_PATTERN,
}SEGMENT_OPERATION_MODE

The SEGMENT_OPERATION_MODE constants describe how segment frames will be processed.

Member | Description
MODE_NO_DEINTERLACE | Do not deinterlace any frame in the segment.
MODE_DEINTERLACE_ALL | Deinterlace all frames in the segment.
MODE_ DEINTERLACE_PATTERN | Deinterlacing pattern is used. A frame will be deinterlaced if it lies in a deinterlace section in the pattern.

SEGMENT_TIME_FORMAT:

typedef enum sSEGMENT_TIME_FORMAT
{
SEGMENT_TIME_FORMAT_FRAME = 0,
SEGMENT_TIME_FORMAT_TIME,
}SEGMENT_TIME_FORMAT

The SEGMENT_TIME_FORMAT constants describe the time format used for all segments.

Member | Description
SEGMENT_TIME_FORMAT_FRAME | Segment time format is frames. Frame numbering is zero-based and begins at the start of the stream.
SEGMENT_TIME_FORMAT_TIME | Segment time format is time, defined as hours, minutes, seconds, and milliseconds.

Properties:

Type

Name

Description

BOOL

Enabled

Indicates whether deinterlacing is enabled (TRUE) or not (FALSE).

BOOL

Even

Indicates whether to start with even lines (TRUE) or odd lines (FALSE).

BOOL

MergeFields

Indicates whether to use merge even and odd fields into a single frame.

BOOL

DoubleFrameRate

Indicates whether to double the output frame rate (TRUE) or not (FALSE). Currently, setting this property to TRUE overrides the pattern and segments settings, effectively ignoring all pattern and segment settings.

BOOL

StartWithEvenFrame

Indicates whether to start with an even frame (TRUE) or an odd frame (FALSE) when the DoubleFrameRate property is set to TRUE.

BOOL

IsLEADInputPinConnected

Read only; returns TRUE if the filters input pin is connected.

BOOL

IsLEADOutputPinConnected

Read only; returns TRUE if the filters output pin is connected.

long

InWidth

Read only; the input stream width.

long

InHeight

Read only; the input stream height.

long

OutWidth

Read only; the output stream width.

long

OutHeight

Read only; the output stream height.

long

InBits

Read only; the input stream bits per pixel.

long

OutBits

Read only; the output stream bits per pixel.

VARIANT_BOOL

EnableROI

Enables or disables the Region Of Interest. When an ROI is defined, the filter acts only on it, ignoring all pixels outside the region. Currently, the region is a rectangle defined by the ROILeft, ROITop, ROIRight and ROIBottom properties.

long

ROILeft

The left boundary of the ROI rectangle.

long

ROITop

The top boundary of the ROI rectangle.

long

ROIRight

The right boundary of the ROI rectangle.

long

ROIBottom

The bottom boundary of the ROI rectangle.

long

EnableGlobalPattern

Enables or disables the global deinterlacing pattern. The global pattern affects all the frames in the stream. With patterns, either global or segment specific, you can define what frames will be deinterlaced or ignored.

The pattern is defined using 3 parameters:

1.The preamble frames: a group of frames at the beginning of the stream or segment. You can choose whether the preamble frames will be deinterlaced.

2.No-Deinterlace frames: a group of frames, following the preamble frames, that will be ignored. No deinterlacing is applied.

3.Deinterlace frames: a group of frames, following the No-Deinterlace frames, that will be deinterlaced.

SEGMENT_TIME_FORMAT

SegmentsTimeFormat

Value that specifies the time format used to define segments. Possible values are:

SEGMENT_TIME_FORMAT_FRAME: The time format is Frames, which is zero based.

SEGMENT_TIME_FORMAT_TIME: The time format is Time, defined by hours, minutes, seconds, and milliseconds. The time of the first frame is zero (all fields).

long

SegmentsCount

(Read only) This property is updated with the number of available segments.

VARIANT_BOOL

EnableProtectedArea

Enables or disables the protected area. The protected area, a rectangle, is defined by its 4 boundaries, and is an area that will be excluded from deinterlacing. The protected area is independent of the ROI and the 2 regions can have any settings in the allowed range.

VARIANT_BOOL

AutoDeinterlace

Enable/Disable the auto deinterlace option. This will automatically deinterlace frames that need deinterlacing.

Interface methods:

HRESULT ResetToDefaults()

Reset all the Deinterlace options to the default values.

HRESULT SetGlobalPattern(long PreambleFrames, long NoDeinterlaceFrames, long DeinterlaceFrames VARIANT_BOOL DeintPreamble)

Parameters

PreambleFrames | The number of preamble frames of the global pattern.
NoDeinterlaceFrames | The number of No-Deinterlace frames of the global pattern.
DeinterlaceFrames | The number of Deinterlace frames of the global pattern.
DeintPreamble | A Boolean value that indicates whether to deinterlace the preamble frames (TRUE) or not (FALSE).

Description

Sets the global pattern parameters.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetGlobalPattern(long* pPreambleFrames,long * pNoDeinterlaceFrames, long *pDeinterlaceFrames, VARIANT_BOOL *pDeintPreamble)

Parameters

pPreambleFrames | Pointer to a variable that will receive the number of preamble frames of the global pattern.
pNoDeinterlaceFrames | Pointer to a variable that will receive the number of No-Deinterlace frames of the global pattern.
pDeinterlaceFrames | Pointer to a variable that will receive the number of Deinterlace frames of the global pattern.
pDeintPreamble | Pointer to a variable that will receive the state of preamble frames deinterlacing; TRUE indicates that the preamble frames will be deinterlaced, and FALSE indicates that the preamble frames will not be deinterlaced (passed untouched).

Description

Retrieves the global pattern parameters.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT AddSegment(long Index);

Parameters

Index

Index of the segment before which the new segment will be added. Valid indexes range from zero to SegmentsCount - 1. If an invalid index is passed, the segment will be added to the end of the list.

Description

Adds a new segment before the segment at the specified index.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT RemoveSegment(long Index);

Parameters

Index

Index of the segment to remove.

Description

Removes the segment at the specified index.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetSegmentData(long Index, long SegmentData)

Parameters

Index | The zero based index of the segment for which to set the data.
SegmentData | A 4-byte chunk of user data. The saved user data can be retrieved using the GetSegmentData method.

Description

Attaches a 4-bytes user data to the segment whose index is passed.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetSegmentData(long Index, long *pSegmentData)

Parameters

Index | The zero based index of the segment.
pSegmentData | Pointer to a variable that will receive the user data saved using SetSegmentData, or zero if no data was attached to the segment.

Description

Retrieves the user data attached to the segment whose index is passed.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetSegmentStartTime(long Index, long *pHours, long *pSeconds, long *pMinutes, long *pMilliSeconds)

Parameters

Index | The zero based index of the segment.
pHour | Pointer to a variable that will receive the hours portion of the segment start time.
pMinutes | Pointer to a variable that will receive the minutes portion of the segment start time.
pSeconds | Pointer to a variable that will receive the seconds portion of the segment start time.
pMilliSeconds | Pointer to a variable that will receive the milliseconds portion of the segment start time.

Description

Retrieves the start time of the segment whose index is passed. If the segments time format is not SEGMENT_TIME_FORMAT_TIME, then the provided values are undefined.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetSegmentStartTime(long Index, long Hours, long Seconds, long Minutes,long MilliSeconds)

Parameters

Index | The zero based index of the segment for which to set the start time.
Hour | The hours portion of the segment start time.
Minutes | The minutes portion of the segment start time. Valid values range from 0 to 59.
Seconds | The sconds portion of the segment start time. Valid values range from 0 to 59.
MilliSeconds | The milliseconds portion of the segment start time. Valid values range from 0 to 999.

Description

Sets the start time for the segment at the specified index. If the SegmentsTimeFormat property is not SEGMENT_TIME_FORMAT_TIME, then changing the start time will not have any effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetSegmentStartFrame(long Index,LONGLONG *pStartFrame)

Parameters

Index | The zero based index of the segment.
pllStartFrame | Pointer to a variable that will receive the position of the first frame in the segment. Zero based frame counting from the start of the stream, is used.

Description

Retrieves the position of the first frame in the segment. If the SegmentsTimeFormat property is not SEGMENT_TIME_FORMAT_FRAME, then the provided value is undefined.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetSegmentStartFrame(long Index, LONGLONG StartFrame)

Parameters

Index | The zero based index of the segment.
StartFrame | The position of the first frame in the segment. Frame numbering is zero-based and starts at the beginning of the stream.

Description

Sets the position of the first frame in the segment. If the SegmentsTimeFormat property is not SEGMENT_TIME_FORMAT_FRAME, then changing the start frame will not have any effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetSegmentOperationMode(long Index, SEGMENT_OPERATION_MODE *pOperationMode)

Parameters

Index | The zero based index of the segment.
pOperationMode | Pointer to a value that will receive the currently used segment operation mode. Possible values are:
 | Mode | Description
 | MODE_NO_DEINTERLACE | No frame in the segment will be deinterlaced.
 | MODE_DEINTERLACE_ALL | All frames in the segment will be deinterlaced.
 | MODE_DEINTERLACE_PATTERN | Deinterlace according to a pattern. A frame will be deinterlaced if it lies in a deinterlace section in the pattern.

Description

Gets the operation mode of the segment whose index is passed.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetSegmentOperationMode(long Index, SEGMENT_OPERATION_MODE OperationMode)

Parameters

Index | The zero based index of the segment.
OperationMode | The operation mode to set. Possible values are:
 | Mode | Description
 | MODE_NO_DEINTERLACE | Do not interlace any frame in the segment.
 | MODE_DEINTERLACE_ALL | Deinterlace all frames in the segment.
 | MODE_DEINTERLACE_PATTERN | Deinterlace according to a pattern. A frame will be deinterlaced if it lies in a deinterlace section in the pattern being used.

Description

Gets the operation mode of the segment at the specified index.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetSegmentPattern(long Index, long* pPreambleFrames, long * pNoDeinterlaceFrames, long *pDeinterlaceFrames, VARIANT_BOOL *pDeintPreamble)

Parameters

Index | The zero based index of the segment.
pPreambleFrames | Pointer to a variable that will receive the number of preamble frames of the segment's pattern.
pNoDeinterlaceFrames | Pointer to a variable that will receive the number of No-Deinterlace frames of the segment's pattern.
pDeinterlaceFrames | Pointer to a variable that will receive the number of Deinterlace frames of the segment's pattern.
*pDeintPreamble | Pointer to a variable that will receive the state of preamble frames deinterlacing; TRUE indicates that the preamble frames will be deinterlaced, and FALSE indicates that the preamble frames will not be deinterlaced (passed untouched).

Description

Retrieves the segment pattern parameters.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetSegmentPattern(long Index, long PreambleFrames, long NoDeinterlaceFrames, long DeinterlaceFrames, VARIANT_BOOL DeintPreamble)

Parameters

PreambleFrames | The number of preamble frames in the segment pattern.
NoDeinterlaceFrames | The number of No-Deinterlace frames in the segment pattern.
DeinterlaceFrames | The number of Deinterlace frames in the segment pattern.
DeintPreamble | A Boolean value that indicates whether to deinterlace the preamble frames (TRUE) or not (FALSE).

Description

Sets the segment pattern parameters.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetProtectedAreaParams(long *Left, long *Right, long *Top, long *Bottom)

Parameters

Left | Pointer to a variable to be updated with the left boundary of the protected area. The possible range for the left boundary is from zero to the right boundary minus one.
Right | Pointer to a variable to be updated with the right boundary of the protected area. The possible range for the right boundary is from the left boundary plus one to the current video width.
Top | Pointer to a variable that will receive the top boundary of the protected area. The possible range for the top boundary is from zero to the bottom boundary minus one.
Bottom | Pointer to a variable that will receive the bottom boundary of the protected area. The possible range for the bottom boundary is from the top boundary plus one to the current video height.

Description

Retrieves the protected area boundaries.

Returns

S_OK if successful, an error code otherwise.

HRESULT SetProtectedAreaParams(long Left, long Right, long Top, long Bottom)

Parameters

Left | Value that represents the left boundary of the protected area. The possible range for the left boundary is from zero to the right boundary minus one. Use -1 to keep the current left boundary value.
Right | Value that represents the right boundary of the protected area. The possible range for the right boundary is from the left boundary plus one to the current video width. Use -1 to keep the current right boundary value.
Top | Value that represents the top boundary of the protected area. The possible range for the top boundary is from zero to the bottom boundary minus one. Use -1 to keep the current top boundary value.
Bottom | Value that represents the bottom boundary of the protected area. The possible range for the bottom boundary is from the top boundary plus one to the current video height. Use -1 to keep the current bottom boundary value.

Description

Sets the protected area boundaries. If the protected area is not enabled when this method is called, the new boundaries will be set and will take effect the next time the protected area is enabled.

Returns

S_OK if successful, an error code otherwise.


LEAD Video Dynamic Rate Control Filter

Also known as a decoder, this is a module or algorithm to decompress data

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Dynamic Rate Control Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

The LEAD Video Dynamic Rate Control filter provides the ability to change the playback rate of the passing video stream .

Filter Interface | ILMVDynRateCtrl , ILMMCommon
Interface ID | IID_ILMVDynRateCtrl
Input/Output Media Types | This filter accepts any video of type MEDIATYPE_Video , with format FORMAT_VideoInfo . Any temporally compressed video will not be accepted.
Filter CLSID | CLSID_LMVDynRateCtrl
Property Page CLSID | CLSID_LMVDynRateCtrlPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVDynRateCtrl.dll, DSKernel2.dll
Header | ILMVDynRateCtrl.h

Platforms

Win32, x64

LEAD Video Dynamic Rate Control Filter User Interface

This filter is included as part of the following modules:

LEADTOOLS DVD Module for API

LEADTOOLS Video Streaming Module for API

LEADTOOLS DVD Module for COM

LEADTOOLS Video Streaming Module for COM


LEAD Video Dynamic Rate Control Filter User Interface

The Dynamic Rate Control Filter changes the relative playback rate of the video stream . This filter is similar to the LEAD Video Frame Rate Controller Filter, but determines the playback rate by manipulating the downstream sample times. The property page is shown in the following figure:

The Dynamic Rate Control Filter property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or abandoning changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control.

In addition to the ability to enable/disable the dynamic playback rate control feature, the property page provides a edit box in which you may manually enter the desired playback rate. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the filter. If disabled, the filter passes the video stream as is, without changing the playback rate.
Dynamic rate slider control | Allows a playback rate from .01x to 10x to be selected by dragging the slider control to the desired playback rate setting.
Dynamic rate edit box control | This edit box will be enabled only if the Enable checkbox is selected. Possible values range from 0.01 to 10.0.


ILMVDynRateCtrl Interface

ILMVDynRateCtrl Interface

This is the interface for the LEAD Video Dynamic Rate Control Filter .

Data types:

LMVDynRate_APILEVEL:

typedef enum LMVDynRate_APILEVEL
{
LMVDynRate_APILEVEL_1 = 0
} LMVDynRate_APILEVEL

The LMVDynRate_APILEVEL enumeration type describes API version levels for this filter's default settings.

Member | Description
LMVDynRate_APILEVEL_1 | API Version 1 defaults. Enabled=TRUE, Rate=1.0

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enable | Set to VARIANT_TRUE to enable the filter. If set to VARIANT_FALSE, the filter will pass the video stream as is, without changing the frame rate.
double | Rate | Sets or gets the dynamic playback rate, relative to input sample times. Eg. 1.0 = 1x (orginal input stream playback rate), .5 = 1/2x (half as fast as original input rate), 2.0 = 2x (twice as fast as original input rate)

Methods:

HRESULT ResetToDefaultsEx( LMVDynRate_APILEVEL ApiLevel )

Description:

Resets the filter properties to their default values based on the API Level version passed.

Comments:

The method will fail if the filter is in the running state.

Returns:

S_OK | Success
VFW_E_WRONG_STATE | The filter is in the wrong state.


LEAD Video Edge Enhance Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Edge Enhance Filter

The LEAD Video Edge Enhance filter is a DirectShow transform filter that performs edge enhancement on a video stream. The filter exposes its functionality through both user and programming interfaces.

Filter Interface | ILMVEdgEnh , ILMMCommon
Interface ID | IID_ILMVEdgEnh
Input/Output Media Types | MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 This filter does not change the passing media types.
Filter CLSID | CLSID_LMVEdgEnh
Property Page CLSID | CLSID_LMVEdgEnhPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVEdgEnh.dll
Header | ILMVEdgEnh.h

Platforms

Win32, x64

LEAD Video Edge Enhance Filter User Interface


LEAD Video Edge Enhance Filter User Interface

LEAD Video Edge Enhance Filter

User Interface

The Edge Enhance Video filter improves the quality of movies that look "washed out". The Edge Enhance Video Effect is similar to the Unsharp Mask Video Effect, but much faster. The property page is shown in the figure below:

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
The “Enable” check box | Enables/Disables the effect.
The “Enable multiplier” check box and the Multiplier spin | Enables/Disables the use of the multiplier. If un-checked, the filter will not apply a multiplication factor to the edge-enhanced samples. Possible values of the multiplication factor range from 50 to 1000.


ILMVEdgEnh Interface

ILMVEdgEnh Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables Edge Enhance effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
VARIANT_BOOL | EnableMultiplier | Enables or disables the use of the Multiplier property. If set to VARIANT_FALSE, the filter will not apply a multiplication factor to the edge-enhanced samples.
long | Multiplier | Gets or sets the multiplication factor value. This has the effect of changing the amount of light (brightness) in the enhanced image; increasing the Multiplier value will increase the brightness. Possible values range from 50 to 1000. Each unit represents one hundredth of the actually applied factor, i.e. the actual range is between 0.5 and 10.0. A value of 100 will have no effect and is equivalent to setting the EnableMultiplier property to VARIANT_FALSE. For any value below the lower limit, a minimum value of 50 will be used, and for any value beyond the upper limit, a maximum value of 1000 will be used.
VARIANT_BOOL | IsLEADInputPinConnected | Read only. Gets the filter’s input pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.
VARIANT_BOOL | IsLEADOutputPinConnected | Read only. Gets the filter’s output pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.
Long | InWidth | Read only. Gets the input video stream width in pixels. Should hold the same value as the OutWidth property.
Long | InHeight | Read only. Gets the input video stream height in pixels. Should hold the same value as the OutHeight property.
Long | OutWidth | Read only. Gets the output video stream width in pixels. Should hold the same value as the InWidth property"x-text-underline: normal; /*begin!kadov{{*/ text-decoration: underline; /*}}end!kadov*/ ">.
Long | OutHeight | Read only. Gets the output video stream height in pixels. Should hold the same value as the InHeight property.
Long | InBits | Read only. Gets the input video stream bits per pixel. Should hold the same value as the OutBits property.
Long | OutBits | Read only. Gets the input video stream bits per pixel. Should hold the same value as the InBits property.


LEAD Video EFX Aging Filter

LEAD Video EFX Aging Filter

The LEAD Video EFX Aging filter gives a movie the look and feel of an old style movie (Color or B&W).

Filter Interface(s) | ILMVAging, ILMMCommon
Interface ID | IID_ILMVAging, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVAging
Property Page CLSID | CLSID_LMVAgingPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Aging Filter User Interface


LEAD Video EFX Aging Filter User Interface

LEAD Video EFX Aging Filter User Interface

The Aging Video filter adds random scratches and noise to a movie, giving it the appearance of an old film (Color or B&W). The property page is shown in the figure below:

The Aging property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Movie Colors group

All, Channel 1, Channel 2, Channel 3, Luminence

Selects the color channel to which to apply the filter. This assumes the video is RGB24. Possible values are:
All: the aging is applied to all three channels.
Channel 1: first channel is used in generating the aging effect.
Channel 2: second channel is used in generating the aging effect.
Channel 3: third channel is used in generating the aging effect.
Luminence: luminance is calculated from the three channels and is used in generating the aging effect.

Enable old color check box

Indicates whether to apply the "old style" movie colors. If selected, the old style movie colors will be applied. If un-checked, the colors will not be altered.

Enable scratches check box

Indicates to add the appearance of scratches. If checked, add scratch lines, if un-checked, do not add scratch lines.

Maximum number of scratches slider

Maximum number of scratches in a frame.

Scratch height slider

Maximum scratch height. The range of this value is from 1 to the height of the source video.

Dust group

Enable dust check box

Indicates whether to add the appearance of dust to the movie. If checked, add dust, if un-checked, do not add dust.

Random dust check box

Indicates whether the dust should be added randomly. If checked, dust should be added randomly, if un-checked dust should be added in a custom fashion.

If un-checked, the Random Dust density, Always add dust, Dust Density & Dust colors controls are used.

Random density check box

Indicates whether the density of the dust added will be random or customized. If checked, density of the added dust will be random, if un-checked, density of the added dust is determined by the Dust Density control.

Dust Density slider

Controls the density of the dust added to the movie. Used only if Random density is checked. Range 0 to 100.

Always add dust check box

Indicates whether dust should be added to random frames or every frame. If checked, dust should appear in every frame, if un-checked, dust should be added to random frames.

Set color button

Sets the dust color. Used only if Custom is checked.

Dust colors group

Random radio button

If checked, random color is used for the dust.

Original radio button

If checked, original dust color (black) will be used.

Custom radio button

If checked, custom dust color will be used. Set the custom color using the Set color control.

Pits group

Enable pits check box

Indicates whether to add or remove pits. If checked, add pits, if un-checked, do not add pits.

Random pits check box

Indicates whether the addition of pits should be random or customized. If checked, add pits randomly, if un-checked add pits based on the Random pits density, Always add pits, Pits Density and Pits Colors controls.

Random density checkbox

Flag that indicates whether the density of the pits added will be random or customized. If checked, density of the added pits will be random, if un-checked, density of the added pits is determined by the Pits Density control.

Pits Density slider

Controls the density of the pits added to the movie. Used only if Random density is checked. Range: 0 to 100.

Always add pits check box

Indicates whether pits should be added to random frames or every frame. If checked, pits should appear in every frame, if un-checked, pits should be added to random frames.

Pits colors group

Random radio button

If checked, random color is used for the pits.

Original radio button

If checked, original pit color (gray) will be used.

Custom radio button

If checked, custom pit color will be used. Set the custom color using the Set color control.

Set color button

Sets the pit color. Used only if Custom is checked.

Enable effect area check box

Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.

Left spin edit control

Left boundary of the effect area.

Top spin edit control

Top boundary of the effect area.

Right spin edit control

Right boundary of the effect area.

Bottom spin edit control

Bottom boundary of the effect area.


ILMVAging Interface

ILMVAging Interface

Data types:

This filter has no specific data types, but includes the following enumeration for use with its programming interface:

MOVIE_COLORS

enum MOVIE_COLORS
{
COLOR_ALL,
COLOR_CH1,
COLOR_CH2,
COLOR_CH3,
COLOR_LUMINANCE
};

NOISE_COLORS

enum NOISE_COLORS
{
NOISE_RANDOM,
NOISE_ORIGINAL,
NOISE_CUSTOM
};

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

enum MOVIE_COLORS

MovieColors

Color channel to which to apply the filter. This assumes the video is RGB24. Possible values are:
COLOR_ALL: the aging is applied to all three channels.
COLOR_CH1: first channel is used in generating the aging effect.
COLOR_CH2: second channel is used in generating the aging effect.
COLOR_CH3: third channel is used in generating the aging effect.
COLOR_LUMINANCE: luminance is calculated from the three channels and is used in generating the aging effect.

VARIANT_BOOL

EnableMovieColors

Flag that indicates whether to apply the "old style" movie colors. Possible values are:
VARIANT_TRUE: The old style movie colors will be applied.
VARIANT_FALSE: The colors will not be altered.

VARIANT_BOOL

EnableScratches

Flag that indicates to add the appearance of scratches. Possible values are:
VARIANT_TRUE: Add scratch lines
VARIANT_FALSE: Remove scratch lines.

long

MaximumScratches

Maximum number of scratches in a frame.

long

ScratchHeight

Maximum scratch height. The range of this value is from 1 to the height of the source video.

VARIANT_BOOL

EnableDust

Flag that indicates whether to add the appearance of dust to the movie. Possible values are:
VARIANT_TRUE: Add dust
VARIANT_FALSE: Remove dust.

VARIANT_BOOL

RandomDust

Flag that indicates whether the dust should be added randomly. Possible values are:
VARIANT_TRUE: Dust should be added randomly.
VARIANT_FALSE: Dust should be added in a custom fashion.

If this property is VARIANT_FALSE, RandomDustDensity, AlwaysAddDust, DustDensity & DustColor properties are used.

VARIANT_BOOL

RandomDustDensity

Flag that indicates whether the density of the dust added will be random or customized. Possible values are:
VARIANT_TRUE: Density of the added dust will be random.
VARIANT_FALSE: Density of the added dust is determined by the DustDensity property.

long

DustDensity

Controls the density of the dust added to the movie. This property is valid only if RandomDustDensity is VARIANT_TRUE. Range 0 to 100.

VARIANT_BOOL

AlwaysAddDust

Flag that indicates whether dust should be added to random frames or every frame. Possible values are:
VARIANT_TRUE: Dust should appear in every frame.
VARIANT_FALSE: Dust should be added to random frames.

long

DustColor

Contains a value that represents the dust color. Dust color is an RGB value. Use the RGB macro to set this value to a new color. This property is valid only if DustColorType is NOISE_CUSTOM.

enum NOISE_COLORS

DustColorType

Indicates the color of the dust to add. Possible values are:
NOISE_RANDOM : Random color is used for the dust.

NOISE_ORIGINAL : Original dust color will be used(black).

NOISE_CUSTOM : Custom dust color will be used, using the value in the DustColor property.

VARIANT_BOOL

EnablePits

Flag that indicates whether to add or remove pits. Possible values are:
VARIANT_TRUE: Add pits.
VARIANT_FALSE: Remove pits.

VARIANT_BOOL

RandomPits

Flag that indicates whether the addition of pits should be random or customized. Possible values are:
VARIANT_TRUE: Add pits randomly.
VARIANT_FALSE: Add pits based on the RandomPitsDensity, AlwaysAddPits, PitsDensity and PitsColor properties.

VARIANT_BOOL

RandomPitsDensity

Flag that indicates whether the density of the pits added will be random or customized. Possible values are:
VARIANT_TRUE: Density of the added pits will be random.
VARIANT_FALSE: Density of the added pits is determined by the PitsDensity property.

long

PitsDensity

Controls the density of the pits added to the movie. This property is valid only if RandomPitsDensity is VARIANT_TRUE. Range: 0 to 100.

VARIANT_BOOL

AlwaysAddPits

Flag that indicates whether pits should be added to random frames or every frame. Possible values are:
VARIANT_TRUE: Pits should appear in every frame.
VARIANT_FALSE: Pits should be added to random frames.

enum NOISE_COLORS

PitsColorType

Indicates the color of the pits to add. Possible values are:
NOISE_RANDOM : Random color is used for the pits.

NOISE_ORIGINAL : Original pit color will be used(gray).

NOISE_CUSTOM : Custom pit color will be used, using the value in the PitsColor property.

long

PitsColor

Contains a value that represents the pit color. Pit color is an RGB value. Use the RGB macro to set this value to a new color. This property is valid only if PitsColorType is NOISE_CUSTOM.

VARIANT_BOOL

EffectAreaEnabled

Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.

long

Left

Left boundary of the effect area.

long

Top

Top boundary of the effect area.

long

Right

Right boundary of the effect area.

long

Bottom

Bottom boundary of the effect area.


LEAD Video EFX Bump Map Filter

LEAD Video EFX Bump Map Filter

The LEAD Video EFX bump map filter embeds the texture of an image or frame into the movie frames.

Filter Interface(s) | ILMVBumpMap, ILMMCommon
Interface ID | IID_ILMVBumpMap, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVBumpMap
Property Page CLSID | CLSID_LMVBumpMapPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Bump Map Filter User Interface


LEAD Video EFX Bump Map Filter User Interface

LEAD Video EFX Bump Map FilterUser Interface

The Bump Map Video effect applies a bump filter to a video. The property page is shown in the figure below:

The BumpMap property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Light angle slider | Controls the light angle on a horizontal plane (360 degree). Range: 0 to 360.
Elevation slider | Controls the light angle on a vertical plane (90 degree). Range: 0 to 90.
Depth slider | Controls the depth of the object, which will affect the shadow. 0 creates no shadow; higher values create deeper shadows. Range: 1 to 65.
X offset slider | Horizontal offset of the resulting frames. Negative values shift to the left; positive values shift to the right. Range: -(Width-1) to Width-1, where Width is the video width.
Y offset slider | Vertical offset of the resulting frames. Negative values shift down; positive values shift up. Range: -(Height-1) to Height-1, where Height is the video height.
Ambient slider | Controls the relative strength of a directional light. This property is used to control the shadow intensity. A higher value results in less shadow. Range: 0 to 255.
Invert check box | Indicates whether to invert shadow and light in the movie. If selected, invert shadow and light, if cleared, do not invert shadow and light.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVBumpMap Interface

ILMVBumpMap Interface

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

Long

LightAngle

Controls the light angle on a horizontal plane (360 degree). Range: 0 to 360.

Long

Elevation

Controls the light angle on a vertical plane (90 degree). Range: 0 to 90.

Long

Depth

Controls the depth of the object, which will affect the shadow. 0 creates no shadow; higher values create deeper shadows. Range: 1 to 65.

Long

XOffset

Horizontal offset of the resulting frames. Negative values shift to the left; positive values shift to the right. Range: -(Width-1) to Width-1, where Width is the video width.

Long

YOffset

Vertical offset of the resulting frames. Negative values shift down; positive values shift up. Range: -(Height-1) to Height-1, where Height is the video height.

Long

Ambient

Controls the relative strength of a directional light. This property is used to control the shadow intensity. A higher value results in less shadow. Range: 0 to 255.

VARIANT_BOOL

UseBuffer

Flag that indicates which buffer to use. Possible values are:
VARIANT_TRUE: Use the buffer set in the SetMapBuffer method.
VARIANT_FALSE: Use the source video buffer.

If this property is VARIANT_TRUE but no buffer has been set using the SetMapBuffer method, the source video buffer is used.

VARIANT_BOOL

Invert

Flag that indicates whether to invert shadow and light in the movie. Possible values are:
VARIANT_TRUE: Invert shadow and light.
VARIANT_FALSE: Do not invert shadow and light.

VARIANT_BOOL

EffectAreaEnabled

Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.

long

Left

Left boundary of the effect area.

long

Top

Top boundary of the effect area.

long

Right

Right boundary of the effect area.

long

Bottom

Bottom boundary of the effect area.

Interface Methods:

HRESULT SetMapBuffer (BYTE *pBuffer, long lWidth, long lHeight)

Parameters

pBuffer | pointer to a map buffer.
lWidth | width of the map.
lHeight: | height of the map.

Description

Sets an unaligned buffer to be used in the bump effect.

Return

S_OK if connected, S_FALSE otherwise.


LEAD Video EFX Dizzy Filter

LEAD Video EFX Dizzy Filter

The LEAD Video EFX Dizzy filter rotates, zooms and blurs movie frames to create a dizziness-like effect.

Filter Interface(s) | ILMVDizzy, ILMMCommon
Interface ID | IID_ILMVDizzy, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVDizzy
Property Page CLSID | CLSID_LMVDizzyPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Dizzy Filter User Interface


LEAD Video EFX Dizzy Filter User Interface

The Dizzy Video filter applies changes to the video that simulate a dizzy feeling. The property page is shown in the following figure:

The Dizzy property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Zoom level slider | Value that represents the zoom level used to create the dizziness effect. Range: 0 to 1000.
Rotation speed slider | Value that represents the rotation speed used to create the dizziness effect. Range: 0 to 1000.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.


ILMVDizzy Interface

ILMVDizzy Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | ZoomLevel | Value that represents the zoom level used to create the dizziness effect. Range: 0 to 1000.
long | RotationSpeed | Value that represents the rotation speed used to create the dizziness effect. Range: 0 to 1000.
VARIANT_BOOL | EffectAreaEnabled | Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.
long | Left | Left boundary of the effect area.
long | Top | Top boundary of the effect area.
long | Right | Right boundary of the effect area.
long | Bottom | Bottom boundary of the effect area.


LEAD Video EFX Fire Filter

LEAD Video EFX Fire Filter

The LEAD Video EFX fire filter draws flames around a moving object.

Filter Interface(s) | ILMVFire, ILMMCommon
Interface ID | IID_ILMVFire, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVFire
Property Page CLSID | CLSID_LMVFirePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Fire Filter User Interface


LEAD Video EFX Fire Filter User Interface

LEAD Video EFX Fire Filter User Interface

The Fire Video filter makes moving objects appear to be on fire. The property page is shown in the figure below:

The Fire property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Flame Direction group

Indicates the direction of the flames.

N: Flames to the North.
S: Flames to the South.
E: Flames to the East.
W: Flames to the West.
NE: Flames to the North-East.
NW : Flames to the North-West.
SE: Flames to the South-East.
SW: Flames to the South-West.
G: Flames all around the object, giving a glowing effect.

Gradient level slider

A percentage value that controls the colors graduation. For example 0 will result in a very small number of colors used to draw the flame. Higher values result in more colors used to draw the flames' gradient color. Range: 0 to 100.

Colors offset slider

Changes the colors used in generating the fire flames to another set of colors. Range: 0 to 1000.

Decay slider

Controls the spread and height of the flames. A lower decay value will result in a greater spread of fire and higher flames. Range: 1 to 100.

Threshold slider

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.

Fire check box

Enables or disables covering the entire object with flames. If this is selected, the entire object will be covered in flames and the Burn control will be cleared automatically.

Burn check box

Enables or disables having only parts of the object on fire. If this is selected, only parts of the object will be covered in flames and the Fire control will be cleared automatically.

Show background check box

Enables or disables showing the background of a moving object. If this is selected, the background of the moving object will be displayed. Otherwise, a black background is displayed.

First frame as reference check box

Enables or disables setting the first frame in every play session as the reference frame. If this is selected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this is cleared, then the reference frame should be set manually after a number of frames. Setting this after the stream starts will have no effect.

Set current frame as reference button

Sets the current frame as the reference frame.

No reference frame check box

Controls the reference frame. If this is selected, the reference frame is assumed to be a black buffer. If it is cleared, the reference frame will be the frame set by selecting the Set current frame as reference button.


ILMVFire Interface

ILMVFire Interface

Data types:

This filter has no specific data types, but includes the following enumerations for use with its programming interface:

DIRECTION

enum DIRECTION

{
DIR_NORTH = 1,
DIR_SOUTH = 2,
DIR_EAST = 4,
DIR_WEST = 8,
DIR_NORTHEAST = 16,
DIR_NORTHWEST = 32,
DIR_SOUTHEAST = 64,
DIR_SOUTHWEST = 128,
DIR_GLOW = 256
};

REFERENCE_FRAME

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

DIRECTION

Direction

Value that indicates the direction of the flames. Values may be combined using OR.
DIR_NORTH: Flames to the North.
DIR_SOUTH: Flames to the South.
DIR_EAST : Flames to the East.
DIR_WEST : Flames to the West.
DIR_NORTHEAST : Flames to the North-East.
DIR_NORTHWEST : Flames to the North-West.
DIR_SOUTHEAST : Flames to the South-East.
DIR_SOUTHWEST : Flames to the South-West.
DIR_GLOW : Flames all around theobject, giving a glowing effect.

long

Decay

Controls the spread and height of the flames. A lower decay value will result in a greater spread of fire and higher flames. Range: 1 to 100.

long

ColorsOffset

Changes the colors used in generating the fire flames to another set of colors. Range: 0 to 1000.

long

GradientLevel

A percentage value that controls the colors graduation. For example 0 will result in a very small number of colors used to draw the flame. Higher values result in more colors used to draw the flames' gradient color. Range: 0 to 100.

VARIANT_BOOL

Fire

Enables or disables covering the entire object with flames. If this is VARIANT_TRUE, the entire object will be covered in flames and the Burn property will be turned off automatically (false).

VARIANT_BOOL

Burn

Enables or disables having only parts of the object on fire. If this is VARIANT_TRUE, only parts of the object will be covered in flames the Fire property will be turned off automatically (false).

VARIANT_BOOL

ShowBackground

Enables or disables showing the background of a moving object. If this is VARIANT_TRUE, the background of the moving object will be displayed. Otherwise, a black background is displayed.

VARIANT_BOOL

FirstFrameIsReference

Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this property is VARIANT_FALSE, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.

long

Threshold

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.

VARIANT_BOOL

NoReferenceFrame

Flag that controls the reference frame. If this property is VARIANT_TRUE, the reference frame is assumed to be a black buffer. If it is VARIANT_FALSE, the reference frame will be the frame set by the user through the SetReferenceFrame method or by setting the FirstFrameAsReference property.

Interface Methods:

HRESULT SetReferenceFrame (BYTE *pBuffer, long lRGBColor, REFERENCE_FRAME opt)

Parameters

pBuffer | buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
opt | flag that controls the reference frame. Possible values are:
 | Value | Meaning
 | REF_USEBUFFER | only the pBuffer member is used.
 | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 | REF_USECOLOR | the lRGBColor parameter is used.

Description

Sets the reference frame of the movie.

Return

S_OK if connected, S_FALSE otherwise.


LEAD Video EFX Ghost Filter

LEAD Video EFX Ghost Filter

The LEAD Video EFX Ghost filter makes moving objects invisible.

Filter Interface(s) | ILMVGhost, ILMMCommon
Interface ID | IID_ILMVGhost, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVGhost
Property Page CLSID | CLSID_LMVGhostPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Ghost Filter User Interface


LEAD Video EFX Ghost Filter User Interface

LEAD Video EFX Ghost Filter

User Interface

The Ghost Video filter makes moving objects invisible. The property page is shown in the figure below:

The Ghost property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
First frame as reference check box | Enables or disables setting the first frame in every play session as the reference frame. If this is slected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie). If this is cleared, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.
Set current frame as reference button | Sets the current frame as the reference frame.
Threshold slider | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.


ILMVGhost Interface

ILMVGhost Interface

Data types:

This filter has no specific data types, but offers the following enumeration for use with its programming interface:

REFERENCE_FRAME

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
VARIANT_BOOL | FirstFrameIsReference | Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie). If this property is VARIANT_FALSE, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.
long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.

Interface Methods:

HRESULT SetReferenceFrame (BYTE *pBuffer, long lRGBColor, REFERENCE_FRAME opt)

Parameters

pBuffer | buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
opt | flag that controls the reference frame. Possible values are:
 | Value | Meaning
 | REF_USEBUFFER | only the pBuffer member is used.
 | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 | REF_USECOLOR | the lRGBColor parameter is used.

Description

Sets the reference frame of the movie.

Return

S_OK if connected, S_FALSE otherwise.


LEADVideoEFXGlassTileFilter

LEAD Video EFX Glass Tile Filter

The LEAD Video EFX Glass Tile filter will create a stained glass effect on each movie frame.

Filter Interface(s) | ILMVGlassTile, ILMMCommon
Interface ID | IID_ILMVGlassTile, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVGlassTile
Property Page CLSID | CLSID_LMVGlassTilePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Glass Tile Filter User Interface


LEAD Video EFX Glass Tile Filter User Interface

LEAD Video EFX Glass Tile FilterUser Interface

The Glass Tile Video filter gives a video the appearance of being viewed through glass tiles. The property page is shown in the figure below:

The Glass Tile property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Tile Width slider | Width of each glass tile. Range: 2 to 50.
Tile Height slider | Height of each glass tile. Range: 2 to 50.
Refraction slider | Controls the reflection of the frame in to the glass tiles. Range: 2 to 10.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVGlassTile Interface

ILMVGlassTile Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
Long | TileWidth | Width of each glass tile. Range: 2 to 50.
Long | TileHeight | Height of each glass tile. Range: 2 to 50.
Long | Refraction | Controls the reflection of the frame in to the glass tiles. Range: 2 to 10.
VARIANT_BOOL | EffectAreaEnabled | Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.
long | Left | Left boundary of the effect area.
long | Top | Top boundary of the effect area.
long | Right | Right boundary of the effect area.
long | Bottom | Bottom boundary of the effect area.


LEAD Video EFX Hologram Filter

LEAD Video EFX Hologram Filter

The LEAD Video EFX Hologram filter draws a holographic-like a shadow of a moving object.

Filter Interface(s) | ILMVHologram, ILMMCommon
Interface ID | IID_ILMVHologram, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVHologram
Property Page CLSID | CLSID_LMVHologramPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Hologram Filter User Interface


LEAD Video EFX Hologram Filter User Interface

LEAD Video EFX Hologram Filter User Interface

The Hologram Video filter draws a holographic-like shadow of a moving object. The property page is shown in the figure below:

The Hologram property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Hue slider

Value used to change the color of the effect. Hue is a color wheel (360 degree). Range: 0 to 360.

Noise slider

Gets or sets the noise density. Range: 1 to 100.

Threshold slider

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.

Add Line Noise check box

Show/hide a noise line.
If this is selected, the noise line appears as it is moving from the bottom to the top.

No reference frame check box

Controls the reference frame. If this is selected, the reference frame is assumed to be a black buffer. If it is cleared, the reference frame will be the frame set using the Set current frame as reference button.

First frame as reference check box

Enables or disables setting the first frame in every play session as the reference frame. If this is selected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this is cleared, then the reference frame should be set manually after a number of frames. Setting this after the stream starts will have no effect.

Set current frame as reference button

Sets the current frame as the reference frame.


ILMVHologram Interface

ILMVHologram Interface

Data types:

This filter has no specific data types, but includes the following enumeration for use with its programming interface:

REFERENCE_FRAME

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

long

Hue

Value used to change the color of the effect. Hue is a color wheel (360 degree). Range: 0 to 360.

VARIANT_BOOL

LineNoise

Show/hide a noise line.
If this property is VARIANT_TRUE, the noise line appears as it is moving from the bottom to the top.

long

Noise

Gets or sets the noise density. Range: 1 to 100.

VARIANT_BOOL

FirstFrameIsReference

Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this property is VARIANT_FALSE, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.

long

Threshold

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.

VARIANT_BOOL

NoReferenceFrame

Flag that controls the reference frame. If this property is VARIANT_TRUE, the reference frame is assumed to be a black buffer. If it is VARIANT_FALSE, the reference frame will be the frame set by the user through theSetReferenceFrame method or by setting the FirstFrameAsReference property.

Interface Methods:

HRESULT SetReferenceFrame (BYTE *pBuffer, long lRGBColor, REFERENCE_FRAME opt)

Parameters

pBuffer | buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
opt | flag that controls the reference frame. Possible values are:
 | Value | Meaning
 | REF_USEBUFFER | only the pBuffer member is used.
 | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 | REF_USECOLOR | the lRGBColor parameter is used.

Description

Sets the reference frame of the movie.

Return

S_OK if connected, S_FALSE otherwise.


LEAD Video EFX Lens Filter

LEAD Video EFX Lens Filter

The LEAD Video EFX Lens filter adds a fish eye-like effect to the movie.

Filter Interface(s) | ILMVLens, ILMMCommon
Interface ID | IID_ILMVLens, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVLens
Property Page CLSID | CLSID_LMVLensPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Lens Filter User Interface


LEAD Video EFX Lens Filter User Interface

User Interface

The Lens Video effect adds a fish-eye-like filter to the video by magnifying an area of the video. The property page is shown in the figure below:

The Lens property page provides a user interface to change the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Refraction slider | Controls the concavity of the lens, which affects the magnification. Range: 1 to 160.
Keep original surroundings check box | Controls the lens surroundings. If selected, takes the lens surroundings from the same frame. If cleared, sets the lens surroundings to white.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVLens Interface

ILMVLens Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | Refraction | Controls the concavity of the lens, which affects the magnification. Range: 1 to 160.
VARIANT_BOOL | KeepOriginalSurroundings | Flag that controls the lens surroundings. Possible values are: VARIANT_TRUE: Take the lens surroundings from the same frame. VARIANT_FALSE: Set the lens surroundings to white.
VARIANT_BOOL | EffectAreaEnabled | Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.
long | Left | Left boundary of the effect area.
long | Top | Top boundary of the effect area.
long | Right | Right boundary of the effect area.
long | Bottom | Bottom boundary of the effect area.


LEAD Video EFX Lightning Filter

LEAD Video EFX Lightning Filter

The LEAD Video EFX Lightning filter draws lightning sparks around a moving object.

Filter Interface(s) | ILMVLightning, ILMMCommon
Interface ID | IID_ILMVLightning, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it .
Filter CLSID | CLSID_LMVLightning
Property Page CLSID | CLSID_LMVLightningPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Lightning Filter User Interface


LEAD Video EFX Lightning Filter User Interface

LEAD Video EFX Lightning Filter User Interface

The Lightning Video filter draws lightning sparks around a moving object. The property page is shown in the figure below:

The Lightning property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Threshold slider

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.

First frame as reference check box

Enables or disables setting the first frame in every play session as the reference frame. If this is selected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this is cleared, then the reference frame should be set manually after a number of frames. Setting this after the stream starts will have no effect.

Set current frame as reference button

Sets the current frame as the reference frame.

No reference frame check box

Controls the reference frame. If this is selected, the reference frame is assumed to be a black buffer. If it is cleared, the reference frame will be the frame set using the Set current frame as reference button.


ILMVLightning Interface

ILMVLightning Interface

Data types:

This filter has no specific data types, but includes the following enumeration for use with its programming interface:

REFERENCE_FRAME

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
VARIANT_BOOL | FirstFrameIsReference | Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie). If this property is VARIANT_FALSE, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.
long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.
VARIANT_BOOL | NoReferenceFrame | Flag that controls the reference frame. If this property is VARIANT_TRUE, the reference frame is assumed to be a black buffer. If it is VARIANT_FALSE, the reference frame will be the frame set by the user through theSetReferenceFrame method or by setting the FirstFrameAsReference property.

Interface Methods:

HRESULT SetReferenceFrame (BYTE *pBuffer, long lRGBColor, REFERENCE_FRAME opt)

Parameters

pBuffer | buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
opt: | flag that controls the reference frame. Possible values are:
 | Value | Meaning
 | REF_USEBUFFER | only the pBuffer member is used.
 | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 | REF_USECOLOR | the lRGBColor parameter is used.

Description

Sets the reference frame of the movie.

Return

S_OK if connected, S_FALSE otherwise.


LEAD Video EFX Maze Filter

LEAD Video EFX Maze Filter

The LEAD Video EFX Maze filter distorts the movie into a crystal maze.

Filter Interface(s) | ILMVMaze, ILMMCommon
Interface ID | IID_ILMVMaze, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVMaze
Property Page CLSID | CLSID_LMVMazePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Maze Filter User Interface


LEAD Video EFX Maze Filter User Interface

LEAD Video EFX Maze Filter User Interface

The Maze Video filter distorts the video into a crystal maze. The property page is shown in the figure below:

The Maze property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Divisions slider | Number of fragments. Range: 0 to 64.
Center break radio button | Indicates how each frame will be distorted. If selected, the reflection will be distorted around the center.
Distorted break radio button | Indicates how each frame will be distorted. If selected, the reflection will be distorted diagonally.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVMaze Interface

ILMVMaze Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | Divisions | Number of fragments. Range: 0 to 64.
VARIANT_BOOL | CenterBreak | Flag that indicates how each frame will be distorted. Possible values are: VARIANT_TRUE: the reflection will be distorted around the center. VARIANT_FALSE: the reflection will be distorted diagonally.
VARIANT_BOOL | EffectAreaEnabled | Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.
long | Left | Left boundary of the effect area.
long | Top | Top boundary of the effect area.
long | Right | Right boundary of the effect area.
long | Bottom | Bottom boundary of the effect area.


LEAD Video EFX Motion Blur Filter

LEAD Video EFX Motion Blur Filter

The LEAD Video EFX Motion Blur filter creates a motion blur effect for moving objects. It gives the appearance of a random glow around the motion.

Filter Interface(s) | ILMVMotionBlur, ILMMCommon
Interface ID | IID_ILMVMotionBlur, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVMotionBlur
Property Page CLSID | CLSID_LMVMotionBlurPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Motion Blur Filter User Interface


LEAD Video EFX Motion Blur Filter User Interface

LEAD Video EFX Motion Blur Filter

User Interface

The Motion Blur Video filter blurs moving objects. It gives the appearance of a random glow around the motion. The property page is shown in the figure below:

The Motion Blur property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Hue slider | Value used to change the color of the effect. Hue is a color wheel (360 degree). Range: 0 to 360.
Threshold slider | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.
Interval (Frames) slider | Number of frames to use when creating the effect. The higher the number, the greater the blur since more frames are being used. Range: 1 to 200.


ILMVMotionBlur Interface

ILMVMotionBlur Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | Hue | Value used to change the color of the effect. Hue is a color wheel (360 degree). Range: 0 to 360.
long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.


LEAD Video EFX Motion Emboss Filter

LEAD Video EFX Motion Emboss Filter

The LEAD Video EFX Motion Emboss filter applies an Emboss effect to moving objects.

Filter Interface(s) | ILMVMotionEmboss, ILMMCommon
Interface ID | IID_ILMVMotionEmboss, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVMotionEmboss
Property Page CLSID | CLSID_LMVMotionEmbossPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Motion Emboss Filter User Interface


LEAD Video EFX Motion Emboss Filter User Interface

LEAD Video EFX Motion Emboss Filter User Interface

The Motion Emboss Video effect gives moving objects an embossed or raised. The property page is shown in the figure below:

The Motion Emboss property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Light Angle slider

The direction of the light, in degrees. Range: 0 to 360 degrees.

Elevation slider

Elevation angle. Range of values is from 0 to 180 degrees, where 0 will cause outer embossing, and 180 will cause inner embossing.

Depth slider

Depth of the emboss effect. Range: 1 to 100.

Threshold slider

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.

Emboss radio button

If selected, emboss without a bump map.

Bumpmap radio button

If selected, emboss with a bump map.

First frame as reference check box

Enables or disables setting the first frame in every play session as the reference frame. If this is selected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this is cleared, then the reference frame should be set manually after a number of frames. Setting this after the stream starts will have no effect.

Set current frame as reference button

Sets the current frame as the reference frame.

No reference frame check box

Controls the reference frame. If this is selected, the reference frame is assumed to be a black buffer. If it is cleared, the reference frame will be the frame set using the Set current frame as reference button.


ILMVMotionEmboss Interface

ILMVMotionEmboss Interface

Data types:

This filter has no specific data types, but includes the following enumeration for use with its programming interface:

REFERENCE_FRAME

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

VARIANT_BOOL

Emboss

Flag that indicates weather to emboss with a bump map. Possible values are:
VARIANT_TRUE: emboss with a bump map
VARIANT_FALSE: do not emboss with a bump map.

Long

Depth

Depth of the emboss effect. Range: 1 to 100.

Long

Elevation

Elevation angle. Range of values is from 0 to 180 degrees, where 0 will cause outer embossing, and 180 will cause inner embossing.

Long

LightAngle

The direction of the light, in degrees. Range: 0 to 360 degrees.

VARIANT_BOOL

FirstFrameIsReference

Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).

If this property is VARIANT_FALSE, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.

long

Threshold

Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.

VAIRIANT_BOOL

NoReferenceFrame

Flag that controls the reference frame. If this property is VARIANT_TRUE, the reference frame is assumed to be a black buffer. If it is VARIANT_FALSE, the reference frame will be the frame set by the user through the SetReferenceFrame method or by setting the FirstFrameAsReference property.

Interface Methods:

HRESULT SetReferenceFrame (BYTE *pBuffer, long lRGBColor, REFERENCE_FRAME opt)

Parameters

pBuffer | buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
opt: | flag that controls the reference frame. Possible values are:
 | Value | Meaning
 | REF_USEBUFFER | only the pBuffer member is used.
 | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 | REF_USECOLOR | the lRGBColor parameter is used.

Description

Sets the reference frame of the movie.

Return

S_OK if connected, S_FALSE otherwise.


LEAD Video EFX Motion Mosaic Filter

LEAD Video EFX Motion Mosaic Filter

The LEAD Video EFX Motion Mosaic filter applies a mosaic effect to moving objects.

Filter Interface(s) | ILMVMotionMosaic, ILMMCommon
Interface ID | IID_ILMVMotionMosaic, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVMotionMosaic
Property Page CLSID | CLSID_LMVMotionMosaicPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Motion Mosaic Filter User Interface


LEAD Video EFX Motion Mosaic Filter User Interface

LEAD Video EFX Motion Mosaic Filter

User Interface

The Motion Mosaic Video filter conceals moving objects by giving each object a "blocky" appearance. The property page is shown in the figure below:

The Motion Mosaic property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Size slider | Size of the mosaic square in pixels. Range: 1 to 64.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVMotionMosaic Interface

ILMVMotionMosaic Interface

Data types:

This filter has no specific data types, but includes the following enumeration for use with its programming interface:

REFERENCE_FRAME

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | SquareSize | Size of the mosaic square in pixels. Range: 1 to 64.
VARIANT_BOOL | FirstFrameIsReference | Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie). If this property is VARIANT_FALSE, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.
long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.
VARIANT_BOOL | NoReferenceFrame | Flag that controls the reference frame. If this property is VARIANT_TRUE, the reference frame is assumed to be a black buffer. If it is VARIANT_FALSE, the reference frame will be the frame set by the user through the SetReferenceFrame method or by setting the FirstFrameAsReference property.

Interface Methods:

HRESULT SetReferenceFrame (BYTE *pBuffer, long lRGBColor, REFERENCE_FRAME opt)

Parameters

pBuffer | buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
opt: | flag that controls the reference frame. Possible values are:
 | Value | Meaning
 | REF_USEBUFFER | only the pBuffer member is used.
 | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 | REF_USECOLOR | the lRGBColor parameter is used.

Description

Sets the reference frame of the movie.

Return

S_OK if connected, S_FALSE otherwise.


LEAD Video EFX Motion Scan Filter

LEAD Video EFX Motion Scan Filter

The LEAD Video EFX Motion Scan filter will scan one line per frame and draw it to the destination. This gives the effect of distorting the moving objects.

Filter Interface(s) | ILMVMotionScan, ILMMCommon
Interface ID | IID_ILMVMotionScan, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVMotionScan
Property Page CLSID | CLSID_LMVMotionScanPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Motion Scan Filter User Interface


LEAD Video EFX Motion Scan Filter User Interface

LEAD Video EFX Motion Scan Filter

User Interface

The Motion Scan Video filter scans one line per frame and draws it to the destination, giving the frame a "radar" appearance and distorting the moving objects. The property page is shown in the following figure:

The Motion Scan property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Line increment slider | Number of lines to skip before scanning the next line. Range: 1 to Video height – 1
Show scan line check box | Show/hide the scan line pointer. This is a green line that progresses every frame by the Line increment to show the current line being scanned. If selected, show the scan line pointer. If cleared, hide the scan line pointer.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVMotionScan Interface

ILMVMotionScan Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | LineIncrement | Number of lines to skip before scanning the next line. Range: 1 to Video height – 1
VARIANT_BOOL | ShowScanLine | Shows or hides the scan line pointer. This is a green line that progresses every frame by the LineIncrement to show the current line being scanned. Possible values are: VARIANT_TRUE: Show the scan line pointer. VARIANT_FALSE: Hide the scan line pointer.
VARIANT_BOOL | EffectAreaEnabled | Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.
long | Left | Left boundary of the effect area.
long | Top | Top boundary of the effect area.
long | Right | Right boundary of the effect area.
long | Bottom | Bottom boundary of the effect area.


LEAD Video EFX Particles Filter

LEAD Video EFX Particles Filter

The LEAD Video EFX Particles filter distorts an object, when it moves, into small particles. It then joins the particles to reform the object when it stops moving.

Filter Interface(s) | ILMVParticles, ILMMCommon
Interface ID | IID_ILMVParticles, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVParticles
Property Page CLSID | CLSID_LMVParticlesPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Particles Filter User Interface


LEAD Video EFX Particles Filter User Interface

LEAD Video EFX Particles FilterUser Interface

The Particles Video filter breaks a moving object into small particles, and then joins the particles to reform the object when it stops moving. The property page is shown in the figure below:

The Particles property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Distortion slider | Controls the distortion level. More distortion results in more memory resources used. Recommended value is 4. Range: 1 to 6.


ILMVParticles Interface

ILMVParticles Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | Distortion | Controls the distortion level. More distortion results in more memory resources used. Recommended value is 4. Range: 1 to 6.


LEAD Video EFX Predator Filter

LEAD Video EFX Predator Filter

The LEAD Video EFX Predator filter detects any object that moves and displaces the background pixels.

Filter Interface | ILMVPredator
Interface ID | IID_ILMVPredator
Input/Output Media Types | MEDIATYPE_Video And the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVPredator
Property Page CLSID | CLSID_LMVPredatorPropertyPage
Filter category | DirectShow
Executable | LMVMtnFX.dll
Header | ILMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Predator Filter User Interface


LEAD Video EFX Predator Filter User Interface

LEAD Video EFX Predator FilterUser Interface

Creates an effect similar to those used in the Predator movies. The property page is shown in the figure below:

Use the Predator property page to change the properties of the filter. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandoning them by selecting Cancel. To display general information about a control, position the mouse pointer over a control.

Control | Description
Enable check box | Enables/Disables the effect.
First frame as reference check box | Enables or disables setting the first frame in every play session as the reference frame. If this is selected, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie). If this is cleared, then the reference frame should be set manually after a number of frames. Setting this property after the stream starts will have no effect.
Set current frame as reference button | Sets the current frame as the reference frame.
Threshold slider | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.
Horizontal Pixels edit box | Value used to control the horizontal pixels that will be displace. Range 0 to video width.
Vertical Pixels edit box | Value used to control the vertical pixels that will be displace. Range 0 to video height.
Horizontal Direction drop-down list box | Value used to control the horizontal displacement direction.
Vertical Direction drop-down list box | Value used to control the vertical displacement direction.


ILMVPredator Interface

ILMVPredator Interface

Data types:

enum REFERENCE_FRAME
{
REF_USEBUFFER,
REF_USENEXTFRAME,
REF_USECOLOR,
};

typedef [v1_enum] enum HorizontalDirectionConstants
{
HORIZONTAL_DIRECTION_LEFT = 0,
HORIZONTAL_DIRECTION_RIGHT = 1

} HorizontalDirectionConstants;

typedef [v1_enum] enum VerticalDirectionConstants
{
VERTICAL_DIRECTION_UP = 0,
VERTICAL_DIRECTION_DOWN = 1
} VerticalDirectionConstants;

ILMVPredator Interface

Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
VARIANT_BOOL | FirstFrameIsReference | Enables or disables setting the first frame in every play session as the reference frame. If this is VARIANT_TRUE, the first frame in every play session will be set as the reference frame (Usually the first frame in a movie).
Long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range: 1 to 100.
Long | HorizontalPixels | Gets or sets the number of horizontal displacement pixels. The value ranges from 0 to video width.
Long | VerticalPixels | Gets or sets the number of vertical displacement pixels. The value ranges from 0 to video height.
HorizontalDirectionConstants | HorizontalDirection | Gets or sets the horizontal displacement direction. Possible value can be on of the following: HORIZONTAL_DIRECTION_LEFT: The pixels displace from right to left. HORIZONTAL_DIRECTION_RIGHT: The pixels displace from left to right.
VerticalDirectionConstants | VerticalDirection | Gets or sets the vertical displacement direction. Possible value can be on of the following: VERTICAL_DIRECTION_UP: The pixels displace from down to up. VERTICAL_DIRECTION_DOWN: The pixels displace from up to down.

Methods:

Method | Parameters | Description
SetReferenceFrame | byte* pBuffer, [in] long lRGBColor, [in] REFERENCE_FRAME opt | Sets the reference frame of the movie.
 |  | Parameters | Description
 |  | pBuffer | Buffer contains the reference frame. This buffer should have the same dimensions (width and height), and the same bits per pixel as the movie.
 |  | lRGBColor | pixel color (RGB 24-bit). The reference frame will be set as a solid frame with the color specified in this parameter.
 |  | Opt | flag that controls the reference frame. Possible values are:
 |  |  | Value | Meaning
 |  |  | REF_USEBUFFER | only the pBuffer member is used.
 |  |  | REF_USENEXTFRAME | the next frame in the movie is taken as the reference frame.
 |  |  | REF_USECOLOR | the lRGBColor parameter is used.


LEAD Video EFX Rain Filter

LEAD Video EFX Rain Filter

The LEAD Video EFX Rain Filter adds rain drops to the video.

Filter Interface(s) | ILMVRain, ILMMCommon
Interface ID | IID_ILMVRain, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVRain
Property Page CLSID | CLSID_LMVRainPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMiscFX.dll
Header | LMVMiscFX.h

Platforms

Win32, x64

LEAD Video EFX Rain Filter User Interface


LEAD Video EFX Rain Filter User Interface

LEAD Video EFX Rain FilterUser Interface

The Rain Video filter adds rain drops to the video, as if the video were a pool of water. The property page is shown in the figure below:

The Rain property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Wave speed slider | Controls the wave speed. Increasing this value results in decreasing the wave lifetime (faster waves). Range: 1 to 10.
Density slider | Controls the density of the rain added to a single frame. This is used only if Custom Rain Drops is selected. Range: 1 to 100.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVRain Interface

ILMVRain Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | WaveSpeed | Controls the wave speed. Increasing this value results in decreasing the wave lifetime (faster waves). Range: 1 to 10.
long | Density | Controls the density of the rain added to a single frame. This property is valid only if RandomRain is VARIANT_TRUE. Range: 1 to 100.
VARIANT_BOOL | RandomRain | Flag that indicates whether the density of the rain added will be random or customized. Possible values are: VARIANT_TRUE: Density of the added rain will be random. VARIANT_FALSE: Density of the added rain is determined by the Density property.
VARIANT_BOOL | EffectAreaEnabled | Enables or disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom properties.
long | Left | Left boundary of the effect area.
long | Top | Top boundary of the effect area.
long | Right | Right boundary of the effect area.
long | Bottom | Bottom boundary of the effect area.


LEAD Video EFX Streak Filter

LEAD Video EFX Streak Filter

The LEAD Video EFX Streak filter shows moving objects as they are traced in slow motion.

Filter Interface(s) | ILMVStreak, ILMMCommon
Interface ID | IID_ILMVStreak, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVStreak
Property Page CLSID | CLSID_LMVStreakPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Streak Filter User Interface


LEAD Video EFX Streak Filter User Interface

The Streak video filter shows moving objects as they are traced in slow motion. The property page is shown in the following figure:

The Streak property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Heavy mode check box | If selected, the effect will show the object motion from point to point very slow, it will look like having the same object in more than one place, if false, the effect will show the object move as a fast for the object. If cleared, display the object's motion as a rapid sequence of moving pictures.


ILMVStreak Interface

ILMVStreak Interface

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

VARIANT_BOOL

HeavyMode

If true the effect will show the object motion from point to point very slow, it will look like having the same object in more than one place, if false, the effect will show the object move as a fast for the object.

Flag that indicates whether to show the motion of the object as a slow, point to point progression or as a rapid sequence of moving pictures. Possible values are:
VARIANT_TRUE: Display the object's motion as a slow point to point progression. This gives the appearance of having the same object in more than one place.
VARIANT_FALSE: Display the object's motion as a rapid sequence of moving pictures.


LEAD Video EFX Wave Filter

LEAD Video EFX Wave Filter

The LEAD Video EFX Wave filter makes waves around moving objects.

Filter Interface(s) | ILMVWave, ILMMCommon
Interface ID | IID_ILMVWave, IID_ILMMCommon
Input/Output Media Types | The filter accepts major types: MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 The filter does not change the media types passed to it.
Filter CLSID | CLSID_LMVWave
Property Page CLSID | CLSID_LMVWavePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnFX.dll
Header | LMVMtnFX.h

Platforms

Win32, x64

LEAD Video EFX Wave Filter User Interface


LEAD Video EFX Wave Filter User Interface

The Wave Video filter makes waves around moving objects. The property page is shown in the figure below:

The Wave property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Wave speed slider | Controls the wave speed. Increasing this value results in decreasing the wave lifetime (faster waves). Range: 1 to 10.
Threshold slider | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.


ILMVWave Interface

ILMVWave Interface

Interface Properties:

Type | Name | Description
VARIANT_BOOL | Enabled | Enables or disables the effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.
long | WaveSpeed | Controls the wave speed. Increasing this value results in decreasing the wave lifetime (faster waves). Range: 1 to 10.
long | Threshold | Value used to control an object's detection level. A lower threshold provides stronger object detection. Range : 1 to 100.


LEAD Video Emboss Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Emboss Filter

The LEAD Video Emboss filter offers embossing a video stream providing different parameters to control the effect. The effect can be applied to a selected area (rectangle) only by changing the "Effect Area" attributes in the property page or using SetCropAttributes from the programming interface.

Filter Interface | ILMVEmboss, ILMVEmbossDisp , ILMMCommon
Interface ID | IID_ILMVEmboss, IID_ILMVEmbossDisp
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVEmboss
Property Page CLSID | CLSID_LMVEmbossPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVEmbs.dll
Header | ILMVEmboss.h

Platforms

Win32, x64

LEAD Video Emboss Filter User Interface


LEAD Video Emboss Filter User Interface

The Emboss Video filter gives the video an embossed or raised look. The effect can be applied to a limited area (rectangle) of the video by changing the "Effect Area" attributes in the property page. The property page is shown in the figure below:

The emboss property page provides a user interface for changing the Emboss Video Effect

Changes will be applied directly to the streaming media with the ability to set them permanently using the Apply button or abandon them by pressing the Cancel button. The OK button has the same effect as the Apply.

Positioning the mouse pointer over a control, displays general information for that control.

Control | Description
Enable check box | Enables/Disables the effect.
Light Angle slider | The light Angle, 0 to 360 degrees, this parameter will control the light direction.
Elevation slider | Elevation angle, 0 to 180 degrees, 0 value will have outer embossing, 180 will have inner embossing effect.
Depth slider | Depth of emboss effect, 1 to 100.
Emboss radio button | If selected, emboss without a bump map.
Bumpmap radio button | If selected, emboss with a bump map.


ILMVEmboss Interface

ILMVEmboss Interface

Data types:

EMBOSS_ATTRIBUTES

typedef struct
{
long lLightAngle;
long lElevation;
long lDepth;
BOOL bEmbossp;
BOOL bEnabled;
long lDLightAngle;
long lDElevation;
long lDDepth;
BOOL bDEmbossp;
BOOL bDEnabled;
} EMBOSS_ATTRIBUTES;

Describes emboss effect properties.

Member | Description
lLightAngle | The light Angle, 0 to 360 degrees, this parameter will control the light direction.
lElevation | Elevation angle, 0 to 180 degrees, 0 value will have outer embossing, 180 will have inner embossing effect.
lDepth | Depth of emboss effect, 1 to 100.
bEmbossp | Indicates weather to emboss with a bump map (TRUE) or not (FALSE).
BEnabled | Indicates weather Emboss effect is enabled (TRUE) or not (FALSE).
lDLightAngle | Default light angle value. Original default value is 180.
lDElevation | Default elevation angle value. Original default value is 90.
lDDepth | Default depth value. Original default value is 1.
bDEmbossp | Default bump map value. Original default value is TRUE.
bDEnabled | Default for bEnabled value Original default value is TRUE.

CROP_ATTRIBUTES:

typedef struct
{
long lLeft;
long lTop;
long lRight;
long lBottom;
BOOL bEnabled;
long lDLeft;
long lDTop;
long lDRight;
long lDBottom;
BOOL bDEnabled;
} CROP_ATTRIBUTES;

Describes the area exposed to the emboss effect.

Member | Description
lLeft | The left coordinate of the cropped rectangle, 0 by default.
lTop | The top coordinate of the cropped rectangle, 0 by default.
lRight | The right coordinate of the cropped rectangle, 1 by default.
lBottom | The bottom coordinate of the cropped rectangle, 1 by default.
bEnabled | Enable (TRUE) / Disable (FALSE) the effect area.
lDLeft | Default left.
lDTop | Default top.
lDRight | Default right.
lDBottom | Default bottom.
bDEnabled | Default effect area enable status

Interface methods:

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT SetEmbossAttributes( EMBOSS_ATTRIBUTES emboss_attributes)

Parameters

emboss_attributes

an EMBOSS_ATTRIBUTES structure that contains emboss attributes to set.

Description

Sets the properties for the emboss effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetEmbossAttributes(EMBOSS_ATTRIBUTES *emboss_attributes)

Parameters

emboss_attributes

a valid pointer to an EMBOSS_ATTRIBUTES structure to be updated with the current emboss attributes.

Description

Retrieves the current emboss attributes.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetCropAttributes(CROP_ATTRIBUTES crop_attributes)

Parameters

crop_attributes

a CROP_ATTRIBUTES structure that contains the effect area attributes to set.

Description

Sets the effect area attributes. If successful, effect is applied only to the passed rectangle.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetCropAttributes(CROP_ATTRIBUTES *crop_attributes)

Parameters

crop_attributes

a valid pointer to a CROP_ATTRIBUTES structure to be updated with the current effect area attributes.

Description

Retrieves the current effect area attributes.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth | A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.
plInHeight | A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.
plOutWidth | A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.
plOutHeight | A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIOBitCount(int *pInBitCount, int *pOutBitCount)

Parameters

pInBitCount | A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.
pPBitCount | A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.


ILMVEmbossDisp Interface

ILMVEmbossDisp Interface

Interface Properties:

Type | Name | Description
long | LightAngle | The light Angle, 0 to 360 degrees, this property controls the light direction.
long | Elevation | Elevation angle, 0 to 180 degrees, 0 value will have outer embossing, 180 will have inner embossing effect.
long | Depth | Depth of emboss effect, 1 to 100.
BOOL | Embossp | Indicates whether to emboss with a bump map (TRUE) or not (FALSE).
BOOL | Enabled | Indicates whether the Emboss effect is enabled (TRUE) or not (FALSE).
long | DefaultLightAngle | Default light angle value. Original default value is 180.
long | DefaultElevation | Default elevation angle value. Original default value is 90.
long | DefaultDepth | Default depth value. Original default value is 1.
BOOL | DefaultEmbossp | Default bump map value. Original default value is TRUE.
BOOL | DefaultEnabled | Default for bEnabled value Original default value is TRUE.
long | Left | The left coordinate of the effect area rectangle, 0 by default.
long | Top | The top coordinate of the effect area rectangle, 0 by default.
long | Right | The right coordinate of the effect area rectangle, 1 by default.
long | Bottom | The bottom coordinate of the effect area rectangle, 1 by default.
BOOL | EffectAreaEnabled | Enable (TRUE) / Disable (FALSE) effect area.
long | DefaultLeft | Default left.
long | DefaultTop | Default top.
long | DefaultRight | Default right.
long | DefaultBottom | Default bottom.
BOOL | DefaultEffectAreaEnabled | Default effect area enable status.
BOOL | IsLEADInputPinConnected | Read only; returns TRUE if the filter’s input pin is connected.
BOOL | IsLEADOutputPinConnected | Read only; returns TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.


LEAD Video Frame Rate Controller Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Frame Rate Controller Filter (2.0)

The LEAD Video Frame Rate Controller filter provides the ability to change the frame rate of the passing video stream.

Filter Interface | ILMVFrameRateCtrl , ILMMCommon
Interface ID | IID_ILMVFrameRateCtrl
Input/Output Media Types | This filter accepts any video of type MEDIATYPE_Video, with format FORMAT_VideoInfo. Any temporally compressed video will not be accepted.
Filter CLSID | CLSID_LMVFrameRateCtrl
Property Page CLSID | CLSID_LMVFrameRateCtrlPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVFramCtrl2.dll, DSKernel2.dll
Header | ILMVFramCtrl2.h

Platforms

Win32, x64

LEAD Video Frame Rate Filter User Interface

This filter is included as part of the following modules:

LEADTOOLS DVD Module for API

LEADTOOLS Video Streaming Module for API

LEADTOOLS DVD Module for COM

LEADTOOLS Video Streaming Module for COM


LEAD Video Frame Rate Controller Filter User Interface (2.0)

The Frame Rate Controller changes the frame rate of the video stream. For example, it can change a 30 frame-per-second video to 24 frames per second. The property page is shown in the figure below:

The Frame Rate Controller property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandoning changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control.

In addition to the ability to enable/disable the frame rate control process, the property page provides a predefined list of standard frame rates to select from. In case a non-listed value is needed, select Custom Rate from the Predefined frame rate drop-down list box, and fill in the desired value in the Custom frame rate edit box, which will be enabled. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the filer. If cleared, the filter passes the video stream as is, without changing the frame rate.

Predefined frame rate drop-down list box

Contains a list of predefined frame rate values for the output frame rate. One of the listed values is the “Custom Rate”, which when selected enables the Custom frame rate edit box to allow a custom value to be entered.

Custom frame rate drop-down list box

This edit box will be enabled only if “Custom Rate” is selected from the “Predefined frame rate” drop-down list box. Possible values range from 0.1 to 100.

Change stream length check box

If selected, the filter will change the duration of the video stream by changing the frame rate as follows:

Actual output rate = Selected rate * (Selected rate / Input rate).

The video will play slower or faster according to the selected rate. If this box is cleared, the video plays at the normal speed and only the frame rate is changed.


ILMVFramRateCtrl Interface

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILMVFrameRateCtrl Interface

This is the interface for the LEAD Video Frame Rate Controller Filter.

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enable

Set to VARIANT_TRUE to enable the filter. If set to VARIANT_FALSE, the filter will pass the video stream as is, without changing the frame rate.

double

FrameRate

Sets or gets the desired output frame rate, in frames per second.

double

InputFrameRate

(Read only) The input (original) frame rate, in frames per second.

VARIANT_BOOL

ChangeStreamLength

If set to VARIANT_TRUE, the filter will change the duration of the video stream by changing the frame rate as follows:

Actual output rate = Selected rate * (Selected rate / Input rate).

The video will play slower or faster according to the selected rate. If set to VARIANT_FALSE, the video plays at the normal speed and only the frame rate is changed.

Interface Methods:

HRESULT ResetToDefaults()

Description:

Resets the filter properties to their default values. Calling this method might cause the filter to reconnect its output pin.

Comments:

The method will fail if the filter is in the running state.

Returns:

S_OK | Success
VFW_E_WRONG_STATE | The filter is in the wrong state.


LEAD Video Gamma Correction Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Gamma Correction Filter

The LEAD Video Gamma Correction filter performs gamma correction to a video stream. Possible gamma values are between 1 and 500.

Filter Interface | ILMVGamma, ILMVGammaDisp , ILMMCommon
Interface ID | IID_ILMVGamma, IID_ILMVGammaDisp
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVGamma
Property Page CLSID | CLSID_LMVGammaPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVGamma.dll
Header | ILMVGamma.h

Platforms

Win32, x64

LEAD Video Gamma Correction Filter User Interface


LEAD Video Gamma Correction Filter User Interface

LEAD Video Gamma Correction Filter

User Interface

The Gamma Correction Video filter applies gamma correction (nonlinear brightness) to a video . Possible gamma values are between 1 and 500. The property page is shown in the figure below:

The Gamma Correction property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Gamma factor spin edit box | Gamma correction value. Possible values range between 1 and 500.


ILMVGamma Interface

ILMVGamma Interface

Data types

GAMMA_ATTRIBUTES:

typedef struct
{
long lGamma;
BOOL bGammaEqualize;
long lDGamma;
BOOL bDGammaEqualize;
} GAMMA_ATTRIBUTES;

Describes gamma correction attributes.

Member | Description
lGamma | Gamma correction value, range between 1 and 500.
bGammaEqualize | TRUE to enable gamma correction.
lDGamma | Default Gamma correction value. Original default value is 1.0
bDGammaEqualize | Default gamma correction Enable flag.

Interface Methods

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT GetGamma_Attributes(Gamma_ATTRIBUTES* gamma_attributes)

Parameters

gamma_attributes

a valid pointer to a GAMMA_ATTRIBUTES structure.

Description

Gets the current gamma correction attributes.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetGamma_Attributes(Gamma_ATTRIBUTES gamma_attributes)

Parameters

gamma_attributes

a GAMMA_ATTRIBUTES structure that contains gamma correction attributes to set.

Description

Sets the gamma correction attributes. If the gamma value is out of the permitted range, it is clipped.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth | A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.
plInHeight | A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.
plOutWidth | A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.
plOutHeight | A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIOBitCount(int *pInBitCount, int *pOutBitCount)

Parameters

pInBitCount | A valid pointer to an integer that will receive the input media bits per pixel value. NULL can be passed if this value is not needed.
pPBitCount | A valid pointer to an integer that will receive the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.


ILMVGammaDisp Interface

ILMVGammaDisp Interface

Interface Properties:

Type | Name | Description
BOOL | EnableGammaEqualize | TRUE to enable gamma correction.
long | Gamma | Gamma correction value, range between 1 and 500.
BOOL | DefaultEnableGammaEqualize | Default enable gamma correction.
long | DefaultGamma | Default Gamma correction value. Original default value is 1.0
BOOL | IsLEADInputPinConnected | Read only; returns TRUE if the filter’s input pin is connected.
BOOL | IsLEADOutputPinConnected | Read only; returns TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.


LEAD Video Histogram Equalize Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Histogram Equalize Filter (2.0)

The LEAD Video Histogram Equalize filter performs Histogram Equalization to a video stream. Equalization can be done for a single channel; Red, Green, or Blue, or for all channels; master.

You must unlock the LEAD Video Histogram Equalize Filter (2.0) in order to use it. For more information, refer to Evaluation Mechanism Overview.

Filter Interface | ILMVHistoEq , ILMMCommon
Interface ID | IID_ILMVHistogramEq
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVAboutHistogramEq
Property Page CLSID | CLSID_LMVHistogramEqPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVHstg2.dll, DSKernel2.dll
Header | ILMVHstg2.h

Platforms

Win32, x64

LEAD Video Histogram Equalize Filter User Interface


LEAD Video Histogram Equalize User Interface (2.0)

LEAD Video Histogram Equalize Filter User Interface (2.0)

The Histogram Equalize Video filter increases the contrast and details in videos using the histogram. Equalization can be done for a single channel (Red, Green, or Blue) or for all channels (master).

The Histogram Equalize property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Perform Histogram equalization check box | Enables/Disables the effect.
RGB8 radio button | Sets the type to RGB8.
RGB24 radio button | Sets the type to RGB24, with possible types: Red – Red Channel only. Green – Green Channel only. Blue – Blue Channel only. Master – Master Channel.
Switch to BGR mode check box | If selected, uses BGR data instead of RGB.
Use YUV space check box | If selected, YUV color space is used to create the effect.


ILMVHistogEq Interface

ILMVHistogEq Interface

This is the interface for the LEAD Video Histogram Equalize Filter.

Data types:

enum
{
RGB8 = 1035,
RGB24,
REDCHANNEL,
GREENCHANNEL,
BLUECHANNEL,
ALLCHANNELS
};

Constants | Description
RGB8 | Sets the type to RGB8.
RGB24 | Sets the type to RGB24.
REDCHANNEL | Use only the Red channel.
GREENCHANNEL | Use only the Green channel.
BLUECHANNEL | Use only the Blue channel.
ALLCHANNELS | Use the Master channel.

Properties:

Type | Name | Description
BOOL | EnableEqualize | TRUE to enable histogram equalization.
BOOL | RGBMode | TRUE to use RGB data, and FALSE for BGR.
long | HistogramType | Describes the histogram type: which channel will be equalized. Possible values are: RGB8, REDCHANNEL, GREENCHANNEL, BLUECHANNEL, ALLCHANNELS.
BOOL | DefaultEnableEqualize | Default equalization enable status.
BOOL | DefaultRGBMode | Default RGB mode.
 | DefaultHistogramType | Default histogram type.
VARIANT_BOOL | YUVHistogram | Enable/Disable using the YUV color space to do the effect.
VARIANT_BOOL | YUVInput | Get the input media type regardless of whether or not it is YUV.


LEAD Video Histogram View Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Histogram View Filter (2.0)

The LEAD Video Histogram View filter draws the running histogram of a video stream in its property page. The filter also provides access to the histogram array through its programming interface. The histogram can be viewed for a single channel or for all channels.

You must unlock the LEAD Video Histogram View Filter (2.0) in order to use it. For more information, refer to Evaluation Mechanism Overview.

Filter Interface | ILMVHistogVw , ILMMCommon
Interface ID | IID_ILMVHistogramView,
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVHistogramView
Property Page CLSID | CLSID_LMVHistogramViewPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVHstg2.dl, DSKernel2.dll
Header | ILMVHstg2.h

Platforms

Win32, x64

LEAD Video Histogram View Filter User Interface


LEAD Video Histogram View Filter User Interface (2.0)

LEAD Video Histogram View Filter User Interface (2.0)

Use the Histogram View property page to view a histogram, or change the channel if the input is RGB24. When the mouse pointer is positioned over a control, general information about that control is displayed.


ILMVHistogVw Interface

ILMVHistogVw Interface

Data types:

enum
{
RGB8 = 1035,
RGB24,
REDCHANNEL,
GREENCHANNEL,
BLUECHANNEL,
ALLCHANNELS
};

Constants | Description
RGB8 | Sets the type to RGB8.
RGB24 | Sets the type to RGB24
REDCHANNEL | Use only the Red channel.
GREENCHANNEL | Use only the Green channel.
BLUECHANNEL | Use only the Blue channel.
ALLCHANNELS | Use the Master channel.

Properties:

Type

Name

Description

BOOL

RGBMode

TRUE to use RGB data, and FALSE for BGR.

long

HistogramType

Describes the histogram type: which channel will have its histogram displayed. Possible values are:

RGB8,

REDCHANNEL,

GREENCHANNEL,

BLUECHANNEL,

ALLCHANNELS.

BOOL

DefaultRGBMode

Default RGB mode.

Long

DefaultHistogramType

Default histogram type.

void

GetHistogramArray( long HistogramArray, long lFrameCount)

Retrieves the histogram for a frame. The HistogramArray parameter should be a 255 element array of the type long. You will pass the address of the first element in the array to the function. The lFrameCount is filled with a value indicating the frame the histogram refers to.


LEAD Video Mosaic Filter

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Mosaic Filter

Mosaic effect transforms any image into something that looks as though it were created by positioning a number of tiling elements, each of constant color and an approximate size. This filter applies the mosaic effect to a video stream with the ability to set the mosaic square size. The mosaic effect can be applied to a selected area (rectangle) only by changing the "Effect Area" attributes in the property page or using SetCropAttributes from the programming interface.

Filter Interface | ILMVMosaic, ILMVMosaicDisp , ILMMCommon
Interface ID | IID_ILMVMosaic, IID_ILMVMosaicDisp
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVMosaic
Property Page CLSID | CLSID_LMVMosaicPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMosc.dll
Header | ILMVMosaic.h

Platforms

Win32, x64

LEAD Video Mosaic Filter User Interface


LEAD Video Mosaic Filter User Interface

The Mosaic Video filter conceals a specific area of a video by giving it a "blocky" appearance. This effect can be applied to the entire video area, or to a selected rectangular area by changing the "Effect Area" attributes in the property page. The property page is shown in the figure below:

The Mosaic property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable Mosaic check box | Enables/Disables the effect.
Size slider | Size of the mosaic square, 1 to 64.
Enable effect area check box | Enables/Disables the effect for a cropped video area. Area limits are set using the Left, Top, Right and Bottom controls.
Left spin edit control | Left boundary of the effect area.
Top spin edit control | Top boundary of the effect area.
Right spin edit control | Right boundary of the effect area.
Bottom spin edit control | Bottom boundary of the effect area.


ILMVMosaic Interface

ILMVMosaic Interface

Data types

MOSAIC_ATTRIBUTES:

typedef struct
{
long lSquareSize;
BOOL bEnabled;
long lDSquareSize;
BOOL bDEnabled;
} MOSAIC_ATTRIBUTES;

Describes the mosaic effect properties.

Member | Description
lSquareSize | Size of the mosaic square, 1 to 64.
bEnabled | Indicates weather Mosaic effect is enabled (TRUE) or not (FALSE).
lDSquareSize | Default square size. Original default value is 1.
bDEnabled | Default mosaic Enable value. Original default value is TRUE.

CROP_ATTRIBUTES:

typedef struct
{
long lLeft;
long lTop;
long lRight;
long lBottom;
BOOL bEnabled;
long lDLeft;
long lDTop;
long lDRight;
long lDBottom;
BOOL bDEnabled;
} CROP_ATTRIBUTES;

Describes the area exposed to the mosaic effect.

Member | Description
lLeft | The left coordinate of the effect area rectangle.
lTop | The top coordinate of the effect area rectangle.
lRight | The right coordinate of the effect area rectangle.
lBottom | The bottom coordinate of the effect area rectangle.
bEnabled | Enables (TRUE) or disables (FALSE) the effect area.
lDLeft | Default left. Original value is 0.
lDTop | Default top. Original value is 0.
lDRight | Default right. Original value is 1.
lDBottom | Default bottom. Original value is 1.
bDEnabled | Default effect area enable status.

Interface Methods:

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT SetMosaicAttributes(MOSAIC_ATTRIBUTES mosaic_attributes)

Parameters

mosaic_attributes

a MOSIAC_ATTRIBUTES structure that contains the mosaic attributes to set.

Description

Sets the properties for the mosaic effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetMosaicAttributes(MOSAIC_ATTRIBUTES *mosaic_attributes)

Parameters

mosaic_attributes

a valid pointer to a MOSIAC_ATTRIBUTES structure to be updated with the current mosaic attributes.

Description

Retrieves the current mosaic attributes.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetCropAttributes(CROP_ATTRIBUTES crop_attributes)

Parameters

crop_attributes

a CROP_ATTRIBUTES structure that contains the effect area attributes to set.

Description

Sets the effect area attributes. If successful, effect is applied only to the passed rectangle.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetCropAttributes(CROP_ATTRIBUTES *crop_attributes)

Parameters

crop_attributes

a valid pointer to a CROP_ATTRIBUTES structure to be updated with the current effect area attributes.

Description

Retrieves the current effect area attributes.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth | A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.
plInHeight | A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.
plOutWidth | A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.
plOutHeight | A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIOBitCount(int *pInBitCount, int *pOutBitCount)

Parameters

pInBitCount | A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.
pPBitCount | A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.


ILMVMosaicDisp interface

ILMVMosaicDisp Interface

Interface Properties:

Type | Name | Description
long | SquareSize | Size of the mosaic square, 1 to 64.
BOOL | Enabled | Indicates weather the Mosaic effect is enabled (TRUE) or not (FALSE).
long | DefaultSquareSize | Default square size. Original default value is 1.
BOOL | DefaultEnabled | Default mosaic Enable value. Original default value is TRUE.
long | lLeft | The left coordinate of the effect area rectangle.
long | lTop | The top coordinate of the effect area rectangle.
long | lRight | The right coordinate of the effect area rectangle.
long | lBottom | The bottom coordinate of the effect area rectangle.
BOOL | EffectAreaEnabled | Enable (TRUE) or disables (FALSE) the effect area.
long | DefaultLeft | Default left. Original value is 0.
long | DefaultTop | Default top. Original value is 0.
long | DefaultRight | Default right. Original value is 1.
long | DefaultBottom | Default bottom. Original value is 1.
BOOL | DefaultEffectAreaEnabled | Default effect area enable status.
BOOL | IsLEADInputPinConnected | Read only; returns TRUE if the filter’s input pin is connected.
BOOL | IsLEADOutputPinConnected | Read only; returns TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.


LEAD Video Motion Detection Filter (2.0)

LEAD Video Motion Detection Filter (2.0)

The LEAD Video Motion Detection filter compares the current frame with the previous frame. Every time there is a difference between frames, the filter calls a user callback. You can programmatically find the rectangles where motion is detected.

The filter exposes its functionality through both user and programming interfaces.

Filter Interface(s) | ILMVMtnDet, ILMVMtnDetUserCallback , ILMMCommon
Interface ID | IID_ILMVMtnDet IID_ILMVMtnDetUserCallback
Input/Output Media Types | MEDIATYPE_Video And the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVMtnDet
Property Page(s) CLSID | CLSID_LMVMtnDetPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVMtnDet2.dll, DSKernel2.dll
Header | ILMVMtnDet2.h

Platforms

Win32, x64

LEAD Video Motion Detection Filter User Interface

You need to unlock the LEAD Video Motion Detection Filter to use it in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Video Motion Detection Filter User Interface (2.0)

LEAD Video Motion Detection Filter User Interface (2.0)

The Motion Detection property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Pass difference frames check box | If selected, the unchanged area is replaced with black. The areas containing the motion will remain unchanged.
View motion rectangle(s) check box | If selected, a white rectangle will be drawn around each area where motion is detected.
Sensitivity slider | Sets the Motion sensitivity. A small value specifies high detection sensitivity. A large value specifies low detection sensitivity.
Scattered motion spacing slider | Sets the maximum space between the boundaries of objects to be joined in a single object. This is a percentage of the maximum expected distance between two objects. Valid values range between 1 and 100.
Object size slider | Sets the minimum size an object must have in order to be considered an object. The size is a percentage of the video size (width and height).
Still Time (ms) slider | Sets the minimum duration for still periods (in milliseconds). A still period of at least this duration is required before motion is considered to be stopped. All periods without movement shorter than the minimum still time will be considered part of the motion. Use this to keep short periods of inactivity as part of the motion.
Hours interval edit box | Sets the time, in hours, of the delay time between checks for motion.
Minutes interval edit box | Sets the time, in minutes, of the delay time between checks for motion.
Seconds interval edit box | Sets the time, in seconds, of the delay time between checks for motion.
Milliseconds interval edit box | Sets the time, in milliseconds, of the delay time between checks for motion.
Hours delay edit box | Sets the time, in hours, to wait after motion detection is triggered, before motion detection actually starts.
Minutes delay edit box | Sets the time, in minutes, to wait after motion detection is triggered, before motion detection actually starts.
Seconds delay edit box | Sets the time, in seconds, to wait after motion detection is triggered, before motion detection actually starts.
Milliseconds delay edit box | Sets the time in milliseconds, to wait after motion detection is triggered, before motion detection actually starts.
Start detection button | Starts or stops the motion detection manually.
Auto start detection button | If selected, the motion detection process will start automatically after the delay time.
Enable region check box | If selected, the motion will be detected within the specified region.
Invert region check box | If selected, the motion will be detected outside the specified region.
Left edit box | Sets the Left region coordinates.
Top edit box | Sets the Top region coordinates.
Right edit box | Sets the Right region coordinates.
Bottom edit box | Sets the Bottom region coordinates.
Enable mosaic effect check box | If selected, the mosaic effect enabled on the non-region of interest area.
Mosaic effect slider | Sets the mosaic value.

LEAD Video Motion Detection Filter

ILMVMtnDet Interface

ILMVMtnDetUserCallback Interface


ILMVMtnDet Interface

ILMVMtnDet Interface

This is the interface for the LEAD Video Motion Detection Filter.

Interface Properties:

Type

Name

Description

long

Sensitivity

Set the Motion sensitivity. A small value specifies high detection sensitivity (smaller changes will trigger the callback). A large value specifies low detection sensitivity (and bigger changes are needed to trigger the callback).

long

ObjectSize

The Minimum object size to consider as an object. The size is a percentage of the video size (width and height). If the change is in a rectangle smaller than the object size, no callback will be triggered.

The allowed values are 1 to 100.

VARIANT_BOOL

ViewContainingRectangle

View containing rectangle around the objects.

If TRUE, a white rectangle will be drawn around each area where motion is detected.

If FALSE, no rectangle is drawn in the areas containing the motion. You can locate the rectangles containing motion using the RectCount, RectLeft, RectTop, RectWidth and RectHeight properties.

VARIANT_BOOL

ViewDifferenceFrames

View the different frames between the current frame and the reference frame.

If TRUE, the unchanged area is replaced with black. The areas containing the motion will remain unchanged. This means if there is no change, the images reaching the renderer will be all black. This should not be confused with the camera not working.

* If FALSE, both changed and unchanged area remain unchanged. The exception is area covered by the rectangles if you set the ViewContainingRectangle property to TRUE.

long

RectCount

(read-only) Number of rectangles where motion was detected.

This property is valid only while ILMVMtnDetUserCallback::CallbackProc is processed. Access this property only from inside CallbackProc. This property will throw an error if accessed any other time.

This property will be updated only while the rectangle info is not locked by the LockRectangleInfo method.

long

RectLeft (long lIndex)

(read-only) Left rectangle position (in pixels) for rectangle lIndex in which motion has been detected. lIndex is the rectangle index and should be between 0 and RectCount – 1 (inclusive).

This property is valid only while ILMVMtnDetUserCallback::CallbackProc is processed. Access this property only from inside CallbackProc. This property will throw an error if accessed any other time.

This property will be updated only while the rectangle info is not locked by the LockRectangleInfo method.

long

RectTop(long lIndex)

(read-only) Top rectangle position (in pixels) for rectangle lIndex in which motion has been detected. lIndex is the rectangle index and should be between 0 and RectCount – 1 (inclusive).

This property is valid only while ILMVMtnDetUserCallback::CallbackProc is processed. Access this property only from inside CallbackProc. This property will throw an error if accessed any other time.

This property will be updated only while the rectangle info is not locked by the LockRectangleInfo method.

long

RectWidth(long lIndex)

(read-only) Width (in pixels) for rectangle lIndex in which motion has been detected. lIndex is the rectangle index and should be between 0 and RectCount – 1 (inclusive).

This property is valid only while ILMVMtnDetUserCallback::CallbackProc is processed. Access this property only from inside CallbackProc. This property will throw an error if accessed any other time.

This property will be updated only while the rectangle info is not locked by the LockRectangleInfo method.

long

RectHeight(long lIndex)

(read-only) Height (in pixels) for rectangle lIndex in which motion has been detected. lIndex is the rectangle index and should be between 0 and RectCount – 1 (inclusive).

This property is valid only while ILMVMtnDetUserCallback::CallbackProc is processed. Access this property only from inside CallbackProc. This property will throw an error if accessed any other time.

This property will be updated only while the rectangle info is not locked by the LockRectangleInfo method.

ILMVMtnDetUserCallback

CallbackObj

(write-only) Set the callback object pointer.

If not NULL, the CallbackProc method of this interface will be called every time motion is detected. The callback will be called for every frame containing motion. For more information see the ILMVMtnDetUserCallback interface.

Set to NULL (or to "Nothing" in VB) if you do not wish to receive notifications anymore. (For example, before you delete the callback object interface).

long

MinStillTime

The minimum length of still periods (in milliseconds). A still period of at least this length is required before motion is considered stopped. All periods without movement shorter than the minimum still time will be considered still part of the motion. You use this to keep short periods of inactivity as part of the motion.

The allowed range is 0..1000000 ms (equivalent to 0..1000 sec).

Long

ScatteredMotionSpacing

Set the maximum space between the objects boundaries to be joined in a single object. This is a percentage of the maximum expected distance between two objects. The value range between 1 to 100.

Long

Interval

Set the time in milli seconds of the delay time between checks for motion.

Long

Delay

Set the time in milli seconds to wait, after motion detection is triggered, before motion detection actually starts.

VARIANT_BOOL

AutoStart

Set the AutoStart to VARIANT_TRUE to start the motion detection process automatically considering the delay time or Set it to VARIANT_FALSE to start the process manually using the StartDetect method. The StopDetection must be called to stop the detection If the AutoStart is VARIANT_TRUE.

StateConstants

State

Read only property that return the detection process state if it is running or stopped. Possible value is one of the StateConstants constants:

STATE_DETECTION_STOPPED: The filter doesn't ready to detect any motion.

STATE_DETECTION_RUNNING: The filter ready to detect any motion.

VARIANT_BOOL

EnableRegion

Enable the region of interest. The motion will be detected within the specified region.

VARIANT_BOOL

InvertRegionArea

Invert the region of interest. The motion will be detected outside the specified region.

long

Left

Set the Left region coordinates.

Long

Top

Set the Top region coordinates.

Long

Right

Set the Right region coordinates.

Long

Bottom

Set the Bottom region coordinates.

VARIANT_BOOL

EnableMosaic

Enable the mosaic effect on the non-region of interest area.

Long

Mosaic

Mosaic value. Value range between 1 to 64.

Interface Methods:

long LockRectangleInfo()

Parameters

None

Description

Locks the rectangle info and prevents the motion detection filter from changing it while the application is using it. The application should call this method while it is processing the rectangle information. Usually, the rectangle information is updated in one thread and the callback is called in another. So it is possible for the motion detection filter to update the rectangle information while the callback is being processed.

After calling this method, the following properties are not updated until UnlockRectangleInfo is called:

long RectCount

long RectLeft (long lIndex)

long RectTop(long lIndex)

long RectWidth(long lIndex)

long RectHeight(long lIndex)

The method is cumulative, so if you call LockRectangleInfo twice, you must also call UnlockRectangleInfo twice.

Typical use of this method is this:

/* From the user callback */

LockRectangleInfo();

/* Examine and process each rectangle */

UnlockRectangleInfo();

/* return from the user callback */

Returns

The lock count (the number of times LockRectangleInfo has been called without a corresponding UnlockRectangleInfo.

long UnlockRectangleInfo()

Parameters

None

Description

Indicates the application is not using the rectangle information properties and allows the motion detection filter to start updating the rectangle properties. See LockRectangleInfo for a list of properties affected by this method.

This method should be called once for each LockRectangleInfo() call.

Returns

The lock count. If this method returns 0, then the filter can update the rectangle information properties. If this method returns >0, then the rectangle information is still locked and will not be updated until the lock count reaches 0.


ILMVMtnDetUserCallback Interface

ILMVMtnDetUserCallback Interface

User Interface:

This is a user callback interface that should be implemented to receive notifications of when motion occurs. You register the callback by setting the ILMVMtnDet::CallbackObj property. This interface has one method.

typedef [v1_enum] enum MtnCalBkErrConstants
{
MTNCALBK_ERR_SUCCESS = 0,
MTNCALBK_ERR_PRESERVEDATA = 100,
} MtnCalBkErrConstants;

Interface Methods:

HRESULT CallbackProc(long lEvent, long pFrame, long lWidth, long lHeight, lBitCount, long lSize, VARIANT_BOOL bTopDown);

Parameters

lEvent | Type of frame. This parameter tells whether the current frame is a still frame or whether motion has been detected. Possible values are:
 | Value | Meaning
 | FRAME_TYPE_STARTMOTION | [0] This frame is a motion frame. The previous frame was a still frame, so this is the first frame in which motion has been detected.
 | FRAME_TYPE_MOTION | [1] This frame is a motion frame. The previous frame was also a motion frame.
 | FRAME_TYPE_STARTSTILL | [2] This frame is a still frame. The previous frame was a motion frame, so the motion has just stopped.
 | FRAME_TYPE_STILL | [3] This frame is a still frame. The previous frame was also a still frame.
pFrame | A valid pointer to the frame data. This contains the whole image. Any change you make to this data will be reflected in what is saved or displayed onto the screen.
lWidth | The width (in pixels) of the image pointed by pFrame.
lHeight | The height (in pixels) of the image pointed by pFrame.
lBitCount | The bits/pixel of the image pointed by pFrame. Currently, only 24-bit images are supported.
lFrameSize | The total size (in bytes) of the data pointed by pFrame.
bTopDown | TRUE if the image is top-left (the first byte represents pixel (0,0))
 | FALSE if the image is bottom-left (the first line in the buffer contains the last line in the image. To put it another way, first byte represents pixel (lHeight-1, 0).

Description

The filter will call this method when there is an object(s) that moves on the video. The pFrame parameter is the source frame data that contains the object(s). The lSize parameter is the frame size.

A frame is considered to be a "Motion" frame if lEvent is FRAME_TYPE_STARTMOTION or FRAME_TYPE_MOTION. A frame is considered to be a "Still" frame if lEvent is FRAME_TYPE_STARTSTILL or FRAME_TYPE_STILL.

While processing this event, you can obtain the rectangles where the movement was detected using ILMVMtnDet::RectCount, ILMVMtnDet::RectLeft, ILMVMtnDet::RectTop, ILMVMtnDet::RectWidth and ILMVMtnDet::RectHeight properties. These rectangles are valid only for the motion frames. For still frames, ILMVMtnDet::RectCount will be 0.

You can access these properties ONLY while processing CallbackProc. You should not perform lengthy calculations in this callback because no other images will be processed while you are inside CallbackProc.

The user can do any effect over the frames by making changes on the frames data, in this case the callback function must return MTNCALBK_ERR_PRESERVEDATA value in order to preserve user changes.

Returns

MTNCALBK_ERR_SUCCESS or MTNCALBK_ERR_PRESERVEDATA if successful, an HRESULT error code otherwise.


LEAD Video Overlay Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Overlay Filter (2.0)

The LEAD Video Overlay filter is a DirectShow transform filter that enables overlaying video and images on a video stream. The filter has two video inputs; the first one is the main; the second one is the secondary. The filter will not work if the first pin is not connected. If the second pin is connected, then the second video is active, or available. If the second pin is not connected, then there is no second video. In this case you may only have a bitmap overlay.

Each instance of the filter supports four layers: First video, Second video, Overlay image, and a solid background color. The four supported layers can be ordered as needed. Supported layers can be customized through a set of properties that include a mask image, transparency, and positioning.

The dimensions of the output stream are the maximum of the 2 input video streams. The overlay image layer does not contribute to the output dimensions. However, the output stream frame rate and duration are the same as those for the first video, at pin 0.

The filter exposes its functionality through both user and programming interfaces.

Programmatically overlaying one video on another video is not currently supported using our Multimedia SDK and can only be implemented using DirectShow directly.

You must unlock the LEAD Video Overlay Filter in order to use it. For more information, refer to Evaluation Mechanism Overview.

Filter Interface(s) | ILMVVOvLy , ILMMCommon
Interface ID | IID_ILMVVOvLy
Input/Output Media Types | MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVVOvLy
Property Page(s) CLSID | CLSID_LMVVOvLyPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVVOvLy2.dll, DSKernel2.dll
Header | ILMVVOvLy2.h

Platforms

Win32, x64

LEAD Video Overlay Filter User Interface


LEAD Video Overlay Filter User Interface (2.0)

LEAD Video Overlay Filter User Interface (2.0)

The Video Overlay property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Overlay image file name browse button | If the Overlay image layer is selected, clicking the browse button opens a MS Windows Open dialog so the user can select an overlay image file.
BK Color button | If the Background color layer is selected, opens a Color dialog so the user can select the background color.
Layers order list | Contains the available layers. Change the layer order by clicking Send to Back or Send to Front.
Send to back button | Moves the selected layer to the back by one layer.
Send to front button | Moves the selected layer to the front by one layer.
Enable mask image check box | Enables or disables the mask bitmap feature for the selected layer. When the mask bitmap is used for a layer, this layer’s opacity and transparency properties will be ignored.
Mask image file name browse button | If a mask image is being used, opens an MS Windows Open dialog so the mask image can be selected. The mask image must be an 8-bpp gray scale Windows BMP file
Region type drop-down list box | Selects a region for the selected layer. The pixels inside the region will be considered part of this layer
Left spin box | Sets the coordinate of the left boundary of the region of the selected layer.
Top spin box | Sets the coordinate of the top boundary of the region of the selected layer.
Right spin box | Sets the coordinate of the right boundary of the region of the selected layer.
Bottom spin box | Sets the coordinate of the bottom boundary of the region of the selected layer.
Round rect width spin box | Sets the width of the ellipse used to draw the rounded corners of a rounded rectangle region in the selected layer.
Round rect height spin box | Sets the height of the ellipse used to draw the rounded corners of a rounded rectangle region in the selected layer.
Enable transparency check box | Enables or disables the transparency feature for the selected layer. When transparency is enabled for a layer, the Opacity property for this layer is ignored.
Transp color button | If transparency has been selected, opens a Color dialog so the transparent color for the layer can be selected.
Enable opacity check box | Enables or disables the opacity feature of the selected layer. When the opacity feature is enabled for a layer, the transparency feature for this layer is ignored.
Opacity spin box | If opacity has been selected, sets the opacity, as a percentage, for the selected layer.
X pos spin box | Sets the X coordinate of the position of the selected layer. Values range from 0 to the output stream width. The output stream width is the maximum width of the 2 input videos.
Y pos spin box | Gets or sets the Y coordinate of the position of the selected layer. Values range from 0 to the output stream height. The output stream height is the maximum height of the 2 input videos.

LEAD Video Overlay Filter

ILMVVOvLy Interface


ILMVVOvLy Interface

ILMVVOvLy Interface

This is the interface for the LEAD Video Overlay Filter.

Data types

RegionConstants

typedef [v1_enum] enum RegionConstants
{
REGION_NONE = 0,
REGION_RECT = 1,
REGION_ROUNDRECT = 2,
REGION_ELLIPSE = 3,
} RegionConstants;

Describes a region in a layer.

Member | Description
REGION_NONE | The layer has no region.
REGION_RECT | The layer has a rectangular region.
REGION_ROUNDRECT | The layer has a round rectangular region.
REGION_ELLIPSE | The layer has an elliptical region.

LayerTypeConstants

typedef [v1_enum] enum LayerTypeConstants
{
LAYERTYPE_BACKGROUND = 0,
LAYERTYPE_VIDEO1 = 1,
LAYERTYPE_VIDEO2 = 2,
LAYERTYPE_OVERLAYIMAGE = 3
} LayerTypeConstants;

Constants that define the supported layer types. These will be used to identify the layer to be acted upon in the ILMVVovly interface properties and methods.

Member | Description
LAYERTYPE_BACKGROUND | The background layer is a solid color.
LAYERTYPE_VIDEO1 | The first video layer: The video stream connected to pin 0. This layer must exist (the first pin of the filter must be connected), in order for the filter to work.
LAYERTYPE_VIDEO2 | The second video layer: The video stream connected to pin 1.
LAYERTYPE_OVERLAYIMAGE | The overlay image layer: An ordinary bitmap, icon, or cursor.

Interface Properties

Type | Name | Parameter Description | Description
Long | ActiveLayersCount | None | Gets the number of active layers. An active layer is an available layer.
VARIANT_BOOL | IsLayerActive (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer to test. | Determines whether the specified layer is active.
Long | LayerOrder (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get the order. | Gets or sets a value that indicates the specified layer's order. The order range is from 0 to 3, where 0 indicates most distant position.
BSTR | OverlayImageFileName | None | Gets or sets the name of the image file used as the overlay image layer. The image should be a 24-bpp Windows BMP file or an Icon file. Pass NULL to free the loaded image.
Long | OverlayImageDIBPointer | None | Sets a pointer to a device independent bitmap to be used as the overlay image layer. This overlay image handle pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
VARIANT_BOOL | IsOverlayImageLoaded | None | Gets or sets a value that indicates whether the image used as the overlay image layer is loaded.
Long | BkLayerColor | None | Gets or sets the color of the background layer.
VARIANT_BOOL | EnableMaskBitmap (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to enable or disable the mask bitmap. | Enablesor disables the mask bitmap feature for the specified layer. When the mask bitmap is used for a layer, this layers opacity and transparency properties will be ignored.
BSTR | MaskImageFileName (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the file name of the mask bitmap. | Gets or sets the file name of the mask image to be used for the specified layer. The mask image must be an 8-bpp gray scale Windows BMP file. Pass NULL to free the loaded image.
Long | MaskImageDIBPointer (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to set the DIB pointer. | Sets a pointer to a device independent bitmap to be used as the mask image for the specified layer. This pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
VARIANT_BOOL | IsMaskImageLoaded (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to determine whether the mask image is loaded. | Gets or sets a value that indicates whether the mask image for the specified layer is loaded.
VARIANT_BOOL | EnableOpacity (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to enable or disable opacity. | Enables or disables the opacity feature of the specified layer. When the opacity feature is enabled for a layer, the transparency feature for this layer is ignored.
Long | Opacity (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the opacity. | Gets or sets the opacity, as a percentage, for the specified layer.
VARIANT_BOOL | EnableTransparency (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to enable or disable transparency. | Enables or disables the transparency feature for the specified layer. When transparency is enabled for a layer, the Opacity property for this layer is ignored.
Long | TransparentColor (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the transparent color. | Gets or sets the transparent color for the specified layer.
Long | XPos (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the X coordinate of the position. | Gets or sets the X coordinate of the position of the specified layer. Values range from 0 to the output stream width. The output stream width is the maximum width of the 2 input videos.
Long | YPos (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the Y coordinate of the position. | Gets or sets the Y coordinate of the position of the specified layer. Values range from 0 to the output stream height. The output stream height is the maximum height of the 2 input videos.
RegionConstants | Region (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the region. | Gets or sets a region for the specified layer. After setting a region for a layer, pixels inside the region will be considered part of this layer. See RegionConstants, above, for more information on region types.
Long | RgnLeft (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the region's left boundary. | Gets or sets the coordinate of the left boundary of the region in the specified layer. This coordinate represents either the coordinate of the left boundary of a rectangular region itself, or the coordinate of the left boundary of the bounding box of the region.
Long | RgnTop (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the coordinate of the region's top boundary. | Gets or sets the coordinate of the top boundary of the region in the specified layer. This coordinate represents either the coordinate of the top boundary of a rectangular region itself, or the coordinate of the top boundary of the bounding box of the region.
Long | RgnRight (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the region's right boundary. | Gets or sets the coordinate of the right boundary of the region in the specified layer. This coordinate represents either the coordinate of the right boundary of a rectangular region itself, or the coordinate of the right boundary of the bounding box of the region.
Long | RgnBottom (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the coordinate of the region's bottom boundary. | Gets or sets the coordinate of the bottom boundary of the region in the specified layer. This coordinate represents either the coordinate of the bottom boundary of a rectangular region itself, or the coordinate of the bottom boundary of the bounding box of the region.
Long | RgnRoundRectEllipseWidth (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the width of the ellipse. | Gets or sets the width of the ellipse used to draw the rounded corners of a rounded rectangle region in the specified layer.
Long | RgnRoundRectEllipseHeight (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the height of the ellipse. | Gets or sets the height of the ellipse used to draw the rounded corners of a rounded rectangle region in the specified layer.

Interface Methods

HRESULT GetLayerInfo(LayerTypeConstants LayerType, long *pWidth, long *pHeight, long *pBitsPerPixel)

Parameters

LayerType | LayerTypeConstants value that indicates the layer for which to get the information
pWidth | pointer to a variable to be updated with the width of the specified layer.
pHeight | pointer to a variable to be updated with the height of the specified layer.
pBitsPerPixel | pointer to a variable to be updated with the bits per pixel of the specified layer.

Description

Gets information for the specified layer. If the specified layer is not available, all parameters are updated with zeros.

Returns

S_OK if successful, S_FALSE otherwise.


LEAD Video Image Overlay Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Image Overlay Filter (2.0)

The LEAD Video Image Overlay filter is a DirectShow transform filter that enables overlaying images on a video stream. The filter has a single video input which must be connected in order for the filter to work.

Each instance of the filter supports three layers: Video, Overlay image, and a solid background color. The three supported layers can be ordered as needed. Supported layers can be customized through a set of properties that include a mask image, transparency, and positioning.

The dimensions of the output stream match the input video stream. The overlay image layer does not contribute to the output dimensions.

The filter exposes its functionality through both user and programming interfaces.

You must unlock the LEAD Video Image Overlay Filter in order to use it. For more information, refer to Evaluation Mechanism Overview.

Filter Interface(s) | ILMVIOvLy , ILMMCommon
Interface ID | IID_ILMVIOvLy
Input/Output Media Types | MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24
Filter CLSID | CLSID_LMVIOvLy
Property Page(s) CLSID | CLSID_LMVIOvLyPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVIOvLy2.dll, DSKernel2.dll
Header | ILMVIOvLy2.h

Platforms

Win32, x64

LEAD Video Image Overlay Filter User Interface


LEAD Video Image Overlay Filter User Interface (2.0)

LEAD Video Image Overlay Filter User Interface (2.0)

The Video Image Overlay property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Overlay image file name browse button | If the Overlay image layer is selected, clicking the browse button opens a MS Windows Open dialog so the user can select an overlay image file.
BK Color button | If the Background color layer is selected, opens a Color dialog so the user can select the background color.
Layers order list | Contains the available layers. Change the layer order by clicking Send to Back or Send to Front.
Send to back button | Moves the selected layer to the back by one layer.
Send to front button | Moves the selected layer to the front by one layer.
Enable mask image check box | Enables or disables the mask bitmap feature for the selected layer. When the mask bitmap is used for a layer, this layer-s opacity and transparency properties will be ignored.
Mask image file name browse button | If a mask image is being used, opens an MS Windows Open dialog so the mask image can be selected. The mask image must be an 8-bpp gray scale Windows BMP file
Region type drop-down list box | Selects a region for the selected layer. The pixels inside the region will be considered part of this layer
Left spin box | Sets the coordinate of the left boundary of the region of the selected layer.
Top spin box | Sets the coordinate of the top boundary of the region of the selected layer.
Right spin box | Sets the coordinate of the right boundary of the region of the selected layer.
Bottom spin box | Sets the coordinate of the bottom boundary of the region of the selected layer.
Round rect width spin box | Sets the width of the ellipse used to draw the rounded corners of a rounded rectangle region in the selected layer.
Round rect height spin box | Sets the height of the ellipse used to draw the rounded corners of a rounded rectangle region in the selected layer.
Enable transparency check box | Enables or disables the transparency feature for the selected layer. When transparency is enabled for a layer, the Opacity property for this layer is ignored.
Transp color button | If transparency has been selected, opens a Color dialog so the transparent color for the layer can be selected.
Enable opacity check box | Enables or disables the opacity feature of the selected layer. When the opacity feature is enabled for a layer, the transparency feature for this layer is ignored.
Opacity spin box | If opacity has been selected, sets the opacity, as a percentage, for the selected layer.
X pos spin box | Sets the X coordinate of the position of the selected layer. Values range from 0 to the output stream width. The output stream width is the maximum width of the 2 input videos.
Y pos spin box | Gets or sets the Y coordinate of the position of the selected layer. Values range from 0 to the output stream height. The output stream height is the maximum height of the 2 input videos.

LEAD Video Image Overlay Filter (2.0)

ILMVIOvLy Interface


ILMVIOvLy Interface

ILMVIOvLy Interface

This is the interface for the LEAD Video Image Overlay Filter.

Data types

RegionConstants

typedef [v1_enum] enum RegionConstants
{
REGION_NONE = 0,
REGION_RECT = 1,
REGION_ROUNDRECT = 2,
REGION_ELLIPSE = 3,
} RegionConstants;

Describes a region in a layer.

Member | Description
REGION_NONE | The layer has no region.
REGION_RECT | The layer has a rectangular region.
REGION_ROUNDRECT | The layer has a round rectangular region.
REGION_ELLIPSE | The layer has an elliptical region.

LayerTypeConstants

typedef [v1_enum] enum LayerTypeConstants
{
LAYERTYPE_BACKGROUND = 0,
LAYERTYPE_VIDEO = 1,
LAYERTYPE_OVERLAYIMAGE = 2
} LayerTypeConstants;

Constants that define the supported layer types. These will be used to identify the layer to be acted upon in the ILMVIovly interface properties and methods.

Member | Description
LAYERTYPE_BACKGROUND | The background layer is a solid color.
LAYERTYPE_VIDEO | The video stream connected to pin 0. This layer must exist (the first pin of the filter must be connected), in order for the filter to work.
LAYERTYPE_OVERLAYIMAGE | The overlay image layer: An ordinary bitmap, icon, or cursor.

Interface Properties

Type | Name | Parameter Description | Description
Long | ActiveLayersCount | None | Gets the number of active layers. An active layer is an available layer.
VARIANT_BOOL | IsLayerActive (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer to test. | Determines whether the specified layer is active.
Long | LayerOrder (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get the order. | Gets or sets a value that indicates the specified layer's order. The order range is from 0 to 3, where 0 indicates most distant position.
BSTR | OverlayImageFileName | None | Gets or sets the name of the image file used as the overlay image layer. The image should be a 24-bpp Windows BMP file or an Icon file. Pass NULL to free the loaded image.
Long | OverlayImageDIBPointer | None | Sets a pointer to a device independent bitmap to be used as the overlay image layer. This overlay image handle pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
VARIANT_BOOL | IsOverlayImageLoaded | None | Gets or sets a value that indicates whether the image used as the overlay image layer is loaded.
Long | BkLayerColor | None | Gets or sets the color of the background layer.
VARIANT_BOOL | EnableMaskBitmap (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to enable or disable the mask bitmap. | Enablesor disables the mask bitmap feature for the specified layer. When the mask bitmap is used for a layer, this layers opacity and transparency properties will be ignored.
BSTR | MaskImageFileName (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the file name of the mask bitmap. | Gets or sets the file name of the mask image to be used for the specified layer. The mask image must be an 8-bpp gray scale Windows BMP file. Pass NULL to free the loaded image.
Long | MaskImageDIBPointer (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to set the DIB pointer. | Sets a pointer to a device independent bitmap to be used as the mask image for the specified layer. This pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
VARIANT_BOOL | IsMaskImageLoaded (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to determine whether the mask image is loaded. | Gets or sets a value that indicates whether the mask image for the specified layer is loaded.
VARIANT_BOOL | EnableOpacity (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to enable or disable opacity. | Enables or disables the opacity feature of the specified layer. When the opacity feature is enabled for a layer, the transparency feature for this layer is ignored.
Long | Opacity (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the opacity. | Gets or sets the opacity, as a percentage, for the specified layer.
VARIANT_BOOL | EnableTransparency (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to enable or disable transparency. | Enables or disables the transparency feature for the specified layer. When transparency is enabled for a layer, the Opacity property for this layer is ignored.
Long | TransparentColor (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the transparent color. | Gets or sets the transparent color for the specified layer.
Long | XPos (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the X coordinate of the position. | Gets or sets the X coordinate of the position of the specified layer. Values range from 0 to the output stream width. The output stream width is the maximum width of the 2 input videos.
Long | YPos (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the Y coordinate of the position. | Gets or sets the Y coordinate of the position of the specified layer. Values range from 0 to the output stream height. The output stream height is the maximum height of the 2 input videos.
RegionConstants | Region (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the region. | Gets or sets a region for the specified layer. After setting a region for a layer, pixels inside the region will be considered part of this layer. See RegionConstants, above, for more information on region types.
Long | RgnLeft (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the region's left boundary. | Gets or sets the coordinate of the left boundary of the region in the specified layer. This coordinate represents either the coordinate of the left boundary of a rectangular region itself, or the coordinate of the left boundary of the bounding box of the region.
Long | RgnTop (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the coordinate of the region's top boundary. | Gets or sets the coordinate of the top boundary of the region in the specified layer. This coordinate represents either the coordinate of the top boundary of a rectangular region itself, or the coordinate of the top boundary of the bounding box of the region.
Long | RgnRight (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the region's right boundary. | Gets or sets the coordinate of the right boundary of the region in the specified layer. This coordinate represents either the coordinate of the right boundary of a rectangular region itself, or the coordinate of the right boundary of the bounding box of the region.
Long | RgnBottom (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the coordinate of the region's bottom boundary. | Gets or sets the coordinate of the bottom boundary of the region in the specified layer. This coordinate represents either the coordinate of the bottom boundary of a rectangular region itself, or the coordinate of the bottom boundary of the bounding box of the region.
Long | RgnRoundRectEllipseWidth (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the width of the ellipse. | Gets or sets the width of the ellipse used to draw the rounded corners of a rounded rectangle region in the specified layer.
Long | RgnRoundRectEllipseHeight (LayerTypeConstants LayerType) | LayerTypeConstants value that indicates the layer for which to get or set the height of the ellipse. | Gets or sets the height of the ellipse used to draw the rounded corners of a rounded rectangle region in the specified layer.

Interface Methods

HRESULT GetLayerInfo(LayerTypeConstants LayerType, long *pWidth, long *pHeight, long *pBitsPerPixel)

Parameters

LayerType | LayerTypeConstants value that indicates the layer for which to get the information
pWidth | pointer to a variable to be updated with the width of the specified layer.
pHeight | pointer to a variable to be updated with the height of the specified layer.
pBitsPerPixel | pointer to a variable to be updated with the bits per pixel of the specified layer.

Description

Gets information for the specified layer. If the specified layer is not available, all parameters are updated with zeros.

Returns

S_OK if successful, S_FALSE otherwise.


LEAD Video Resize Filter (2.0)

LEAD Video Resize Filter (2.0)

Use the LEAD Video Resize filter to change the dimensions of a source movie, resulting in new media with new dimensions and size. Four types of resizing algorithms are available: Resampling, Bresenham resizing, Bicubic interpolation, and Normal. The user interface makes it possible to adjust the filter's parameters: Width, Height, Aspect ratio, ratio size (i.e. 2X, Normal, X/2, ...) etc.

Filter Interface | ILMVResize, ILMMCommon
Interface ID | IID_ILMVResize
Input/Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB8 (gray)
Filter CLSID | CLSID_LMVResize
Property Page CLSID | CLSID_LMVResizePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVRsz2.dll, DSKernel2.dll
Header | ILMVRsz2.h

Platforms

Win32, x64

LEAD Video Resize Filter User Interface (2.0)

The LEAD Video Resize filter is included as part of the following modules:


LEAD Video Resize Filter User Interface

LEAD Video Resize Filter User Interface (2.0)

The Resize Video filter resizes a video by adjusting the width and height of the frames. The video can be resized using normal resizing, Bresenham interpolation, Bresampling (Bilinear interpolation) or bicubic Interpolation. The user interface lets you specify the following parameters: Width, Height, aspect ratio settings, etc. The property page is shown in the figure below:

The Resize property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Predefined output size radio button | If selected, the output size will be one of the predefined output sizes.
Custom output size radio button | If selected, the output size will be custom (Width x Height).
Width spin edit box | New width to use, in pixels
Height spin edit box | New height to use, in pixels
Normal radio button | If selected, uses normal resizing, which is the fastest but provides less quality than other types of resizing.
Bresenham radio button | If selected, uses Bresenham resizing, which is slower than Normal resizing but provides better quality. (This is the default).
Resample radio button | If selected, uses resampling, which is slower than Bresenham resizing but provides slightly better quality.
Cubic radio button | If selected, uses bi-cubic resizing, which is slower than resampling but provides better quality.
Input display aspect ratio drop-down list box | Specifies the aspect ratio of the input video. It allows you to use the input aspect ratio or to override it with another aspect ratio.
Custom input aspect ratio X | Value of custom aspect ratio (X component). Enabled only if the input aspect ratio is set to "Custom aspect ratio".
Custom input aspect ratio Y | Value of custom aspect ratio (Y component). Enabled only if the input aspect ratio is set to "Custom aspect ratio".
Output display aspect ratio drop-down list box | Specifies the aspect ratio of the output video. It allows you to use the input aspect ratio or to override it with another aspect ratio.
Custom output aspect ratio X | Value of custom aspect ratio (X component). Enabled only if the output aspect ratio is set to "Custom aspect ratio".
Custom output aspect ratio Y | Value of custom aspect ratio (Y component). Enabled only if the output aspect ratio is set to "Custom aspect ratio".
Stretch mode drop-down list box | Allows you to specify whether the input should be stretched to the output or whether the aspect ratio should be preserved.
Width control mode drop-down list box | Specifies whether the filter can modify the output width.
Height control mode drop-down list box | Specifies whether the filter can modify the output height.
Square pixel output mode drop-down list box | Specifies what to do if the output does not have square pixels and the downstream filter does not preserve the aspect ratio. This setting allows you to specify how to modify the output width and height if the downstream filter insists on a square pixel output. This option overrides the Width control mode and Height control mode settings. (In other words, this indicates what should be down if the output media type is not VIDEOINFO2).
Force square pixel output check box | Force the output to be square pixels (VIDEOINFO). In this case, the output might be resized as specified by the Square pixel output mode drop-down list box.
Fill Color button | Select the Fill Color button to select the color from the Color Palette dialog. This color will be used to fill the different size.
Automatically stop check box | If selected, allows the graph to be stopped automatically. This is needed when the dimensions change while the graph is running. You must re-run the graph after the change is applied.

Notes and comments

Some video streams contain aspect ratio information which instruct how the video should be displayed on the screen. For example, a video might be 480x480 and have an aspect ratio of 4:3 which means "the ratio of the output width to the output height should be 4:3 in order for the video to look good". Usually, video player will enlarge the width or height in order to accomplish this. In this example, the video should be resized to 640x480 for it to "look good". When viewed at 480x480, all objects will look narrower than in reality (for example, all actors in a film will seem very tall and thin).

MPEG and DVD are the most common video formats that contain aspect ratio information. DVD in particular contains ONLY wideo with 4:3 or 16:9 aspect ratio. So, when you create MPEG2 files that will be burned onto a DVD, you should generate video with a 16:9 or 4:3 output aspect ratio. To do that, you should set the output aspect ratio to 4:3 or 16:9 and specify an output video size of 720 x 480.

Q: What is "square pixel" output?

A: A video is said to have square pixels if each pixel making up the video is square. Notice that this does NOT mean the output width is equal to the output height. In other words, the output display aspect ratio should match the ratio of width : height. For example, a video that is 640:480 with an aspect ratio of 4:3 has square pixels because:

640/480 = (4*160)/(3*160) = 4/3

By contrast, a video that is 480x480 with a 4:3 aspect ratio does not have square pixels because 480/480 = 1 and not 4/3.

Q: Why do we need to bother with the aspect ratio?

A: If we don't pay attention to the aspect ratio, the generated files might look distorted when played in players that pay attention to the aspect ratio (eg: Media Player or DVD players).

Q: What is VIDEOINFO and VIDEOINFO2?

A: There are two main ways of specifying video in DirectShow . VIDEOINFO is the most common media type, but it does not contain aspect ratio info. VIDEOINFO2 is supported by fewer filters, but it contains aspect ratio information. Most filters, compressors and output containers (such as AVI) support this media type but do not support VIDEOINFO2. This means that video processed with filters or compressors that support only VIDEOINFO media type will lose the aspect ratio information, which would make video with non-square pixels look distorted when saved in these formats. To compensate for this, the resize filter provides you with settings in the "Non-aspect output settings group" for dealing with this situation. The resize will try to hand the next filter in the graph video with aspect ratio information. If the filter refuses that format, the resize will offer a second format (of possibly different size) that has square pixels. In some situations, the next filter might accept aspect ratio information but the following filter or the final format does not support aspect ratio information, use the Force square pixel output check box to force the resize filter to offer only VIDEOINFO output (with square pixels).

The resize is performed in various stages:

Stage 1: Convert the input video to square pixels.

In this stage, the input video and its aspect ratio is converted to square pixels output by using the standard method in DirectShow (the video enlargement). The adjusted input display aspect ratio is calculated from any input aspec ratio and the Input display aspect ratio drop-down list box. (The list box overrides the input aspect ratio). If the adjusted input display aspect ratio determines the input video has square pixels, this step is skipped. Otherwise, the smallest rectangle whose width and height ratio is the same as the display ratio is calculated so that it contains the input width and height. In some situations, the width is increased. In other situations, the height is increased. We will now refer to this as the Virtual Input Size.

Example: input video = 480x480, with square pixels. Input display aspect ratio is set to "4:3 aspect ratio".
In this case, the Virtual Input Size = 640x480

Stage 2: Calculate the output size and the output aspect ratio

In this stage, the required output size is calculated from the predefined or custom output size. The predefined output size is calculated from the Virtual input size (not the real input size).

The output display aspect ratio is calculated based on the Output display aspect ratio drop-down list box. If the output display aspect ratio is not square pixels, the filter will attempt to adjust the output video size if the Width control mode or the Height control mode settings allow it as follows:

* If one of these settings is fixed and the other is adjustable, the adjustable size is calculated from the non-adjustable size.

* If both the width and height are adjustable, the output size is calculated according to the Stretch mode.

In either case, if at least one of the output width and height are adjustable, the output will contain square pixels because the output width : height will match the output aspect ratio.

We will call this the Output size.

Stage 3: Calculate the virtual output size and the output aspect ratio

The Virtual Output Size is calculated by resizing the Virtual Input Size into the Output size using the Stretch mode. The Virtual Output Size can be larger or smaller than the Output Size. If the Virtual Output Size is smaller, colored bars will be added to fill the remaining area. If it is bigger, portions of the video will be cropped.

If the output is forced to be square pixels, the Virtual Output Size and the Output Size might be adjusted one last time according to the Non-aspect output settings.

Examples of useful combination of settings:

Example 1: Settings for generating DVDs for a file with correct aspect ratio information:

Custom output size: 720 x 480

Resize method: Bresenham (best compromise between speed and quality)

Input display aspect ratio: Use Input aspect ratio

Output display aspect ratio: 16:9 aspect ratio (or 4:3 aspect ratio)

Stretch mode: Fit width

Width control mode: Fixed

Height control mode: Fixed

Square pixel output mode: Keep the same size (but remember to select the correct aspect ratio in the MPEG2 encoder)

Example 2: Settings for correct playing of files with correct aspect ratio information or converting to file formats that do not support aspect ratio information:

Predefined output size: Normal

Resize method: Bresenham (best compromise between speed and quality)

Input display aspect ratio: Use Input aspect ratio

Output display aspect ratio: Square pixels

Stretch mode: Enlarge width/height

Width control mode: Adjustable

Height control mode: Adjustable


ILMVResize Interface

ILMVResize Interface

This is the interface for the LEAD Video Resize filter.

Data types:

QUICKRESIZE:

typedef
 enum
{
RESIZE_1OVER8 = 0,
RESIZE_1OVER4 = 1,
RESIZE_1OVER2 = 2,
RESIZE_NORMAL = 3,
RESIZE_X2     = 4,
RESIZE_X4     = 5,
RESIZE_X8     = 6
} QUICKRESIZE;

Holds the predefined resizing constants.

Constant | Description
RESIZE_1OVER8 | The output width and height are 1/8 of the source width and height.
RESIZE_1OVER4 | The output width and height are 1/4 of the source width and height.
RESIZE_1OVER2 | The output width and height are 1/2 of the source width and height.
RESIZE_NORMAL | The output width and height are same as the source width and height.
RESIZE_X2 | The output width and height are 2X of the source width and height.
RESIZE_X4 | The output width and height are 4X of the source width and height.
RESIZE_X8 | The output width and height are 8X of the source width and height.

SIZETYPES:

typedef enum
{
RESIZE_NORMAL = 0x0000,
RESIZE_BRESENHAM = 0x0001,
RESIZE_RESAMPLE = 0x0002,
RESIZE_BICUBIC = 0x0004,
} SIZETYPES;

Holds the resizing algorithms constants.

Constant | Description
RESIZE_NORMAL | Use the normal resizing method.
RESIZE_BRESENHAM | Use Bresenham resizing.
RESIZE_RESAMPLE | Use resampling.
RESIZE_BICUBIC | Use bicubic resizing.

InputAspectRatioModeConstants:

typedef enum
{
INPUTASPECTRATIO_SQUAREPIXELS = 0,
INPUTASPECTRATIO_USEINPUT = 1,
INPUTASPECTRATIO_CUSTOM = 2,
INPUTASPECTRATIO_4_3 = 10,
INPUTASPECTRATIO_16_9 = 11,
} InputAspectRatioModeConstants;

Constant | Description
INPUTASPECTRATIO_SQUAREPIXELS | Ignore the any input aspect ratio and consider the input to be square pixels.
INPUTASPECTRATIO_USEINPUT | Use the input aspect ratio (if present). Otherwise, consider the input to be square pixels.
INPUTASPECTRATIO_CUSTOM | Ignore any input aspect ratio and consider it to be given by the CustomInputAspectRatioWidth and CustomInputAspectRatioHeight properties.
INPUTASPECTRATIO_4_3 | Ignore the input aspect ratio and consider it to be 4:3.
INPUTASPECTRATIO_16_9 | Ignore the input aspect ratio and consider it to be 16:9.

OutputAspectRatioModeConstants:

typedef enum
{
OUTPUTASPECTRATIO_SQUAREPIXELS = 0,
OUTPUTASPECTRATIO_USEINPUT = 1,
OUTPUTASPECTRATIO_CUSTOM = 2,
OUTPUTASPECTRATIO_4_3 = 10,
OUTPUTASPECTRATIO_16_9 = 11,
} OutputAspectRatioModeConstants;

Constant | Description
OUTPUTASPECTRATIO_SQUAREPIXELS | Make the output aspect ratio square pixels.
OUTPUTASPECTRATIO_USEINPUT | Make the output aspect ratio be the same as the input aspect ratio.
OUTPUTASPECTRATIO_CUSTOM | Use the output aspect ratio given by the CustomOutputAspectRatioWidth and CustomOutputAspectRatioHeight properties.
OUTPUTASPECTRATIO_4_3 | Make the output have a 4:3 aspect ratio.
OUTPUTASPECTRATIO_16_9 | Make the output have a 4:3 aspect ratio.

StretchModeConstants:

typedef enum
{
STRETCHMODE_STRETCH,
STRETCHMODE_FITWIDTH,
STRETCHMODE_FITHEIGHT,
STRETCHMODE_FIT,
STRETCHMODE_ENLARGEDFIT,
} StretchModeConstants;

Constant | Description
STRETCHMODE_STRETCH | Ignore any input aspect ratio and stretch the video to the output width and height. Ignore the WidthControlMode and HeightControlMode properties (consider them both as Fixed).
STRETCHMODE_FITWIDTH | Resize the video by preserving the aspect ratio and fit to width. This might cause colored bars on top and bottom of the video or it can cause the top and bottom of the video to be truncated.
STRETCHMODE_FITHEIGHT | Resize the video by preserving the aspect ratio and fit to height. This might cause colored bars on left and rigth side of the video or it can cause the left and right side of the video to be truncated.
STRETCHMODE_FIT | Resize the video by preserving the aspect ratio and fit both width and height inside the output rectangle. This might add colored bars on the edges.
STRETCHMODE_ENLARGEDFIT | Resize the video by preserving the aspect ratio and enlarging the width or height so the output rectangle fits inside the resulting output. (This is the default resize mode performed by the DirectShow renderers). This might cause video edges to be cropped.

SizeControlModeConstants:

typedef enum
{
SIZECONTROL_FIXED,
SIZECONTROL_ADJUSTABLE,
} SizeControlModeConstants;

Constant | Description
SIZECONTROL_FIXED | Keep the output size (width or height) fixed.
SIZECONTROL_ADJUSTABLE | You can adjust the output size (width or height) to preserve the input aspect ratio.

SquarePixelOutputModeConstants:

typedef enum
{
SQUAREPIXELOUTPUT_SAMESIZE,
SQUAREPIXELOUTPUT_FITWIDTH,
SQUAREPIXELOUTPUT_FITHEIGHT,
SQUAREPIXELOUTPUT_INCREASESIZE,
SQUAREPIXELOUTPUT_DECREASESIZE,
} SquarePixelOutputModeConstants;

Constant | Description
SQUAREPIXELOUTPUT_SAMESIZE | Keep the output size unchanged. This might distort the output.
SQUAREPIXELOUTPUT_FITWIDTH | Keep the output width the same and modify the output height to preserve the visual output ratio.
SQUAREPIXELOUTPUT_FITHEIGHT | Keep the output height the same and modify the output width to preserve the visual output ratio.
SQUAREPIXELOUTPUT_INCREASESIZE | Increase the video size (width or height) so the requested output size fits inside the new output size. (This is the default resizing performed by the DirectShow video renderers).
SQUAREPIXELOUTPUT_DECREASESIZE | Decrease the video size (width or height) so the new output size fits inside the requested output size.

LMVResize_APILEVEL:

typedef enum
{
LMVResize_APILEVEL_1 = 0,
LMVResize_APILEVEL_2 = 1,
} LMVResize_APILEVEL;

Constant | Description
LMVResize_APILEVEL_1 | Use the defaults from the previous versions of the resize filter.
LMVResize_APILEVEL_2 | Use the defaults from the current version of the resize filter.

AutoResizeModeConstants (obsolete, you should use StretchModeConstants instead):

typedef enum
{
AUTORESIZEMODE_INCREASE  = 0x00,
AUTORESIZEMODE_FITWIDTH  =
 0x00,
AUTORESIZEMODE_DECREASE  = 0x01
AUTORESIZEMODE_FITHEIGHT = 0x01
} AutoResizeModeConstants;

Holds auto resizing mode constants

Constant | Description
AUTORESIZEMODE_INCREASE | Obsolete
AUTORESIZEMODE_DECREASE | Obsolete
AUTORESIZEMODE_FITWIDTH | The height will be changed according to the width.
AUTORESIZEMODE_FITHEIGHT | The width will be changed according to the height.

Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

VARIANT_TRUE to enable resizing.

VARIANT_BOOL

EnableQuickResize

VARIANT_TRUE to enable predefined ratios selection.

VARIANT_BOOL

AspectRatio

Obsolete property, use StretchMode instead.

VARIANT_TRUE to preserve the size aspect ratio, if the filter input is not connected, no aspect ratio is used.

VARIANT_BOOL

AutoStop

If VARIANT_TRUE, allows the graph to be stopped automatically. This is necessary when the dimensions change while the graph is running. The graph needs to be re-run after the change is applied.

long

Width

New width to use.

long

Height

New height to use.

QUICKRESIZE

QuickResize

If EnableQuickResize is VARIANT_TRUE, this property must be set to one of the QUICKRESIZE constants. When using the QUICKRESIZE constants the Width and Height properties are ignored.

SIZETYPES

Flags

One of the SIZETYPES constants, which specify the algorithm used for resizing.

VARIANT_BOOL

IsLEADInputPinConnected

Read only. Returns VARIANT_TRUE if the filters input pin is connected.

VARIANT_BOOL

IsLEADOutputPinConnected

Read only; returns VARIANT_TRUE if the filters output pin is connected.

long

InWidth

Read only; the input stream width.

long

InHeight

Read only; the input stream height.

long

OutWidth

Read only; the output stream width.

long

OutHeight

Read only; the output stream height.

long

InBits

Read only; the input stream bits per pixel.

long

OutBits

Read only; the output stream bits per pixel.

VARIANT_BOOL

AutoSize

Obsolete property, use WidthControlMode and HeightControlMode instead.

If selected, preserves the actual video size aspect ratio. If the width changes then the height will be changed as well.

long

FillColor

The color that will be used to fill the different size.

AutoResizeModeConstants

AutoResizeMode

Obsolete property, use StretchMode instead.

A value that represents the auto resize mode. It must be one of AutoResizeModeConstants values.

InputAspectRatioMode

InputAspectRatioModeConstants

Use this property to specify whether to use the video input aspect ratio or override it.

CustomInputAspectRatioWidth

long

Width component for custom aspect ratio. Used only if

InputAspectRatioMode is set to INPUTASPECTRATIO_CUSTOM.

CustomInputAspectRatioHeight

long

Height component for custom aspect ratio. Used only if

InputAspectRatioMode is set to

INPUTASPECTRATIO_CUSTOM.

OutputAspectRatioMode

OutputAspectRatioModeConstants

Use this property to specify the desired output aspect ratio.

CustomOutputAspectRatioWidth

long

Width component for custom aspect ratio. Used only if

OutputAspectRatioMode is set to OUTPUTASPECTRATIO_CUSTOM.

CustomOutputAspectRatioHeight

long

Height component for custom aspect ratio. Used only if

OutputAspectRatioMode is set to OUTPUTASPECTRATIO_CUSTOM.

StretchMode

StretchModeConstants

Allows you to specify whether the input should be stretched to the output or whether the aspect ratio should be preserved.

WidthControlMode

SizeControlModeConstants

Specifies whether the filter can modify the output width if necessary to preserve the input aspect ratio. This property is ignored if StretchMode is set to STRETCHMODE_STRETCH.

HeightControlMode

SizeControlModeConstants

Specifies whether the filter can modify the output height if necessary to preserve the input aspect ratio. This property is ignored if StretchMode is set to STRETCHMODE_STRETCH.

SquarePixelOutputMode

SquarePixelOutputModeConstants

Specifies what to do if the output does not have square pixels and the downstream filter does not preserve the aspect ratio. This setting allows you to specify how to modify the output width and height if the downstream filter insists on a square pixel output. This option overrides the WidthControlMode and HeightControlMode properties. (In other words, this indicates what should be down if the output media type is not VIDEOINFO2).

ForceSquarePixelOutput

VARIANT_BOOL

Force the output to be square pixels (VIDEOINFO). In this case, the output might be resized as specified by the SquarePixelOutputMode property.

Interface Methods

HRESULT StartChangingAttributes ()

Parameters

None.

Description

Call this method when you are about to change the resize attributes. The changes take effect when StopChangingAttributes is called with bCancelChanges set to VARIANT_FALSE.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT StopChangingAttributes (VARIANT_BOOL bCancelChanges)

Parameters

bCancelChanges

Description

Sets the resize attributes. Set to VARIANT_FALSE to set the resize attributes. Use VARIANT_TRUE to reset the resize attributes to the old one.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT ResetToDefaults ()

Parameters

None.

Description

This method is now obsolete. Call ResetToDefaultsEx(LMVResize_APILEVEL_1) instead.

Resets resizing to default values from the previous version of the filter.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT ResetToDefaultsEx (LMVResize_APILEVEL ApiLevel)

Parameters

LMVResize_APILEVEL ApiLevel.

Description

Resets resizing to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to LMVResize_APILEVEL_2 = 1.

The resize filter might change in the future and have different properties or default behaviour. Calling this method ensure the filter will have the same default values as they were at the time you developed your application.

It is recommended you call ResetToDefaultsEx(LMVResize_APILEVEL_2) before you start setting properties and start calling other methods for this interface.

Returns

S_OK if connected, S_FALSE otherwise.

For more information on how the filter's properties are used during the resizing process, please see the Notes and Comments section of the LEAD Video Resize Filter User Interface (2.0) topic.


LEAD Video RGB Converter

LEAD Video RGB Converter

This is an RGB color space converter that supports conversion between different RGB formats. The filter supports the following formats: RGB8 (gray and palettized), RGB565, RGB555, RGB24, and RGB32. The input or output format can be set to AUTO, to enable free negotiation with the up or down stream filter. The filter’s functionality is exposed through both user and programming interfaces.

For information on LEADTOOLS' 12 and 16-bit Grayscale Format, refer to 12 and 16-bit Grayscale Format used by LEADTOOLS, in LEADTOOLS documentation.

Filter Interface | ILMMCommon
Interface ID | IID_ILMVConvRGB, IID_ILMVConvRGBDisp
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVConvRGB
Property Page CLSID | CLSID_LMVConvRGBPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVRGBxf.dll
Header | ILMVRGB.h

Platforms

Win32, x64

LEAD Video RGB Converter Filter User Interface


LEAD Video RGB Converter User Interface

The RGB Converter automatically ensures hardware compatibility. This is an RGB color space converter that supports conversion between different RGB formats. The converter supports the following formats: RGB8 (gray and palettized), RGB565, RGB555, RGB24, and RGB32. The input or output format can be set to AUTO, to enable free negotiation with the up or down stream filter. The property page is shown in the following figure:

The RGB converter page provides a user interface for changing the converter settings. Input and output types can be set by selecting from the input and output drop-down list boxes. The check box toggles between the RGB and BGR modes. The following table shows the controls and their descriptions:

Control | Description
Input Type drop-down list box and the Video Info 2 check box. | Use this to select the input media type that will be accepted at the filter’s input pin (only the selected type will be accepted). If the input pin is connected, the drop-down list box and check boxes will be disabled. If the “Video Info 2” is selected, media types of format VIDEOINFO2 are only accepted.
Output Type drop-down list box, and the“Video Info 2 check box. | Use this to select the output media type that will be offered at the filter’s output pin (only the selected type will be offered). If the output pin is connected, the combo and check boxes will be dimmed. If the “Video Info 2” is checked, media types of format VIDEOINFO2 are only accepted.
Switch to RGB order check box | If selected, the filter will use RGB order. The filter, by default, uses the BGR order when processing RGB data.
Automatically stop check box | If selected, allows stopping the graph automatically. This is needed when the media type is changed.
LGRY Conversion group |
Use full range radio button | Use the full range of bits.
Use lower bits radio button | Use only the lower bits.
Use upper bits radio button | Use only the upper bits.
Leave unchanged radio button | Do not change the data.


ILMVConvRGB Interface

ILMVConvRGB Interface

Data types:

typedef enum
{
USEUPPERBITS = 1,
USELOWERBITS,
USEFULLRANGE,
NOCHANGE,
}USEDBITS

LM_MEDIATYPES:

typedef enum
{
LM_MEDIATYPE_AUTO = 0x0000, /* Any */
LM_MEDIATYPE_RGB1 = 0x0001,
LM_MEDIATYPE_RGB4 = 0x0004,
LM_MEDIATYPE_RGB8 = 0x0008,
LM_MEDIATYPE_RGB555 = 0x000f,
LM_MEDIATYPE_RGB565 = 0x0010,
LM_MEDIATYPE_RGB24 = 0x0018,
LM_MEDIATYPE_RGB32 = 0x0020,
LM_MEDIATYPE_ARGB32 = 0x0021,
LM_MEDIATYPE_LGRY12 = 0x000c,
LM_MEDIATYPE_LGRY16 = 0x0011,
LM_MEDIATYPE_YUY2 = 0x0033
} LM_MEDIATYPES;

Describes the RGB supported formats.

Interface methods:

HRESULT SetInputType(int nType, BOOL bPalette)

Parameters

nType | One of the LM_MEDIATYPES values.
bPalette | Determines wither the input is palletized or not, this is valid only if nType is LM_MEDIATYPE_RGB8.

Description

Sets the current media input type.

Returns

S_OK if successful, S_FALSE other wise.

HRESULT GetInputType(int *pnType, BOOL *pbPalette)

Parameters

pnType | A valid pointer to an integer variable that will receive the input type ( one of the LM_MEDIATYPES constants).
pbPalette | A valid pointer to a Boolean variable that will receive the input palette status. This is valid only if the input type is LM_MEDIATYPE_RGB8, otherwise, pbPalette will be always set to FALSE.

Description

Retrieves the current media input type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetOutputType(int nType, BOOL bPalette)

Parameters

nType | One of the LM_MEDIATYPES values.
bPalette | Determines wither the output is palletized or not, this is valid only if nType is LM_MEDIATYPE_RGB8.

Description

Sets the current media output type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetOutputType(int *pnType, BOOL *pbPalette)

Parameters

pnType | A valid pointer to an integer variable that will receive the output type ( one of the LM_MEDIATYPES constants).
pbPalette | A valid pointer to a Boolean variable that will receive the output palette status. This is valid only if the output type is LM_MEDIATYPE_RGB8, otherwise, pbPalette will be always set to FALSE.

Description

Retrieves the current media output type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetRGBOrder(BOOL bRGBOrder)

Parameters

bRGBOrder

TRUE to switch to RGB mode, FALSE to switch to BGR mode.

Description

Sets the RGB channels order, either RGB (TRUE) or BGR (FALSE).

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetRGBOrder(BOOL *pbRGBOrder)

Parameters

*pbRGBOrder

A valid pointer to a Boolean variable that will receive the current RGB order, it will be set to TRUE if the order is RGB or FALSE if the order is BGR.

Description

Gets the RGB channel order, either RGB (TRUE) or BGR (FALSE)..

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetUsedBits(int UsedBit)

Parameters

UsedBit

an integer variable that contains the bit usage option. Possible values are:

USEUPPERBITS,

USELOWERBITS,

USEFULLRANGE,

Or NOCHANGE.

5Description

Used with LGRY media type only, either 16, or 12 bits. This property determines the range of bits to be used, or which bits will hold the useful data.

Example: if the input is LGRY 16 with low bit = 3, and high bit = 10, and the output is 12 bit LGRY, then the filter can give the following options:

1. | Use Lower bits, the output useful range will be: 0 to 7.
2. | Use upper bits, the output useful range will be: 4 to 11.
3. | Use full range, the output useful range will be: 0 to 11.
4. | No change, leave output same as input if possible, in this case 3 to 10.

If none of the above options is applicable, the full range will be used.

For information on LEADTOOLS' 12 and 16-bit Grayscale Format, refer to 12 and 16-bit Grayscale Format used by LEADTOOLS .

Returns

S_OK.

HRESULT GetUsedBits(int * pUsedBit)

Parameters

pUsedBit

A valid pointer to an integer variable to be updated with the currently used bits. Upon a successful return, itll contain one of the following:

USEUPPERBITS,

USELOWERBITS,

USEFULLRANGE,

Or NOCHANGE.

Description

Retrieves the currently used bits.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetAutoStop(BOOL bAutoStop)

Parameters

bAutoStop

A Boolean value that indicates the state of graph auto stopping. TRUE to automatically stop the graph when needed. Stopping the graph is needed when the filter reconnects one of its pins; this operation is needed when the user changes the pins media type. If set to FALSE, the filter will refuse the change.

Description

Sets the graph auto stopping state.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetAutoStop(BOOL *pbAutoStop)

Parameters

*pbAutoStop

A valid pointer to a Boolean variable that will receive the current graph auto stopping state. TRUE indicates the graph will be stopped automatically if needed.

Description

Gets the graph auto stopping state.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetInputVideoType(LM_FORMATTYPE *pVal)

Parameters

*pVal

A valid pointer to a variable that will receive the current input video format. Possible values are:

LM_FORMATTYPE_VIDEOINFO: The current format is VIDEOINFO. The filter will accept media types of this format only.

LM_FORMATTYPE_VIDEOINFO2: The current format is VIDEOINFO2. The filter will accept media types of this format only.

Description

Gets the current input video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetInputVideoType(LM_FORMATTYPE newVal)

Parameters

newVal

The new input video format to accept. Possible values are:

LM_FORMATTYPE_VIDEOINFO: The filter will accept media types of VIDEOINFO format only.

LM_FORMATTYPE_VIDEOINFO2: The filter will accept media types of VIDEOINFO2 format only.

Description

Sets the input video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetOutputVideoType(LM_FORMATTYPE *pVal)

Parameters

*pVal

A valid pointer to a variable that will receive the current output video format. Possible values are:

LM_FORMATTYPE_VIDEOINFO: The current format is VIDEOINFO. The filter will offer media types of this format only.

LM_FORMATTYPE_VIDEOINFO2: The current format is VIDEOINFO2. The filter will offer media types of this format only.

Description

Gets the current output video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetOutputVideoType(LM_FORMATTYPE newVal)

Parameters

newVal

The new output video format to offer. Possible values are:

LM_FORMATTYPE_VIDEOINFO: The filter will offer media types of VIDEOINFO format only.

LM_FORMATTYPE_VIDEOINFO2: The filter will offer media types of VIDEOINFO2 format only.

Description

Sets the output video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth | A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.
plInHeight | A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.
plOutWidth | A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.
plOutHeight | A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetInputOutputMediaType(GUID *Input, GUID *Output);

Parameters

Input | A valid pointer to a GUID structure to be updated with the input media type GUID. NULL can be passed if this value is not needed.
Output | A valid pointer to a GUID structure to be updated with the output media type GUID. NULL can be passed if this value is not needed.

Description

Gets the current media types of the filters input and output pins.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIOBitCount(int *pInBitCount, int *pOutBitCount)

Parameters

pInBitCount | A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.
pPBitCount | A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.


ILMVConvRGBDisp Interface

ILMVConvRGBDisp Interface

Interface Properties:

Type | Name | Description
BOOL | RGBOrder | TRUE to use RGB mode, FALSE to use BGR mode.
long | UsedBits | Sets or gets the currently used bits. Possible values are: USEUPPERBITS, USELOWERBITS, USEFULLRANGE, Or NOCHANGE.
BOOL | AutoStop | If TRUE, allows stopping the graph automatically, this is needed when the dimensions change while the graph is running. You need to re-run the graph after the change is applied.
LM_FORMATTYPE | InputVideoType | Sets or gets the input video format type. Possible values are: LM_FORMATTYPE_VIDEOINFO: The filter will accept media types with VIDEOINFO format only. LM_FORMATTYPE_VIDEOINFO2: The filter will accept media types with VIDEOINFO2 format only.
LM_FORMATTYPE | OutputVideoType | Sets or gets the output video format type. Possible values are: LM_FORMATTYPE_VIDEOINFO: The filter will offer media types with VIDEOINFO format only. LM_FORMATTYPE_VIDEOINFO2: The filter will offer media types with VIDEOINFO2 format only.
BOOL | IsLEADInputPinConnected | Read only; returns TRUE if the filter’s input pin is connected.
BOOL | IsLEADOutputPinConnected | Read only; returns TRUE if the filter’s output pin is connected.
long | InWidth | Read only; the input stream width.
long | InHeight | Read only; the input stream height.
long | OutWidth | Read only; the output stream width.
long | OutHeight | Read only; the output stream height.
long | InBits | Read only; the input stream bits per pixel.
long | OutBits | Read only; the output stream bits per pixel.

Methods:

HRESULT SetInputType(long nType, VARIANT_BOOL bPalette)

Parameters

nType | One of the LM_MEDIATYPES values.
bPalette | Determines wither the input is palletized (VARIANT_TRUE) or not (VARIANT_FALSE), this is valid only if nType is LM_MEDIATYPE_RGB8.

Description

Sets the current media input type.

Returns

S_OK if successful, S_FALSE other wise.

HRESULT GetInputType(long *pnType, VARIANT_BOOL *pbPalette)

Parameters

pnType | A valid pointer to an integer variable that will receive the input type ( one of the LM_MEDIATYPES constants).
pbPalette | A valid pointer to a Boolean variable that will receive the input palette status; VARIANT_TRUE if the input is palletized, VARIANT_FALSE otherwise. This is valid only if the input type is LM_MEDIATYPE_RGB8, otherwise, pbPalette will be always set to VARIANT_FALSE.

Description

Retrieves the current media input type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetOutputType(long nType, VARIANT_BOOL bPalette)

Parameters

nType | One of the LM_MEDIATYPES values.
bPalette | Determines wither the output is palletized (VARIANT_TRUE) or not (VARIANT_FALSE), this is valid only if nType is LM_MEDIATYPE_RGB8.

Description

Sets the current media output type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetOutputType(long *pnType, VARIANT_BOOL *pbPalette)

Parameters

pnType | A valid pointer to an integer variable that will receive the output type ( one of the LM_MEDIATYPES constants).
pbPalette | A valid pointer to a Boolean variable that will receive the output palette status, VARIANT_TRUE if the output is palletized, VARIANT_FALSE otherwise. This is valid only if the output type is LM_MEDIATYPE_RGB8, otherwise, pbPalette will be always set to FALSE.

Description

Retrieves the current media output type.

Returns

S_OK if successful, S_FALSE otherwise.


LEAD Video Rotation Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Rotation Filter (2.0)

The LEAD Video Rotation filter enables rotating a video stream by the standard angles: 0, 90, 180, and 270 (in addition to flip and reverse options). The filter’s functionality is exposed through both user and programming interfaces.

Filter Interface | ILMVRotation , ILMMCommon
Interface ID | IID_ILMVRotation
Input/Output Media Types | MEDIATYPE_Video
Filter CLSID | CLSID_LMVRotation
Property Page CLSID | CLSID_LMVRotatePropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVRot2.dll, DSKernel2.dll
Header | ILMVRot2.h

Platforms

Win32, x64

You need to unlock the LEAD Video Rotation Filter to use it in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Video Rotation Filter User Interface

LEAD Video Rotation Filter User Interface (2.0)

Use the Rotation Video filterto flip, reverse, or rotate a video by 90, 180, or 270 degrees. The property page is shown in the figure below:

The Rotation property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

First Action group

Flip check box

If selected, flip the frame.

Reverse check box

If selected, reverse the frame.

Second Action group

No Rotation radio button

Do not rotate.

90 Degrees radio button

Rotate 90 degrees.

180 Degrees radio button

Rotate 180 degrees.

270 Degrees radio button

Rotate 270 degrees.

Automatically stop check box

If selected, allows stopping the graph automatically. This is needed when the dimensions change while the graph is running. You must re-run the graph after the change is applied.


ILMVRotation Interface

ILMVRotation Interface

This is the interface for the LEAD Video Rotation Filter.

Interface Properties:

Type

Name

Description

BOOL

Reverse

Sets or gets reverse option, set to TRUE to enable the reverse option.

BOOL

Flip

Sets or gets Flip option, set to TRUE to enable the flip option.

BOOL

AutoStop

Sets or gets AutoStop option. If TRUE, allows stopping the graph automatically, this is needed when the dimensions change while the graph is running. You need to re-run the graph after the change is applied.

long

RotationAngle

Sets or gets the rotation angle, it should be a multiple of right angle (90). Unit of angle is degree.

BOOL

DefaultReverse

Default Reverse status.

Original value is FALSE.

BOOL

DefaultFlip

Default Flip status.

Original value is FALSE.

long

DefaultRotationAngle

Default Rotation Angle.

Original value is zero.

BOOL

IsLEADInputPinConnected

Read only; returns TRUE if the filter’s input pin is connected.

BOOL

IsLEADOutputPinConnected

Read only; returns TRUE if the filter’s output pin is connected.

long

InWidth

Read only; the input stream width.

long

InHeight

Read only; the input stream height.

long

OutWidth

Read only; the output stream width.

long

OutHeight

Read only; the output stream height.

long

InBits

Read only; the input stream bits per pixel.

long

OutBits

Read only; the output stream bits per pixel.

Methods:

HRESULT ResetToDefaults()

Reset the rotation option values to the default values.


LEAD Screen Capture Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Screen Capture Filter (2.0)

The Screen Capture Filter is a DirectShow source filter that delivers a video stream captured from the screen. This filter can capture from the full screen, a window, or a region. Many options are provided for flexibility and convenience. These are summarized as follows:

Capturing source:

The following options are available for the capturing source:

Option | Description
CAPTURE_FULLSCREEN | The capturing source is the full screen. This can be the whole screen or just some region defined by screen coordinates.
CAPTURE_ACTIVEWINDOW | The capturing source is the active window. This can be the whole active window or just some region defined by window coordinates.
CAPTURE_ACTIVECLIENT | The capturing source is the client area of the active window. This can be the whole client window or just some region defined by window coordinates.
CAPTURE_SELECTEDWINDOW | The capturing source is some chosen window, not necessarily the active window. This can be the whole window area, client and non-client or just some region defined by window coordinates.

In case the capturing source is not CAPTURE_FULLSCREEN (neither the whole screen nor a region), the filter provides an option to track the capturing source so that no matter where the source is moved, the captured contents are the same. For more information, refer to the TrackWindow property of the ILMScrCap Interface. When the capture source goes off screen or gets covered partially by another window, the filter can fill the hidden area with some color or just capture whatever contents are in the capture area.

Notification:

The filter provides notification of many events to enable the user to have control over the capturing process and make the right decision. In addition, the filter provides informational notifications. The notification is provided through a callback mechanism where the user should have an object that implements the ILMScrCapUserCallback and ILMScrCapUserEventsCallback Interfaces. For more information, refer to ILMScrCapUserCallback Interface, ILMScrCapUserEventsCallback.

On event action:

The filter can be configured to take specific actions on specific events. For more information, refer to the OnSourceMinimize, OnSourceClose, and OnSourceAreaChange properties of the ILMScrCap Interface.

Tools:

The filter provides tools for region selection and window selection. The user can use these tools programmatically, integrating them with a custom user interface. Many options are provided with these tools for convenience. For more information, refer to SelectRegionTool and SelectWindowTool methods, and the ShowXXXX properties of the ILMScrCap Interface.

Other:

Other options and helper properties are provided for flexibility and convenience. For more information, refer to the properties and methods of the ILMScrCap Interface, the ILMScrCapUserCallback Interface, and the ILMMCommon Interface. All the mentioned functionalities are exposed through both user and programming interfaces.

Filter Interface(s) | ILMScrCap , ILMScrCapUserCallback , ILMScrCapUserEventsCallback, ILMMCommon
Interface ID | IID_ILMScrCap, IID_ILMScrCapUserCallback, IID_ILMMCommon
Output Media Types | MEDIATYPE_Video The offered subtype depends on the current screen settings. It should be one of the following: MEDIASUBTYPE_RGB32, MEDIASUBTYPE_RGB24, MEDIASUBTYPE_RGB555, MEDIASUBTYPE_RGB8, MEDIASUBTYPE_RGB4, and MEDIASUBTYPE_RGB1.
Filter CLSID | CLSID_LMScrCap
Property Page(s) CLSID | CLSID_LMScrCapPropertyPage
Filter category | CLSID_VideoInputDeviceCategory
Executable | LMScrCap2.dll, DSKernel2.dll
Header | ILMScrCap2.h

Platforms

Win32, x64

LEAD Screen Capture Filter User Interface

You need to unlock the LEAD Screen Capture Filter (2.0) to use the filter in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Screen Capture Filter User Interface (2.0)

LEAD Screen Capture Filter User Interface (2.0)

The Screen capture property pages provide a user interface for changing the filter's attributes. Changes will be applied when Apply or OK is clicked. Positioning the mouse pointer over a control displays general information for that control. The Capture source settings tab is shown in the following figure:

The following table shows the controls and their descriptions:

Control | Description
Capture source drop-down list box | Select the capture source type
Frame rate edit box | Set the capture frame rate in frames per second. Values range from 0.1 to 30.0 frames per second.
Track window check box | Check this to track the window and capture the contents of the window at its original position, even if the window is moved.
Fill color button | Select the fill color that used to fill areas of the video under certain conditions.
Finder tool control | Drag the finder control to select a window as the capture source.
Manual mode check box | Check this to Enable the manual-capturing mode.
Capture frames button | Start the manual mode capturing process.
Frames number edit box | Number of frames that needs to be captured in manual mode.
Outline source check box | Check this to enable the outline shape option.
Outline shape combo box | Select the outline shape region type.
Color button | Select the outline shape region color.
On source close combo box | Select the action if the capture source is closed.
On source minimize combo box | Select the action if the capture source is minimized.
On source area change combo box | Select the action if the capture source area is changed.
Capture option combo box | Select the option that determines what to capture from the window.

The Cursor settings tab is shown in the following figure:

The following table shows the controls and their descriptions:

Control | Description
Show cursor check box | Check this to display the cursor in the capture stream.
Use actual cursor check box | Check this to display the actual cursor icon in the capture stream. Or uncheck it to display the selected cursor from the combo box.
Cursors combo box | Select a cursor icon to be displayed in the capture stream.
Shape effect combo box | Select the highlight mouse shape effect.
Size slider bar | Specify the highlight mouse shape size.
Color button | Specify the highlight mouse shape color.
Translucent radio button | Make the mouse highlight is translucent.
Opaque radio button | Make the mouse highlight is opaque.
On left click shape effect combo box | Select the effect shape when the left button click.
On left click size slider bar | Set the effect shape size when the left button click.
On left click color button | Select the effect shape color when the left button click.
On right click shape effect combo box | Select the effect shape when the right button click.
On right click size slider bar | Set the effect shape size when the right button click.
On right click color button | Select the effect shape color when the right button click.

The Region settings tab is shown in the following figure:

The following table shows the controls and their descriptions:

Control | Description
Enable region check box | Check this to enable the region options.
Region tool button | To display the region selection tool to specify the capture region.
Show pan window check box | Check this to display the pan window when the selection process begins.
Show cross-line check box | Check this to display the cross-line when the selection process begins.
Show XY pos info check box | Check this to display the XY position window when the selection process begins.
Show WH pos info check box | Check this to display the width/height window when the selection process begins.
Left edit box | Specify the left boundary of the region.
Top edit box | Specify the top boundary of the region.
Right edit box | Specify the right boundary of the region.
Bottom edit box | Specify the bottom boundary of the region.
Zoom level edit box | Specify the zoom level factor.
Zoom steps edit box | Specify the zoom steps.
Min. zoom step size | Specify the minimum zoom steps.
Enable panning check box | Check this to enable the panning options.
Start process hot key edit box | Specify a hot key to start the panning process.
X Y positions radio button | Select this to pan the region to the specified X Y positions.
X edit box | Specify the X position.
Y edit box | Specify the Y position.
Cursor position radio button | Select this to pan the region to the cursor position.
Cursor position Follow check box | Check this to track the cursor when it is move.
Window under cursor check box | Select this to pan the region to the window that is under the cursor.
Window under cursor Follow check box | Check this to track the captured window when it is move.
Fit check box | Check this to fit the region to the captured window. This will change the zoom level.
Panning steps edit box | Specify the panning steps.
Min. pan step size edit box | Specify the minimum panning steps.
Horizontal alignment combo box | Select the horizontal alignment option for the region.
Vertical alignment combo box | Select the vertical alignment option for the region.
H. Center check box | Check this to make a horizontal-center alignment for the region.
V. Center check box | Check this to make a vertical-center alignment for the region.

LEAD Screen Capture Filter

ILMScrCap Interface

ILMScrCapUserCallback Interface

ILMScrCapUserEventsCallback Interface


ILMScrCap Interface

ILMScrCap Interface

This is the interface for the LEAD Screen Capture Filter.

Data types:

typedef [v1_enum] enum PanToWindowConstants
{
PANTO_WINDOWUNDERCURSOR = -1,
PANTO_ACTIVEWINDOW = -2
} PanToWindowConstants;

typedef [v1_enum] enum WindowSelectStatusConstants
{
WINDOW_SELECT_STATUS_UPDATE = 0,
WINDOW_SELECT_STATUS_SELECTED = 1,
WINDOW_SELECT_STATUS_CANCELED = 2,
} WindowSelectStatusConstants;

typedef [v1_enum] enum CaptureSourceConstants
{
CAPTURE_FULLSCREEN = 0,
CAPTURE_ACTIVEWINDOW = 1,
CAPTURE_ACTIVECLIENT = 2,
CAPTURE_SELECTEDWINDOW = 3
} CaptureSourceConstants;

typedef [v1_enum] enum CursorIconConstants
{
CURSOR_ARROW = 0,
CURSOR_IBEAM = 1,
CURSOR_WAIT = 2,
CURSOR_CROSS = 3,
CURSOR_UPARROW = 4,
CURSOR_SIZENWSE = 5,
CURSOR_SIZENESW = 6,
CURSOR_SIZEWE = 7,
CURSOR_SIZENS = 8,
CURSOR_SIZEALL = 9,
CURSOR_NO = 10,
CURSOR_APPSTARTING = 11,
CURSOR_HELP = 12,
CURSOR_ACTUAL = 13,
CURSOR_CUSTOM = 14
} CursorIconConstants;

typedef [v1_enum] enum WindowCaptureOptionConstants
{
CAPTUREOPTION_VISIBLE_WINDOW = 0,
CAPTUREOPTION_ALL_WINDOW = 1,
} WindowCaptureOptionConstants;

typedef [v1_enum] enum NotifyCallbackConstants
{
NOTIFY_PRERUN_AREACHANGE = 0x0000,
NOTIFY_CLOSE = 0x0001,
NOTIFY_MINIMIZE = 0x0002,
NOTIFY_AREACHANGE = 0x0004,
NOTIFY_CAPWIDTH_EXCEEDED_LIMIT = 0x0008,
NOTIFY_CAPHEIGHT_EXCEEDED_LIMIT = 0x010,
} NotifyCallbackConstants;

typedef [v1_enum] enum SourceCloseConstants
{
CLOSE_STOP_CAPTURING = 0,
CLOSE_CONTNUE_FROM_LAST_POS = 1,
CLOSE_FILL_COLOR = 2
} SourceCloseConstants;

typedef [v1_enum] enum SourceMinimizeConstants
{
MINIMIZE_PAUSE_CAPTURING = 0,
MINIMIZE_STOP_CAPTURING = 1,
MINIMIZE_CONTINUE_FROM_LAST_POS = 2,
MINIMIZE_FILL_COLOR = 3
} SourceMinimizeConstants;

typedef [v1_enum] enum SourceAreaChangeConstants
{
AREACHANGE_CAPTURE_OTHER_WINDOWS = 0,
AREACHANGE_FILL_UNCOVERED_AREA = 1,
} SourceAreaChangeConstants;

typedef [v1_enum] enum EffectShapeConstants
{
EFFECTSHAPE_NON = 0,
EFFECTSHAPE_RINGS = 1,
EFFECTSHAPE_CIRCLE = 2,
EFFECTSHAPE_SUN = 3,
} EffectShapeConstants;

typedef [v1_enum] enum MouseHighlightConstants
{
MOUSEHIGHLIGHT_NON = 0,
MOUSEHIGHLIGHT_SQUARE = 1,
MOUSEHIGHLIGHT_RECTANGLE = 2,
MOUSEHIGHLIGHT_ROUNDEDRECTANGLE = 3,
MOUSEHIGHLIGHT_CIRCLE = 4,
MOUSEHIGHLIGHT_ELLIPSE = 5,
} MouseHighlightConstants;

typedef [v1_enum] enum MouseHighlightModeConstants
{
HIGHLIGHTMODE_TRANSLUCENT = 0,
HIGHLIGHTMODE_OPAQUE = 1,
} MouseHighlightModeConstants;

typedef [v1_enum] enum UserEventsNotifyConstants
{
USEREVENT_LBUTTONDOWN   = 0x001,
USEREVENT_LBUTTONUP     = 0x002,
USEREVENT_RBUTTONDOWN   = 0x004,
USEREVENT_RBUTTONUP     = 0x008,
USEREVENT_MOUSEMOVE     = 0x010,
USEREVENT_MOUSEWHEEL    = 0x020,
USEREVENT_KEYDOWN
 = 0x040,
USEREVENT_KEYUP
 = 0x080,
USEREVENT_SYSKEYDOWN    = 0x100,
USEREVENT_SYSKEYUP      = 0x200
} UserEventsNotifyConstants;

typedef [v1_enum] enum OutlineShapeConstants
{
OUTLINESHAPE_RECTANGLE  = 0x00,
OUTLINESHAPE_CORNER     = 0x01,
} OutlineShapeConstants;

typedef [v1_enum] enum CaptureAlignmentConstants
{
CAPALIGNMENT_LEFT     = 0x001,
CAPALIGNMENT_TOP      = 0x002,
CAPALIGNMENT_RIGHT    = 0x004,
CAPALIGNMENT_BOTTOM   = 0x008,
CAPALIGNMENT_HCENTER  = 0x010,
CAPALIGNMENT_VCENTER  = 0x020,
} CaptureAlignmentConstants;

Interface Properties:

Type

Name

Description

CaptureSourceConstants

CaptureSource

Sets or gets the capture source type. Possible values are:
CAPTURE_FULLSCREEN: The filter will capture from the full screen (desktop).
CAPTURE_ACTIVEWINDOW: The filter will capture from the active window.
CAPTURE_ACTIVECLIENT: The filter will capture from the client area of the active window.
CAPTURE_WINDOW: The filter will capture from a specific window.

long

SourceWindowHandle

Sets or gets the window handle of the capture source. Changing this property will automatically set the CaptureSource property of this interface to CAPTURE_WINDOW.

float

CaptureFrameRate

Sets or gets the capture frame rate in frames per second. The filter will attempt to capture at this rate if possible. Possible values range from 0.1 to 30.0 frames per second.

VARIANT_BOOL

ConnectionStatus

Gest the connection status of the filter output. Possible values are:
VARIANT_TRUE: The filter output pin is connected.
VARIANT_FALSE: The filter output pin is not connected.

CursorIconConstants

CursorIcon

Sets or gets cursor icon. Possible values are:

CURSOR_ARROW,
CURSOR_IBEAM,
CURSOR_WAIT,
CURSOR_CROSS,
CURSOR_UPARROW,
CURSOR_SIZENWSE,
CURSOR_SIZENESW,
CURSOR_SIZEWE,
CURSOR_SIZENS,
CURSOR_SIZEALL,
CURSOR_NO,
CURSOR_APPSTARTING,
CURSOR_HELP,
CURSOR_ACTUAL,
CURSOR_CUSTOM.

If the value is CURSOR_ACTUAL, then the actual cursor icon on the screen will be captured.

If the value is CURSOR_CUSTOM, then the custom cursor icon that is set using the CustomCursor property of this interface will be captured.

long

CustomCursor

Sets or gets the custom cursor handle. The custom cursor will be used only if the CursorIcon property of this interface is set to CURSOR_CUSTOM.

VARIANT_BOOL

EnableRegion

Enables or disables using the region coordinates. The region will be limited to the dimensions of the current capture source.

long

FillColor

Sets or gets the fill color used to fill areas of the video under certain conditions. This property accepts/retrieves a COLORREF value. For more information, refer to the OnSourceClose property, OnSourceMinimize property and OnSourceAreaChange property of this interface.

long

NotifyCallback

Determines what events will call the NotifyCallbackProc of the ILMScrCapUserCallback interface. Possible values are:

NOTIFY_PRERUN_AREACHANGE: Call NotifyCallbackProc of the ILMScrCapUserCallback interface if the capture source area has changed while the filter is not in the running state. The notification is sent once the filter is run.

NOTIFY_CLOSE: Call NotifyCallbackProc of the ILMScrCapUserCallback interface when the capture source is closed.

NOTIFY_MINIMIZE: Call NotifyCallbackProc of the ILMScrCapUserCallback interface when the capture source is minimized.

NOTIFY_AREACHANGE: Call NotifyCallbackProc of the ILMScrCapUserCallback interface when the capture area is changed.

NOTIFY_CAPWIDTH_EXCEEDED_LIMIT: Call NotifyCallbackProc of the ILMScrCapUserCallback interface when using the selection tool and the selected area width exceeded the LowerWidthLimit or UpperWidthLimit values.

NOTIFY_CAPHEIGHT_EXCEEDED_LIMIT: Call NotifyCallbackProc of the ILMScrCapUserCallback interface when using the selection tool and the selected area height exceeded the LowerHeightLimit or UpperHeightLimit values.

These values may also be combined using logical OR.

SourceAreaChangeConstants

OnSourceAreaChange

Determines what action to take if the capture source area is resized or the visible area of the capture source is covered by other windows. This property has no effect if the capture source is set to full screen. Possible values are:

AREACHANGE_CAPTURE_OTHER_WINDOWS: Capture the contents under the resized or/and convered area.

AREACHANGE_FILL_UNCOVERED_AREA: Fill the resized or/and covered area with the color specified in the FillColor property of this interface.

SourceCloseConstants

OnSourceClose

Determines what action to take if the capture source is closed. This property has no effect if the capture source is set to full screen. Possible values are:
CLOSE_STOP_CAPTURING: Stop capturing; stop the graph.
CLOSE_CONTINUE_FROM_LAST_POS: Continue capturing the contents of the last position the capture source was occupying.
CLOSE_FILL_COLOR: Fill the capture buffer with the color specified in the FillColor property of this interface.

SourceMinimizeConstants

OnSourceMinimize

Determines what action to take if the capture source is minimized. This property has no effect if the capture source is set to full screen. Possible values are:
MINIMIZE_PAUSE_CAPTURING: Pause capturing until the capture source is restored.
MINIMIZE_STOP_CAPTURING: Stop capturing; stop the graph.
MINIMIZE_CONTINUE_FROM_LAST_POS: Continue capturing the contents of the last position the capture source was occupying.
MINIMIZE_FILL_COLOR: Fill the capture buffer with the color specified in the FillColor property of this interface.

long

RegionBottom

Sets or gets the bottom boundary of the region. The value range is from RegionTop property + 1 to SourceHeight property.

long

RegionLeft

Sets or gets the left boundary of the region. The value range is from 0 to RegionRight property.

long

RegionRight

Sets or gets the right boundary of the region. The value range is from RegionLeft property + 1 to SourceWidth property.

long

RegionTop

Sets or gets the top boundary of the region. The value range is from 0 to RegionBottom property.

VARIANT_BOOL

ShowCrossLines

Shows or hides the cross lines cursor when the SelectRegionTool method is being used. Possible values are:
VARIANT_TRUE: Use the cross lines cursor.
VARIANT_FALSE: Use the normal arrow cursor.

VARIANT_BOOL

ShowCursor

Shows or hides the cursor in the capture stream. Possible values are:
VARIANT_TRUE: The mouse cursor will be captured with the other contents.
VARIANT_FALSE: The mouse cursor will not be captured.

VARIANT_BOOL

ShowPanWindow

Shows or hides the pan window when the SelectRegionTool method is being used. The pan window provides up to 10X zooming. Use the + and keys for zooming in and out. The panned area is the area under the mouse cursor.

VARIANT_BOOL

ShowWHInfo

Shows or hides the region width and height information while dragging the mouse to select the region, when the SelectRegionTool method is being used. The width and height information is displayed near the cursor.

VARIANT_BOOL

ShowXYPosInfo

Shows or hides the X and Y coordinates while dragging the mouse to select a region when the SelectRegionTool mehtod is being used. The X and Y coordinate information is displayed near the cursor.

long

SourceHeight

(Read only) Retrieves the actual height in pixels of the capture area.

long

SourceWidth

(Read only) Retrieves the actual width in pixels of the capture area.

VARIANT_BOOL

TrackWindow

Enables or disables the track window option. Possible values are:
VARIANT_TRUE: Capture the contents of the window area's current location, even if the window is moved.
VARIANT_FALSE: Capture the contents of the window at its original position, even if the window is moved.

This property has no effect if the capture source is set to full screen.

WindowCaptureOptionConstants

WindowCaptureOption

Sets or gets a value that indicates what to capture from the window. Possible values are:
CAPTUREOPTION_VISIBLE_WINDOW: Capture the visible area only.
CAPTUREOPTION_ALL_WINDOW: Capture the entire window area.

This property has no effect if the capture source is set to full screen.

VARIANT_BOOL

ManualMode

Enables or disables the manual capturing mode. In manual capturing mode, frames are pushed downstream on user request (no frames will be captured if CaptureFrames method not called).

EffectShapeConstants

OnRightBtnClkEffectShape

Sets or gets a value that indicates the effect shape when the right button click. Possible values are:

EFFECTSHAPE_NON: dont do any effect.

EFFECTSHAPE_RINGS: display the rings effect when the mouse clicks.

EFFECTSHAPE_CIRCLE: display the circle effect when the mouse clicks.

EFFECTSHAPE_SUN: display the sun effect when the mouse clicks.

Long

OnLeftBtnClkEffectColor

Sets or gets the color effect shape for the left mouse button clicks. This property accepts/retrieves a COLORREF value.

Long

OnRightBtnClkEffectColor

Sets or gets the color effect shape for the right mouse button clicks. This property accepts/retrieves a COLORREF value.

Long

OnLeftBtnClkEffectSize

Sets or gets the shape effect size when the left mouse button clicks.

Long

OnRightBtnClkEffectSize

Sets or gets the shape effect size when the right mouse button clicks.

VARIANT_BOOL

EnableOutline

Display a frame (outline) around the captured source.

OutlineShapeConstants

OutlineShape

Sets or gets a value that indicates the outline shape. Possible values are:

OUTLINESHAPE_RECTANGLE: The outline shape is a rectangular shape.

OUTLINESHAPE_CORNER: the outline shape is a corner shape.

MouseHighlightConstants

MouseHighlight

Sets or gets a value that indicates the mouse highlight. Possible values are:

MOUSEHIGHLIGHT_NON: dont do any mouse shape highlight.

MOUSEHIGHLIGHT_SQUARE: display a square shape highlight over the mouse.

MOUSEHIGHLIGHT_RECTANGLE: display a rectangular shape highlight over the mouse.

MOUSEHIGHLIGHT_ROUNDEDRECTANGLE: display a rounded rectangle shape highlight over the mouse.

MOUSEHIGHLIGHT_CIRCLE: display a circle shape highlight over the mouse.

MOUSEHIGHLIGHT_ELLIPSE: display an ellipse shape highlight over the mouse.

Long

MouseHighlightSize

Sets or gets the mouse highlight size. This property accepts/retrieves a COLORREF value.

long

MouseHighlightColor

Sets or gets the mouse highlight color. This property accepts/retrieves a COLORREF value.

MouseHighlightModeConstants

MouseHighlightMode

Change the mouse highlight mode. Possible values are:

HIGHLIGHTMODE_TRANSLUCENT: The mouse highlight is translucent.

HIGHLIGHTMODE_OPAQUE: The mouse highlight is opaque.

Long

UserEventsNotifyCallback

Determines what events will call the MouseEventsProc and/or KeyboardEventsProc of the ILMScrCapUserEventsCallback interface. Possible values are:

USEREVENT_LBUTTONDOWN: Call MouseEventsProc of the ILMScrCapUserEventsCallback interface if the left mouse button pressed.

USEREVENT_LBUTTONUP: Call MouseEventsProc of the ILMScrCapUserEventsCallback interface if the left mouse button released.

USEREVENT_RBUTTONDOWN:

Call MouseEventsProc of the ILMScrCapUserEventsCallback interface if the right mouse button pressed.

USEREVENT_RBUTTONUP: Call MouseEventsProc of the ILMScrCapUserEventsCallback interface if the left mouse button released.

USEREVENT_MOUSEMOVE: Call MouseEventsProc of the ILMScrCapUserEventsCallback interface when the mouse moves.

USEREVENT_MOUSEWHEEL: Call MouseEventsProc of the ILMScrCapUserEventsCallback interface when the mouse wheel is rotated.

USEREVENT_KEYDOWN: Call KeyboardEventsProc of the ILMScrCapUserEventsCallback interface when a nonsystem key is pressed.

USEREVENT_KEYUP Call KeyboardEventsProc of the ILMScrCapUserEventsCallback interface when a nonsystem key is released.

USEREVENT_SYSKEYDOWN: Call KeyboardEventsProc of the ILMScrCapUserEventsCallback interface when the F10 key pressed (which activates the menu bar) or holds down the ALT key and then presses another key.

USEREVENT_SYSKEYUP: Call KeyboardEventsProc of the ILMScrCapUserEventsCallback interface when the key that was pressed while the ALT key was held down released.

VARIANT_BOOL

ManualMode

Enable or disable the manual capturing mode. In manual capturing mode, frames are pushed downstream on user request (no frames will be captured if CaptureFrames method not called).

Long

CaptureAlignment

Sets or gets the source capture alignments from the capture area. It also has an effect on the panning and zooming process. Possible values are:

CAPALIGNMENT_LEFT: the source capture will be from the left.

CAPALIGNMENT_TOP: the source capture will be from the top.

CAPALIGNMENT_RIGHT: the source capture will be from the right.

CAPALIGNMENT_BOTTOM: the source capture will be from the bottom.

CAPALIGNMENT_HCENTER: the source capture will be from horizontal center.

CAPALIGNMENT_VCENTER: the source capture will be from vertical center.

long

OutlineColor

Sets or gets the outline shape color. This property accepts/retrieves a COLORREF value.

Long

LowerWidthLimit

Sets or gets the minimum region width that can be selected when using the SelectRegionTool method.

Long

UpperWidthLimit

Sets or gets the maximum region width that can be selected when using the SelectRegionTool method.

Long

LowerHeightLimit

Sets or gets the minimum region height that can be selected when using the SelectRegionTool method.

Long

UpperHeightLimit

Sets or gets the maximum region height that can be selected when using the SelectRegionTool method.

Long

RgnSelToolStepSizeX

Sets or gets the X step size of the selection process when using SelectRegionTool method. (e.g If this value is 2, the selection X steps will be 2 by 2 pixels).

Long

RgnSelToolStepSizeY

Sets or gets the Y step size of the selection process when using SelectRegionTool method. (e.g If this value is 2, the selection Y steps will be 2 by 2 pixels).

Long

RgnSelToolWarningColor

Sets or gets the selection tool warning color.

VARIANT_BOOL

RgnSelToolLockSelOnLimit

Enables or disables the lock selection when the region width and/or height reach the limits. If this is VARIANT_TRUE, the selection will be locked. If this is VARIANT_FALSE and the ShowWHInfo property is VARIANT_TRUE, the Width/Height info dialog color will be changed with RgnSelToolWarningColor color.

EffectShapeConstants

OnLeftBtnClkEffectShape

Sets or gets a value that indicates the effect shape when the left button click. Possible values are:

EFFECTSHAPE_NON: dont display any effect whe the mouse clicks.

EFFECTSHAPE_RINGS: display the rings effect when the mouse clicks.

EFFECTSHAPE_CIRCLE: display the circle effect when the mouse clicks.

EFFECTSHAPE_SUN: display the sun effect when the mouse clicks.

EffectShapeConstants

OnRightBtnClkEffectShape

Sets or gets a value that indicates the effect shape when the right button click. Possible values are:

EFFECTSHAPE_NON: dont do any effect.

EFFECTSHAPE_RINGS: display the rings effect when the mouse clicks.

EFFECTSHAPE_CIRCLE: display the circle effect when the mouse clicks.

EFFECTSHAPE_SUN: display the sun effect when the mouse clicks.

long

OnLeftBtnClkEffectColor

Sets or gets the color effect shape for the left mouse button clicks. This property accepts/retrieves a COLORREF value.

long

OnRightBtnClkEffectColor

Sets or gets the color effect shape for the right mouse button clicks. This property accepts/retrieves a COLORREF value.

long

OnLeftBtnClkEffectSize

Sets or gets the shape effect size when the left mouse button clicks.

long

OnRightBtnClkEffectSize

Sets or gets the shape effect size when the right mouse button clicks.

VARIANT_BOOL

EnablePanning

Enable or disable mouse panning. If the value is VARIANT_TRUE then it will override the region and window options and the capture source will be the area around the mouse that can be determined using the PanningWidth and PanningHeight properties.

Long

ZoomFactor

Change the zoom factor. Possible value between 10 and 800. Where 100 causes no zoom (normal size).

Interface Methods:

HRESULT PanToXY(long lXPos, long lYPos)

Parameters

lXPos | The X Coordinates on the screen.
lYPos | The Y Coordinates on the screen.

Description

To move the capture area to the X and Y coordinates on the screen. This is valid only if the EnablePanning and EnableRegion properties are true. The CaptureAlignment property determines the source capture alignments from the capture area.

Return

S_OK if successful, E_UNEXPECTED otherwise.

HRESULT PanToWindow(long lHwnd, VARIANT_BOOL vbFollow, VARIANT_BOOL vbFit)

Parameters

lHwnd | The window handle to pan to it, or use one of the following values: PANTO_WINDOWUNDERCURSOR: To pan to the window that is under the user cursor. PANTO_ACTIVEWINDOW: To pan to the window that is active.
vbFollow | Determine if the region needs to follow the window when its position changed. Pass VARIANT_TRUE to follow the window, pass VAIRNAT_FALSE to do not.
vbFit | Determine if the region needs to fit to the window. Pass VARIANT_TRUE to fit the window, pass VAIRNAT_FALSE to do not.

Description

To move the capture region to the passed window handle coordinates. This is valid only if the EnablePanning and EnableRegion properties are true. The CaptureAlignment property determines the source capture alignments from the capture area.

HRESULT PanToCursor(VARIANT_BOOL vbFollow)

Parameters

vbFollow

If this is VARIANT_TRUE, the region will track the cursor when it moves.

Description

To move the capture region to the cursor position. This is valid only if the EnablePanning and EnableRegion properties are true. The CaptureAlignment property determines the source capture alignments from the capture area.

HRESULT SetZoomStepsInfo(long lSteps, long lMinStepSize)

Parameters

lSteps | The zoom steps value between the old zoom level and new zoom level.
lMinStepSize | The minimum step size in pixels. If the increase/decrease size will be less than lMinStepSize value, then the increase/decrease size will be lMinStepSize value.

Description

Sets the zoom steps information to change the zoom level from the old to the new level with steps. To change the zoom level without any steps, pass 0 to lSteps parameter.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT GetZoomStepsInfo(long *plSteps, long *plMinStepSize)

Parameters

PlSteps | Pointer to receive the current zoom steps value.
plMinStepSize | Pointer to receive the current minimum step size in pixels.

Description

Gets the current zoom steps information.

Return

S_OK if successful, S_E_POINTER otherwise.

HRESULT SetPanStepsInfo(long lSteps, long lMinStepSize)

Parameters

lSteps | The pan steps value between the old position and new position.
lMinStepSize | The minimum step size in pixels. If the movement size will be less than lMinStepSize value, then the movement size will be lMinStepSize value.

Description

Sets the pan steps information to change the movement from the old to the new positions with steps. To set the movement without any steps, pass 0 to lSteps parameter.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT GetPanStepsInfo(long *plSteps, long *plMinStepSize)

Parameters

PlSteps | Pointer to receive the current pan steps value.
plMinStepSize | Pointer to receive the current minimum step size in pixels.

Description

Gets the current movement steps information.

Return

S_OK if successful, E_POINTER otherwise.

HRESULT ResetToDefaults()

Description

Reset the screen capture options values to the default values.

Return

S_OK

HRESULT CaptureFrames(long lFramesNumber)

Description

Use CaptureFrames method to force the number of frames (determined by lFramesNumber parameter) to be captured. This method must be called in the manual mode; otherwise it will return a wrong state error.

Return

S_OK if successful, VFW_E_WRONG_STATE otherwise.

HRESULT RefreshSource()

Description

To Refresh the capture source coordinates before running

Return

S_OK value.

HRESULT SelectRegionTool ()

Description

Activates the region selection tool for selecting a region of the current desktop. To select a region, press and hold the left mouse button and drag the mouse until the desired region is outlined. Release the mouse button to complete the selection. To cancel the selection process, press the ESC key. Options are provided for displaying information while dragging the mouse.

For more information, refer to the following properties listed in the Interface Properties table above:

EnableRegion property

RegionLeft property

RegionTop property

RegionRight property

RegionBottom property

ShowPanWindow property

ShowCrossLines property

ShowXYPosInfo property

ShowWHInfo property

Return

S_OK if successful, S_FALSE otherwise.

HRESULT SelectWindowTool ()

Description

Activates the window selection tool for selecting a window as the capture source for the filter. To select the window under the cursor, press the left mouse button. To cancel the window selection process, press the ESC key. Options are provided by several properties of this interface, for displaying information while dragging the mouse.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT SetCallbackObject(ILMScrCapUserCallback *pCallbackObject, long pUserData)

Parameters

pCallbackObject | a valid pointer to an ILMScrCapUserCallback interface.
pUserData | Long value to pass a pointer for user-defined data required by the callback.

Description

Sets the callback object for the Screen Capture filter. For more information, refer to ILMScrCapUserCallback interface.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT ChangeSettings(VARIANT_BOOL bBegin)

Parameters

bBegin | Indicates whether the properties are being changed and the streaming paused, or the properties are being updated and streaming resumed.
 | Value | Meaning
 | VARIANT_TRUE | The properties are being changed and streaming has been paused.
 | VARIANT_FALSE | The properties are being updated and streaming has resumed.

Description

Sets the changes affecting the capture source. You must call this method before and after setting the following properties or calling the following methods of the ILMScrCap Interface:

CaptureSource property

SourceWindowHandle property

RegionLeft property

RegionTop property

RegionRight property

RegionBottom property

SelectRegionTool method

SelectWindowTool method

Return

S_OK if successful, S_FALSE otherwise.

HRESULT CancelSourceSelection()

Description

Cancels the region or window selection process.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT SetUserEventsCallbackObject(ILMScrCapUserEventsCallback *pCallbackObject, long pUserData)

Parameters

pCallbackObject | a valid pointer to an ILMScrCapUserEventsCallback interface.
pUserData | Long value to pass a pointer for user-defined data required by the callback.

Description

Sets the callback object for the user events. Pass NULL in pCallbackObject parameter to free the old callback object. For more information, refer to ILMScrCapUserEventsCallback interface.

Return

S_OK if successful, E_POINTER otherwise.


ILMScrCapUserCallback Interface

ILMScrCapUserCallback Interface

This is a user callback interface that should be implemented and registered using SetCallbackObject method of the ILMScrCap interface.

Interface Methods:

HRESULT RegionDataProc (long lLeft, long lTop, long lRight, long lBottom, long pUserData)

Parameters

lLeft | left border of the selected region in screen coordinates.
lTop | top border of the selected region in screen coordinates.
lRight | right border of the selected region in screen coordinates.
lBottom | bottom border of the selected region in screen coordinates.
pUserData | pointer to user-defined data passed to the SetCallbackObject method of the ILMScrCap interface.

Description

The Screen Capture filter calls this method when the region selection tool is active, to report region selection. It is called only when the user releases the left button of the mouse indicating the end of region selection.

For more information on selecting a region, refer to the SelectRegionTool method of the ILMScrCap interface.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT WindowDataProc (long lWindow, WindowSelectStatusConstants WindowStatus, long pUserData)

Parameters

lWindow | the window handle of the window under the mouse cursor.
WindowStatus | a constant that specifies the event for which the method is called. Possible values are:
 | WINDOW_SELECT_STATUS_UPDATE | The mouse is moved over a new window.
 | WINDOW_SELECT_STATUS_SELECTED | The left button is pressed; the selection is done.
 | WINDOW_SELECT_STATUS_CANCELED | The selection process is cancelled. The selection process can be cancelled by pressing the Esc key.
pUserData | pointer to user-defined data passed to the SetCallbackObject method of the ILMScrCap interface.

Description

The filter will call this method while the window selection tool is active, to report window selection events. This method will be called in the following situations:

1. | When the mouse moves, provided that the window under the cursor is different from the previously reported window.
2. | When the selection process is cancelled. The selection process can be cancelled by pressing the Esc key.
3. | When the selection process is concluded, by pressing the left button of the mouse.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT NotifyCallbackProc (NotifyCallbackConstants NotifyCallback, long pUserData)

Parameters

NotifyCallback | constant that indicates the event for which this method was called. Possible values are:
 | Value | Meaning
 | NOTIFY_CLOSE | The window (capture source) has been closed.
 | NOTIFY_MINIMIZE | The window (capture source) has been minimized.
 | NOTIFY_AREACHANGE | The capture area of the window has been changed; this happens if the window was resized or the visible area was changed.
 | NOTIFY_CAPWIDTH_EXCEEDED_LIMIT | The selected region width exceeded the values in LowerWidthLimit or/and UpperWidthLimit properties.
 | NOTIFY_CAPHEIGHT_EXCEEDED_LIMIT | The selected region height exceeded the values in LowerHeightLimit or/and UpperHeightLimit properties.
pUserData | pointer to user-defined data passed to the SetCallbackObject method of the ILMScrCap interface.

Description

The filter will call this method when the capture source window is closed, minimized, changed or the selected region dimensions exceeded the lower/upper width/height values.

Return

S_OK if successful, S_FALSE otherwise.


ILMScrCapUserEventsCallback Interface

ILMScrCapUserEventsCallback Interface

This is a user callback interface that should be implemented and registered using SetUserEventsCallbackObject method of the ILMScrCap interface.

Interface Methods:

HRESULT MouseEventsProc(long lMsg, long lXPos, long lYPos, long lWheelDelta, long pUserData)

Parameters

lMsg | Specifies the identifier of the mouse message. This parameter can be one of the following messages:
 | Value | Meaning
 | USEREVENT_LBUTTONDOWN | The left mouse button is pressed.
 | USEREVENT_LBUTTONUP | The left mouse button is released.
 | USEREVENT_MOUSEMOVE | The mouse moves.
 | USEREVENT_MOUSEWHEEL | The mouse wheel is rotated.
 | USEREVENT_RBUTTONDOWN | The right mouse button is pressed.
 | USEREVENT_RBUTTONUP | The left mouse button is released.
lXPos | The X-coordinate of the mouse.
lYPos | The Y-coordinate of the mouse.
lWheelDelta | Wheel delta where a positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120. This is valid only when the message is WM_MOUSEWHEEL.
pUserData | Pointer to the user data.

Description

The filter will call this method every time a new mouse input event is posted.

HRESULT KeyboardEventsProc([in] long lMsg, [in] long lvKey, [in] VARIANT_BOOL bAltPressed, [in] long pUserData)

Parameters

lMsg | Specifies the identifier of the keyboard message. This parameter can be one of the following messages:
 | Value | Meaning
 | USEREVENT_KEYDOWN | The nonsystem key is pressed.
 | USEREVENT_ KEYUP | The nonsystem key is released.
 | USEREVENT_SYSKEYDOWN | The system key is pressed.
 | USEREVENT_SYSKEYUP | The system key is released.
lvKey | Specifies a virtual-key code.
bAltPressed | Indicates if the ALT key is pressed or not.
pUserData | Pointer to the user data.

Description

The filter will call this method every time a new keyboard input event is posted.


LEAD Still Image Reader

LEAD Still Image Reader

The LEAD Still Image Reader allows DirectShow applications (such as Windows Media Player) to read a variety of still image file formats, including:

  • Windows BMP
  • Compuserve GIF
  • TIFF
  • PNG
  • JPEG
  • Exif
  • LEAD CMP
  • Kodak PCD
  • Macintosh PICT
  • And many more-

This filter can read both single page (still) files, and multi-page files including AVIs. Embedded audio streams in EXIF files are also supported, and can be streamed via a second audio pin. With this filter, you-ll be able to view images as video (also audio if available) using any DirectShow enabled system including of course the LEAD multimedia toolkit and the Windows media player. The filter offers the ability to control the stream speed by changing the frame rate; you can do that from the filter-s property page.

The Still Image Reader needs to be registered before it can be used. The filter requires LEADTOOLS raster DLLs (v16 or v15) to be present in the system folder or in a folder that is part of the system path. The following DLLs are needed:

- for v15: LTKRN15U.DLL, LTFIL15U.DLL, LTDIS15U.DLL and the file filters required for the particular file format you wish to support.

- for v16: LTKRNU.DLL, LTFILU.DLL, LTDISU.DLL and the file filters required for the particular file format you wish to support.

However, the filter DLL itself does not need to be copied into the system directory or the system path.

The filter is capable of loading any file format supported by LEADTOOLS Raster Imaging toolkit. You need to unlock raster still image support using the DirectShow Kernel before you can load the extra file formats not listed in the above list.

The filter, upon registration, associates itself with a group of file extensions so it will be used by DirectShow to stream these files. As the filter supports many more file formats, you can register other extensions for viewing by the filter using the register facility in the filter-s property page.

You will need a LEADTOOLS Imaging Pro license to use this filter.

All the functionality in the filter-s property page is available via the programming interface of the filter; ILTStlImgRd.

The property page can be brought up by the LEADTOOLS Multimedia toolkit using IltmmPlay::ShowDialog. It can also be brought up with the Media Player v6 by going to the File -> Properties menu, clicking on Advanced and then on Properties. Media Player v7 does not provide the ability to display the Reader Property Page.

Filter Interface | ILTStlImgRd (derived from IDispatch) ILMMCommon
Interface ID | IID_ILTStlImgRd
Output Media Types | MEDIATYPE_Video MEDIATYPE_Stream, for embedded audio streams. Subtype is MEDIASUBTYPE_WAVE
Filter CLSID | CLSID_LTStlImgRd
Property Page CLSID | CLSID_LTStlImgRdPropertyPage
Filter category | CLSID_LegacyAmFilterCategory
Executable | ltStlImgRd.dll
Header | ILTStlImgRd.h

Platforms

Win32, x64

LEAD Still Image Reader User Interface


LEAD Still Image Reader User Interface

This filter allows DirectShow© applications (such as Windows Media Player) to read a variety of still image file formats, including:

  • Windows BMP

  • Compuserve GIF

  • TIFF

  • PNG

  • JPEG

  • Exif

  • LEAD CMP

  • Kodak PCD

  • Macintosh PICT

This filter can read both single page (still) files, and multi-page files including AVIs. Embedded audio streams in EXIF files are also supported, and can be streamed via a second audio pin. With this filter, you'll be able to view images as video (also audio if available) using any DirectShow enabled system. The filter offers the ability to control the stream speed by changing the frame rate; you can do that from the filter's property page.

The filter, upon registration, associates itself with a group of file extensions so it will be used by DirectShow to stream these files. As the filter supports many more file formats, you can register other extensions for viewing by the filter using the register facility in the filter's property page.

The filter is capable of loading any file format supported by LEADTOOLS Raster Imaging toolkit. You need to unlock raster still image support using the DirectShow Kernel before you can load the extra file formats not listed in the above list.

The property page can be brought up with the Media Player v6 by going to the File -> Properties menu, selecting Advanced and then on Properties. Media Player v7 does not provide the ability to display the Reader Property Page. The property page is shown in the figure below:

The Still Image Reader property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. If one or more of the filter's output pins are connected, the input file name edit box and the browse button will be disabled. The File Extensions Association frame helps manage the file extensions associated with this filter, as it will be used automatically to stream the registered files types.

Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Input file name edit box

This edit box contains the input file name. It will be disabled after the output pin is connected. The button to the right of the edit box invokes the Open dialog to help the user browse for an input file. This button will also be disabled after the output pin is connected.

Enable frame rate control check box

This check box toggles the frame rate control state. If this box is selected, then the stream will play at the frame rate specified in the Frame rate spin box. If the check box is cleared, then the filter uses one of the following playback speeds:

  • If playback speed information is contained in the loaded file, that playback speed will be used

  • If playback speed information is not available in the loaded file then a default of 30 frames per second is used.

Frame rate spin box

Changes the frame rate at which the stream plays, in frames per second. This box is enabled only if the Enable frame rate control check box is selected

Show Page drop-down list box

Use this to jump to some page in the stream. If you select "All", then all pages will be played, otherwise if the value is between 1 and the total number of pages, then the stream will jump to the specified page and stay. That is, the stream freezes at the chosen page. This combo box will be disabled if the loaded file contains only one page.

Loop edit box

Specify how many time the file can be played repeatedly.

Total Pages (read only) box

Contains the total number of pages in the loaded file

File Extensions Association

Helps manage the file extensions associated with this filter, so it will be used automatically to stream the registered files types. In addition to the provided list of most common extensions, the user can add his or her custom extensions. If you remove the custom extension using the "<<" button, it will not be moved to the "Non-Registered" list and you have to manually add it again to use it again.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.


ILTStlImgRd Interface

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

oftware component which decompresses audio. It must be designed to work with ACM or DirectShow . Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams.

Available in LEADTOOLS Multimedia toolkits.

ILTStlImgRd Interface

Interface Properties:

Type

Name

Description

VARIANT_BOOL

AudioExtension

(Read only) Indicates the availability of an audio stream in the loaded file. It will contain VARIANT_TRUE if there is an embedded audio stream in the loaded file, and VARIANT_FALSE otherwise.

VARIANT_BOOL

ConnectionState

(Read only) Gets the output pin's connection status.

It will contain VARIANT_TRUE if a video pin, an audio pin (if it exists) or all pins are connected, and VARIANT_FALSE otherwise.

long

Format

(Read only) This is updated with the loaded file format. For a list of possible values, refer to Summary of All Supported Image File Formats .

long

FrameRate

Sets or gets the frame rate in frames per second. This will change the frame duration, the time the frame will be displayed in multi-page files. Possible values range from 0.1 to 60.0 frames per second. For this property to take effect, the FrameRateControl property must be set to VARIANT_TRUE.

VARIANT_BOOL

FrameRateControl

Enables or disables the frame rate control process. Setting this property to VARIANT_FALSE will force the filter to use the default frame rate saved in the file. If no frame rate was saved in the file, the default value used for frame rate is 30 fps.

BSTR

InputFileName

Sets or gets the input file name. The filter can be loaded without specifying a file name, but in this case the output pin will have nothing to offer. Setting the file name while the output pin(s) is (are) connected will fail: you need to disconnect all pins in order to set a new file name.

If you are getting this property, you are responsible for freeing the buffer containing the file name. The buffer must be freed by calling the system function SysFreeString. See the Microsoft documentation for more details on this function.

long

LastErrorCode

(Read only) Gets the last error code. For a list of possible values, refer to LEAD's Return Codes .

BSTR

LastErrorString

(Read only) Gets the last error string.

The user is responsible for freeing the allocated string.

long

PageNumber

Sets or gets the page number. This is the page to be displayed, for multi-page files.

If the value is 0, all pages will be played. To view only one page, set this property to a value between 1 and TotalPages. Don’t use zero-based indexing. For example, if there are 10 pages in a file, then to stream the first page set this property to 1, and to stream the last page set it to 10.

BSTR

RegisteredExtensions

Retrieves the list of currently registered file extensions. The extensions are separated by a comma (,).

long

TotalPages

(Read only) Gets the number of available pages in the loaded file. If the loaded file contains only one page, this property will return 1.

Long

Loop

Sets or gets the number of times the loaded image or sequence of images is to be repeated. The default value is 1 which means the sequence will be played once and not be repeated. Use 0 to continuously repeat the sequence.

Interface Methods:

HRESULT RegisterExtensions (BSTR strExtensions)

Parameters

strExtensions

String containing one or more extensions to be registered. The extensions must be separated by a comma (,), and they must contain only alphanumeric characters (a to z, A to Z, 0 to 9). Each extension should have less than 32 characters.

Description

Registers a group of file extensions.

Returns

S_OK if successful, or another error code otherwise.

HRESULT UnRegisterExtensions (BSTR strExtensions)

Parameters

strExtensions

String containing one or more extensions to be unregistered. The extensions must be separated by a comma (,), and they must contain only alphanumeric characters (a to z, A to Z, 0 to 9). Each extension should have less than 32 characters.

Description

Registers a group of file extensions.

Returns

S_OK if successful, or another error code otherwise.


LEAD Still Image Writer

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Tagged Image File Format (abbreviated TIFF) is a file format for storing images. TIFF is a popular format for high color depth images, along with JPEG

Joint Photographic Experts Group- commonly used method of compression for photographic images

Available in LEADTOOLS Multimedia toolkits.

LEAD Still Image Writer

The LEAD Still Image Writer filter allows any DirectShow application (such as Windows Media Player) to save the video stream to a variety of different still image file formats, including:

  • Windows BMP

  • Compuserve GIF

  • TIFF

  • PNG

  • JPEG

  • Exif

  • LEAD CMP

  • Kodak PCD

  • Macintosh PICT

The filter is capable of saving any file format supported by LEADTOOLS Raster Imaging toolkit. You need to unlock raster still image support using the DirectShow Kernel before you can save the extra file formats not listed in the above list.

The LEAD Still Image Writer filter uses the LEAD raster DLL's (v16: LTFILU.DLL, LTKRNU.DLL, LTDISU.DLL, LFXXX.DLL or v15: LTFILL15U.dll, LTKRN15U.dll, LTDIS15U.DLL, LFXXX.dll). These files can be in the same Still Image Filter folder or any folder in the Windows system-defined path.

You will need a LEADTOOLS Imaging Pro license to use this filter.

Filter Interface

ILTStlImgWrt
ILTStlImgWrtUserCallback
ILMMCommon

Interface ID

IID_ILTStlImgWrt
IID_ILTStlImgWrtUserCallback

Input/Output Media Types

MEDIATYPE_Video.
and the following subtypes
MEDIASUBTYPE_RGB24,
MEDIASUBTYPE_RGB555, and
MEDIASUBTYPE_RGB8.

Filter CLSID

CLSID_LTStlImgWrt

Property Page CLSID

CLSID_LTStlImgWrtPropertyPage

Filter category

CLSID_LegacyAmFilterCategory

Executable

LTStlImgWrt.dll

Header

ILTStlImgWrt.h

Platforms

Win32, x64

LEAD Still Image Writer User Interface


A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.decompressor before you can play (see) it.

LEAD Still Image Writer User Interface

This filter allows any DirectShow application (such as Windows Media Player) to save the video stream to a variety of different still image file formats, including:

  • Windows BMP

  • Compuserve GIF

  • TIFF

  • PNG

  • JPEG

  • Exif

  • LEAD CMP

  • Kodak PCD

  • Macintosh PICT

The filter is capable of saving any file format supported by LEADTOOLS Raster Imaging toolkit. You need to unlock raster still image support using the DirectShow Kernel before you can save the extra file formats not listed in the above list.

The property page is shown in the figure below:

The Still Image Writer property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Output file name edit box

This edit box contains the base output file name. When saving images to multiple files, the base file name will be appended, before the extension, with the sequence number. The number of digits specified in the Numbering Digits drop-down list box indicates the number of digits used in the sequence number. For example, if the Numbering digits drop-down list box contains 5 and you are saving multiple files, the sequence numbers will be 00000, 00001, 00002, 00003, etc.

The base output file name will be used as is if the Multi-Page option is selected. The button to the right invokes the Save Dialog to let the user set the output file name or browse for a specific file. The edit box and the button will be disabled during streaming.

Output file type list box

Contains the available file types for saving. This drop-down list box will be disabled during streaming.

MultiPage check box

Specifies whether to save images as a multi-page file or a sequence of separate files. This check box will be enabled only if the selected file type supports multi-page files.

Output file subtype list box

Contains the available file subtypes for the selected file type. Many file types do not have subtypes, in which case the box will be disabled.

Quality factor slider

Specifies the quality factor for controlling the compression process. The higher the value, the more the compression, and the lower the quality will be. This slider will be enabled only if the selected type and subtype can take a QFactor

Numbering digits list box

Contains the number of digits to be used for generating the output file name sequence. If the number of digits selected is not enough for numbering the output files, the sequence number will be incremented automatically.

Overwrite options group

Prompt to overwrite check box

Check this to be prompted for the overwrite option before overwriting an existing file. If this is selected, the Options dialog will be displayed. If this check box is cleared, the option selected in the Overwrite options radio button group will be applied automatically

Overwrite options radio buttons group

Select one overwrite option to be applied in all overwrite situations. The default option is "Use next file name". These radio buttons are only available if the Prompt to overwrite checkbox is cleared.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Also known as a decoder, this is a module or algorithm to decompress data.

Tagged Image File Format (abbreviated TIFF) is a file format for storing images. TIFF is a popular format for high color depth images, along with JPEG

Joint Photographic Experts Group- commonly used method of compression for photographic images


ILTStlImgWrt Interface

ILTStlImgWrt Interface

Data types

1. File Flags:

#define SHOWPROG 0x01
#define SHOWQFACTOR 0x02
#define SHOWMULTIPAGE 0x04
#define SHOWSTAMP 0x08
#define LOSSLESS_JPEG 0x10

Describe possible values for the InfoFileTypeFlags property and the InfoFileSubTypeFlags property listed in the Interface Properties section below.

2. File Save Options:

typedef [v1_enum] enum FileSaveOptions
{
SAVE_OPTION_OVERWRITE = 1,
SAVE_OPTION_SKIP = 2,
SAVE_OPTION_USE_NEXT_NAME = 4,
SAVE_OPTION_APPLYTOALL = 8,
} FileSaveOptions;

Describes possible options when trying to save to a file that already exists.

Constant | Description
SAVE_OPTION_OVERWRITE | Save the current frame over the existing file if it currently exists.
SAVE_OPTION_SKIP | Skip saving the current frame if the file name currently exists.
SAVE_OPTION_USE_NEXT_NAME | Generate the next file name if the file name currently exists.
SAVE_OPTION_APPLYTOALL | Apply the option to all subsequent cases.

3. File Format Types:

These are the same as in the LEADTOOLS Raster Imaging documentation. For a complete list of format types, refer to Summary of All Supported Image File Formats

typedef [v1_enum] enum FileTypeConstants
{
SAVEFILE_CMP
 = 5,
SAVEFILE_LEAD1BIT = 26,
SAVEFILE_JFIF = 10,
SAVEFILE_CMW = 165,
SAVEFILE_J2K = 164,
SAVEFILE_TIF = 3,
SAVEFILE_GIF = 2,
SAVEFILE_PNG = 75,
SAVEFILE_CALS = 50,
SAVEFILE_CLP = 114,
SAVEFILE_DICOM_GRAY = 89,
SAVEFILE_DICOM_COLOR = 90,
SAVEFILE_CUT = 108,
SAVEFILE_EMF = 116,
SAVEFILE_EPS = 16,
SAVEFILE_EXIF = 96,
SAVEFILE_FAX_G4 = 68,
SAVEFILE_FLC = 134,
SAVEFILE_FPX = 80,
SAVEFILE_IMG = 52,
SAVEFILE_IFF_ILBM = 111,
SAVEFILE_ICA_G4 = 73,
SAVEFILE_INTERGRAPH_RLE = 122,
SAVEFILE_JBIG = 115,
SAVEFILE_MAC = 51,
SAVEFILE_PCT = 56,
SAVEFILE_RAWICA_G4 = 79,
SAVEFILE_MSP = 53,
SAVEFILE_OS2 = 14,
SAVEFILE_PBM_ASCII = 106,
SAVEFILE_PCX = 1,
SAVEFILE_PGM_ASCII = 104,
SAVEFILE_PPM_ASCII = 106,
SAVEFILE_PSD = 76,
SAVEFILE_RAW = 153,
SAVEFILE_SCT = 250,
SAVEFILE_SGI = 142,
SAVEFILE_RAS = 55,
SAVEFILE_TGA = 4,
SAVEFILE_WFX_G4 = 70,
SAVEFILE_BMP = 6,
SAVEFILE_WIN_CUR = 92,
SAVEFILE_WIN_ICO = 91,
SAVEFILE_WBMP = 170,
SAVEFILE_WMF = 15,
SAVEFILE_WPG = 54,
SAVEFILE_XBM = 110,
SAVEFILE_SMP = 256,
SAVEFILE_XPM = 109,
SAVEFILE_XWD10 = 132,
SAVEFILE_XWD11 = 133
} FileTypeConstants;

File Type Constant | Description
SAVEFILE_CMP | LEAD CMP
SAVEFILE_LEAD1BIT | LEAD 1 bit, lossless compression
SAVEFILE_JFIF | Jpeg File Interchange Format
SAVEFILE_CMW | Wavelet CMP
SAVEFILE_J2K | Jpeg2000 stream
SAVEFILE_TIF | Tagged Image File Format
SAVEFILE_GIF | CompuServe GIF
SAVEFILE_PNG | Portable Network Graphics
SAVEFILE_CALS | CALS Raster file
SAVEFILE_CLP | Microsoft Windows Clipboard Uncompressed
SAVEFILE_DICOM_GRAY | Grayscale DICOM uncompressed
SAVEFILE_DICOM_COLOR | Color DICOM uncompressed
SAVEFILE_CUT | Dr. Halo.
SAVEFILE_EMF | Windows Enhanced Metafile
SAVEFILE_EPS | Encapsulated PostScript
SAVEFILE_EXIF | Uncompressed RGB Exif file
SAVEFILE_FAX_G4 | Raw FAX, compressed using CCITT group 4
SAVEFILE_FLC | Flic Animation 256 color
SAVEFILE_FPX | FlashPix, with no compression
SAVEFILE_IMG | GEM Image
SAVEFILE_IFF_ILBM | Interchange File - RLE Compressed.
SAVEFILE_ICA_G4 | IOCA, compressed using CCITT group 4
SAVEFILE_INTERGRAPH_RLE | ITG, Intergraph RLE compressed file
SAVEFILE_JBIG | JBIG compression.
SAVEFILE_MAC | MacPaint - Macintosh Paint
SAVEFILE_PCT | Macintosh QuickDraw
SAVEFILE_RAWICA_G4 | IOCA, compressed using CCITT group 3, 2 dimensions, without the MO:DCA wrapper.
SAVEFILE_MSP | Microsoft Paint
SAVEFILE_OS2 | OS/2 BMP version 1.x
SAVEFILE_PBM_ASCII | Portable Bitmap - ASCII File
SAVEFILE_PCX | ZSoft PCX
SAVEFILE_PGM_ASCII | Portable Greymap - ASCII File
SAVEFILE_PPM_ASCII | Portable Pixelmap - ASCII File
SAVEFILE_PSD | Adobe Photoshop 3.0.
SAVEFILE_RAW | Raw uncompressed data
SAVEFILE_SCT | Scitex Continuous Tone Format
SAVEFILE_SGI | Silicon Graphics Image uncompressed
SAVEFILE_RAS | Sun Raster, uncompressed
SAVEFILE_TGA | TARGA, uncompressed
SAVEFILE_WFX_G4 | Winfax, compressed using CCITT group
SAVEFILE_BMP | Windows BMP, with no compression
SAVEFILE_WIN_CUR | Windows Cursor
SAVEFILE_WIN_ICO | Windows Icon
SAVEFILE_WBMP | Wireless Bitmap
SAVEFILE_WMF | Windows Metafile
SAVEFILE_WPG | WordPerfect Graphics Format
SAVEFILE_XBM | XWindows XbitMap
SAVEFILE_SMP | Xionics format
SAVEFILE_XPM | XWindows XPicMap
SAVEFILE_XWD10 | XWindows X Window dump, version 10
SAVEFILE_XWD11 | XWindows X Window dump, version 11

4.Callback Options:

typedef [v1_enum] enum SaveCallbackFlagsOptions
{
FRAME_OPTION_SAVE = 0,
FRAME_OPTION_SKIP = 1,
FRAME_OPTION_SKIP_AND_KEEP_NAME = 2
} SaveCallbackFlagsConstants;

Describes possible options when saving data using the callback.

Constant | Description
FRAME_OPTION_SAVE | The filter will save the frame.
FRAME_OPTION_SKIP | The filter will not save the frame and will use the next output file name sequence for the next frame.
FRAME_OPTION_SKIP_AND_KEEP_NAME | The filter will not save the frame and will use the current output file name sequence for the next frame.

Interface Properties

Type | Name | Description
long | BitsPerPixel | Gets or sets the bits per pixel for the current file type. Changing this property will also change the FileTypeIndex, IsQFactorSupported, IsMultipageSupported and FileSubTypeIndex properties.
BSTR | FileName | Gets or sets the output file name. If the filter is loaded without specifying an output file name, a temporary file name is generated and the user is asked whether to use the temporary filename or not. If the user chooses not to use the temporary file name, the graph will not run. The user is responsible for freeing the allocated string.
long | FileSubTypeIndex | Gets or sets the current file subtype index. If the current file type has no subtypes, then trying to get or set this property will result in an E_INVALIDARG error.
FileTypeConstants | FileTypeFormat | Gets or sets the current file type format. Changing this value will also change the FileSubTypeIndex property. Generally, any change to this property will affect the following properties: FileTypeIndex, BitsPerPixel, IsQFactorSupported, IsMultipageSupported and FileSubTypeIndex. This property takes one of the enumerated FileTypeConstants. The file formats are the same as in the LEADTOOLS Raster Imaging documentation. For a complete list of format types, see "Formats of Output Files" in either the Ltcomn.hlp file or the Ltdlln.hlp file. These files are located in the LEAD/HELP directory, where LEAD represents the directory in which you installed the toolkit.
long | FileTypeIndex | Gets or sets the file type index. Any change in this value will affect the following properties: FileTypeFormat, BitsPerPixel, IsQFactorSupported, IsMultipageSupported, and FileSubTypeIndex.
SaveFileOptions | HandleExistingFile | Gets or sets the option for handling existing files (overwriting options) when saving. For a list of possible values, refer to File Save Options. SAVE_OPTION_APPLYTOALL can be ORed with the chosen option to apply it to all subsequent cases.
long | InfoFileSubTypeFlags(long lFileTypeIndex); | Read only. Gets the subtype flags for the file type and file subtype at the specified index. For a list of possible values, refer to File Flags. Please note that these values may be combined using OR.
long | InfoFileSubTypeFormat(long lFileTypeIndex); | Read only. Gets the subtype format for the file type and file subtype at the specified index.
long | InfoFileSubTypesCount(long lFileTypeIndex); | Read only. Gets the number of subtypes for the file type at the specified index.
BSTR | InfoFileSubTypeString(long lFileSubTypeIndex) | Read only. Gets the subtype string for the file type and file subtype at the specified index. The user is responsible for freeing the allocated string.
long | InfoFileTypeBpp(long lIndex) | Read only. Gets the bits per pixel for the file type at the specified index.
BSTR | InfoFileTypeExt(long lIndex) | Read only. Gets the extension string for the file type at the specified index. The user is responsible for freeing the allocated string.
long | InfoFileTypeFlags(long lIndex) | Read only. Gets the flags for the file type at the specified index. For a list of possible values, refer to File Flags. Please note that these values may be combined using OR.
long | InfoFileTypeFormat(long lIndex) | Read only. Gets the file type format for the specified file type index. The file formats are the same as in the LEADTOOLS Raster Imaging documentation. For a complete list of format types, see "Formats of Output Files" in either the Ltcomn.hlp file or the Ltdlln.hlp file. These files are located in the LEAD/HELP directory, where LEAD represents the directory in which you installed the toolkit.
BSTR | InfoFileTypeString(long lIndex) | Read only. Gets the file type string for the specified file type index. The user is responsible for freeing the allocated string.
VARIANT_BOOL | InputPinStreamingState | Read only. Retrieves the streaming state of the input pin; VARIANT_TRUE if running and VARIANT_FALSE otherwise.
VARIANT_BOOL | IsMultipageSupported | (Read only) Indicates whether the current file type supports multi-page files.
VARIANT_BOOL | IsQFactorSupported | (Read only) Indicates whether the current file type supports the QFactor for controlling the file compression.
long | LastErrorCode | (Read only) Gets the last error code. This will be one of the standard LEADTOOLS error codes. For a list of possible error codes, refer to Return Codes.
BSTR | LastErrorString | (Read only) Gets the last error string. The user is responsible for freeing the allocated string.
long | NumberingDigits | Gets or sets the number of digits to use in the output file sequence names.
VARIANT_BOOL | PromptOverwrite | Enables or disables prompting for the file overwrite options. If this property is set to VARIANT_TRUE, a dialog will be shown if the next file name to be used already exists. The dialog will offer the overwrite, skip, and use next available name options in addition to an apply for all option. If this property is set to VARIANT_FALSE, the option in the HandleExistingFile property will be used without asking.
long | QFactor | Gets or sets the QFactor for the current file type format.
VARIANT_BOOL | SaveMultipage | Enables or disables saving to a multi-page file. This will only affect formats that support multi-page files. See also the IsMultipageSupported property.
ILTStlImgWrtUserCallback | SaveOptionsCallback | Sets the callback object pointer. For more information, refer to the ILTStlImgWrtUserCallback interface.
long | SupportedFileTypesCount | Read only. Retrieves the number of file types that the filter can save. This can be used to loop through all the supported types getting information such as the string, the bits per pixel, the extension, etc. This can help you build your own user interface.
VARIANT_BOOL | UseTempFileName | Gets or sets a flag that indicates whether to use the temp file name if the user did not set the output file name in the FileName property. If the value is VARIANT_TRUE the filter will create a temp file name and use it. If the value is VARIANT_FALSE the filter will create a temp file and ask the user if he wants to save the frame using the temp file name.
Long | DialogParentWnd | Gets or sets the window handle for the messages boxes and the prompt dialog.
VARIANT_BOOL | EnableMessageBoxes | Enables or disables the displaying of the messages boxes when an error occurred.

Interface Methods:

HRESULT ResetErrorCode()

Description

To reset the last error value to success.

Returns

S_OK if successful, or another error code otherwise.


ILTStlImgWrtUserCallback Interface

ILTStlImgWrtUserCallback Interface

User Interface

This is a user callback interface that should be implemented and registered using ILTStlImgWrt::SaveOptionsCallback.

Interface Methods:

HRESULT SaveOptionsProc (BSTR *pstrFileName, SaveCallbackFlagsConstants *pSaveFlags, VARIANT_BOOL bMultiPage)

Parameters

pstrFileName | string containing the new output file name for the current frame. If you don’t want to change the output file name, pass NULL.
pSaveFlags | flag that indicates how the callback should handle the frame. For a list of possible values, refer to SaveCallbackFlagsConstants.
lFrameNumber | Contains the current passed frame index.
bMultiPage | If the value is VARIANT_TRUE, then the output file is a multipage file, if the value is VARIANT_FALSEm then the output file is not a multipage file.

Description

This method is called by the filter for each frame.

Returns

S_OK if successful, or another error code otherwise.


LEAD Video Text Overlay Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Text Overlay Filter (2.0)

This is a DirectShow transform filter that performs text overlaying on a video stream . It supports a wide range of text options from font and wrapping to rotation and transparency. The filter exposes its functionality through both user and programming interfaces.

Filter Interface(s) | ILMVTOvLy2 , ILMMCommon
Interface ID | IID_ILMVTOvLy2
Input/Output Media Types | MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24, and MEDIASUBTYPE_RGB8.
Filter CLSID | CLSID_LMVTOvLy
Property Page(s) CLSID | CLSID_LMVTOvLyPropertyPage, and CLSID_LMVTOvLyPropertyPage2
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVTOvLy2.dll , DSKernel2.dll
Header | ILMVTOvLy2.h

Platforms

Win32, x64, Mobile

LEAD Video Text Overlay Filter User Interface

You need to unlock the LEAD Video text Overlay Filter to use it in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Video Text Overlay Filter User Interface

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Text Overlay Filter User Interface (2.0)

The Text Overlay Video filter adds static or moving text to videos. It lets you control the font type, font size, border and background. An external XML file can be used to specify text to appear on specific frames. The property page is shown in the figure below:

Text Overlay Settings Page1 tab:

Text Overlay Settings Page2 tab:

The Text Overlay property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Page 1 Table

Control | Description
Enable TextOverlay check box | This check box enables or disables text overlaying. All features will be disabled if this box is cleared, and the video sample will be passed intact.
Font options button | This button displays the font dialog, which can be used to select font options such as font name, font size, font color, etc.
Font BK color button | This button displays the color dialog, which can be used to set the font background color. This option is enabled only when the text outline option is disabled.
Rotate angle spin control | This control is used to determine the text rotation angle in tenths of degrees, i.e. the unit of rotation is 1/10 degree, so to set a 45 degrees angle, use 450.
Enable outline options check box | This check box is used to determine text outlining options. If this button is selected, the following will be true: Outline pen style is enabled. Fill brush style is enabled. Pen color is enabled. Fill color is enabled. Transparency is enabled. Edge Width is enabled. Font Background color is disabled. If this check box is cleared, the following will be true: Outline pen style is disabled. Fill brush style is disabled. Pen color is disabled. Fill color is disabled. Transparency is disabled. Edge width is disabled. Font Background color is enabled.
Outline pen style drop-down list box | Use this to set the text outline style, i.e. Solid pen, dashed pen, etc.
Fill brush style drop-down list box | Use this to set the outlined text fill style i.e. Solid brush, horizontal brush, etc.
Pen color button | Use this button to set the pen color of the text outline.
Fill color button | Use this button to set the fill color of the outlined text. This color is applied to the text body and background if the View background check box is selected.
Transparency check box | Check thus box to make the text body transparent.
Edge width edit box | Use this to set the text outline width
Left spin control | Use this to set the left coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle.
Top spin control | Use this to set the top coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle.
Right spin control | Use this to set the right coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle.
Bottom spin control | Use this to set the bottom coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle.
Auto positioning on view rectangle check box | Check this box to enable auto repositioning of the overlay text on the view rectangle. If selected, the filter will use the current values of X and Y with respect to the view rectangle instead of the whole video stream rectangle

Page 2 Table

Control | Description
Horizontal Alignment drop-down list box | Use this to specify the horizontal alignment of the text to the left or right.
Vertical Alignment drop-down list box | Use this to specify the vertical alignment of the text to the top or bottom.
Horizontal Center check box | Check this to make the text horizontally centered.
Vertical Center check box | Check this to make the text vertically centered.
Overlay text edit box | Set the text to be overlaid over the video stream.
Enable text from file check box | Check this to enable overlay text feeding from an XML file. This option will enable the File name text box, and disable the Overlay text edit box.
File name text box | This box contains the XML or SRT subtitle file name that contains the overlay text and directives.
File name browse (...) button | Displays the Open dialog to select the XML or SRT file to be used as the source for overlay text and directives.
Codepage drop-down list box. | Use this to specify the code page for text encoding in .SRT files. Note: The font selected for text display will effect which code pages are supported.
Left to right radio button | Select this to set the text scrolling direction from left to right. This is enabled only if the overlay text is fed from a file.
Right to left radio button | Select this to set the text scrolling direction from right to left. This is enabled only if the overlay text is fed from a file
Top to bottom radio button | Select to set the text scrolling direction from top to bottom. This is enabled only if the overlay text is fed from a file.
Bottom to top radio button | Select this to set the text scrolling direction from bottom to top. This is enabled only if the overlay text is fed from a file
Enable opacity check box | Check this to enable the overlay text opacity, a ratio of the text painting weight.
Opacity value spin control | Use this to control the overlay text opacity, a ratio of the text painting weight.
View background check box | Check this to show the text background color.
Enable XY Position check box | Check this to enable overlay text positioning. If this box is cleared, the text will be shown based on the chosen text alignment.
X spin control | Use this to set the X coordinate of the overlay text position. The position will be with respect to the view rectangle if the Auto positioning on view rectangle check box was selected, otherwise itll be with respect to the whole video frame.
Y spin control | Use this to set the Y coordinate of the overlay text position. The position will be with respect to the view rectangle if the Auto positioning on view rectangle check box was selected, otherwise itll be with respect to the whole video frame.
Text repeating check box | Check this to enable auto repeating of the overlay text. This will work only if the text is fed from a file.
Word wrap check box | Check this to wrap the text based on the view rectangle width.


ILMVTOvLy2 Interface

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILMVTOvLy2 Interface

This is the interface for the LEAD Video Text Overlay Filter.

Data types

typedef [v1_enum] enum TextAlignmentConstants
{
ALIGN_TOP = 0x01,
ALIGN_LEFT = 0x02,
ALIGN_RIGHT = 0x04,
ALIGN_BOTTOM = 0x08,
ALIGN_VCENTER = 0x10,
ALIGN_HCENTER = 0x20
} TextAlignmentConstants;

Describes possible alignment options.

Constant | Description
ALIGN_TOP | The reference point will be on the top edge of the output window.
ALIGN_LEFT | The reference point will be on the left edge of the output window.
ALIGN_RIGHT | The reference point will be on the right edge of the output window.
ALIGN_BOTTOM | The reference point will be on the bottom edge of the output window.
ALIGN_VCENTER | The reference point will be aligned vertically with the center of the output window.
ALIGN_HCENTER | The reference point will be aligned horizontally with the center of the output window.

typedef [v1_enum] enum ScrollDirectionConstants
{
SCROLL_LEFT_RIGHT = 1,
SCROLL_RIGHT_LEFT = 2,
SCROLL_TOP_BOTTOM = 3,
SCROLL_BOTTOM_TOP = 4
} ScrollDirectionConstants;

Describes possible scrolling options.

Constant | Description
SCROLL_LEFT_RIGHT | Set the scroll direction from left to right.
SCROLL_RIGHT_LEFT | Set the scroll direction from right to left.
SCROLL_TOP_BOTTOM | Set the scroll direction from top to bottom.
SCROLL_BOTTOM_TOP | Set the scroll direction from bottom to top.

typedef [v1_enum] enum PenStyleConstants
{
PENS_SOLID = 0,
PENS_DASH = 1,
PENS_DOT = 2,
PENS_DASHDOT = 3,
PENS_DASHDOTDOT = 4
} PenStyleConstants;

Describes possible pen styles.

Constant | Description
PENS_SOLID | The pen is solid.
PENS_DASH | The pen is dashed.
PENS_DOT | The pen is dotted.
PENS_DASHDOT | The pen has alternating dashes and dots.
PENS_DASHDOTDOT | The pen has alternating dashes and double dots.

typedef [v1_enum] enum BrushStyleConstants
{
BRUSHS_NULL = -1,
BRUSHS_SOLID = 0
BRUSHS_HORIZONTAL = 1,
BRUSHS_VERTICAL = 2,
BRUSHS_FDIAGONAL = 3,
BRUSHS_BDIAGONAL = 4,
BRUSHS_CROSS = 5,
BRUSHS_DIAGCROSS = 6,
} BrushStyleConstants;

Describes possible brush styles.

Constant | Description
BRUSHS_NULL | The brush is hollow.
BRUSHS_SOLID | The brush is solid.
BRUSHS_HORIZONTAL | The brush is a horizontal hatch brush.
BRUSHS_VERTICAL | The brush is a vertical hatch brush.
BRUSHS_FDIAGONAL | The brush is a 45-degree downward, left-to-right hatch brush.
BRUSHS_BDIAGONAL | The brush is a 45-degree upward, left-to-right hatch brush.
BRUSHS_CROSS | The brush is a horizontal and vertical cross-hatch brush.
BRUSHS_DIAGCROSS | The brush is a 45-degree crosshatch brush.

typedef [v1_enum] enum RotationCenterConstants

{

ROTATIONCENTER_LEFT_TOP = 0,

ROTATIONCENTER_RIGHT_TOP = 1,

ROTATIONCENTER_CENTER = 2,

ROTATIONCENTER_AUTO = 3,

} RotationCenterConstants;

Describes possible rotation center options.

Constant | Description
ROTATIONCENTER_LEFT_TOP | Set the rotation center to the left-top point of the text.
ROTATIONCENTER_RIGHT_TOP | Set the center of rotation to the right-top point of the text.
ROTATIONCENTER_CENTER | Set the center of rotation to the center point of the text.
ROTATIONCENTER_AUTO | Set the center of rotation, depending on the alignment. Possible values are:
 | Alignment value | Rotation state
 | ALIGN_LEFT | The left top is the center of rotation.
 | ALIGN_RIGHT | The right top is center of rotation.
 | ALIGN_TOP and ALIGN_HCENTER | The top and the horizontal center is the center of rotation.
 | ALIGN_BOTTOM and ALIGN_HCENTER | The bottom and the horizontal center is the center of rotation.
 | ALIGN_VCENTER and ALIGN_HCENTER | The vertical center and the horizontal center is the center of rotation.

Interface Properties

Type

Name

Description

VARIANT_BOOL

EnableTextOverLay

Enables or disables text overlaying. If set to VARIANT_FALSE, the filter will pass the video samples intact.

BSTR

OverlayText

Sets or gets the text to be overlaid over the video stream. The string can be wrapped by setting the WordWrap property to VARIANT_TRUE. The filter accepts the new line sequence \n and translates it to a new line.

BSTR

FontName

Sets or gets the font name. Use one of the installed fonts names. You can use EnumFonts API to enumerate the installed fonts.

long

FontSize

Sets or gets the font size. Possible values range from 1 to 2000. For any value below the lower limit the default value of 10 will be used. For any value beyond the upper limit, the maximum value of 2000 will be used.

long

FontColor

Sets or gets the font foreground color.

long

FontBKColor

Sets or gets the font background color.

VARIANT_BOOL

Bold

Enables or disables the bold font style.

VARIANT_BOOL

Italic

Enables or disables the italic font style.

VARIANT_BOOL

UnderLine

Enables or disables the underline font style.

VARIANT_BOOL

StrikeOut

Enables or disables the strike out font effect.

Long

RotationAngle

Sets or gets the rotation angle for the overlay text. The values range from 0 to 3600. For a multi-line text, each line is rotated independently.

VARIANT_BOOL

EnableXYPosition

Enables or disables text positioning. If this is set to VARIANT_TRUE, then the TextAlignment property will have no effect.

Long

XPos

Sets or gets the text X position.

Long

YPos

Sets or gets the text Y position.

VARIANT_BOOL

EnableTextFromFile

Enables or disables getting the overlay text from a file. To use the OverlayText property, set this property to VARIANT_FALSE. If this property is set to VARIANT_TRUE, then the TextFileName property must contain a valid file name.

BSTR

TextFileName

Sets or gets the LEADTOOLS XML file name that contains the overlay text with special tags.

See the Text Overlay XML File Format for more information on valid tags and how to use them.

TextAlignmentConstants

TextAlignment

Sets or gets the text alignment with respect to the output window. Possible values are one or more (ORed together) of the following:

ALIGN_TOP,
ALIGN_LEFT,
ALIGN_RIGHT,
ALIGN_BOTTOM,
ALIGN_VCENTER, or
ALIGN_HCENTER

VARIANT_BOOL

EnableOutline

Enables or disables the text outline option.

Long

OutlineWidth

Sets or gets the text outline pen width. Valid values range from 1 to 20.

Long

OutlinePenColor

Sets or gets the outline pen color. This is a COLORREF value. You can use the RGB macro to form a COLORREF value from an RGB triple.

Long

OutlineBrushColor

Sets or gets the text outline brush color. The brush is applied to the text body. This is a COLORREF value. You can use the RGB macro to form a COLORREF value from an RGB triple.

VARIANT_BOOL

TransparentOutline

Enables or disables the text outline transparency option. If this is set to VARIANT_TRUE, the area inside the text outline becomes transparent.

PenStyleConstants

PenStyle

Sets or gets the outline text pen style. Possible values are:

PENS_SOLID,
PENS_DASH,
PENS_DOT,
PENS_DASHDOT, or
PENS_DASHDOTDOT.

BrushStyleConstants

BrushStyle

Sets or gets the outline text brush style. The brush is applied to the text body. Possible values are:

BRUSHS_NULL,
BRUSHS_SOLID,
BRUSHS_HORIZONTAL,
BRUSHS_VERTICAL,
BRUSHS_FDIAGONAL,
BRUSHS_BDIAGONAL,
BRUSHS_CROSS, or
BRUSHS_DIAGCROSS.

ScrollDirectionConstants

ScrollDirection

Sets or gets the text scrolling direction. This is valid and has effect only if the EnableTextFromFile property is set to VARIANT_TRUE and the XML file contains the scrolling option. Possible values are:

SCROLL_LEFT_RIGHT,
SCROLL_RIGHT_LEFT,
SCROLL_TOP_BOTTOM, or
SCROLL_BOTTOM_TOP.

VARIANT_BOOL

TextRepeating

Enables or disables the text repeating option. It will cause the text sequence to repeat infinitely. This is valid and has effect only if the EnableTextFromFile property is true.

VARIANT_BOOL

WordWrap

Enables or disables the word wrap option. This is valid and has effect only if the EnableTextFromFile property is true.

VARIANT_BOOL

EnableOpacity

Enables or disables the opacity option.

Long

Opacity

Sets or gets the desired opacity percentage.

VARIANT_BOOL

ViewBackground

Enables or disables viewing the text background.

Long

ViewRectLeft

Sets or gets the left coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle. The default value is zero.

Long

ViewRectRight

Sets or gets the right coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle. The default value is the video stream width.

Long

ViewRectTop

Sets or gets the top (upper) coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle. The default value is zero.

Long

ViewRectBottom

Sets or gets the bottom (lower) coordinate, in pixels, of the view rectangle. This value is with respect to the video stream dimensions. The overlay text will be displayed within this view rectangle. The default value is the video stream height.

VARIANT_BOOL

AutoReposToViewRect

Enables or disables auto repositioning of the overlay text to the view rectangle. If set to VARIANT_TRUE, the filter will use the current values of XPos and YPos with respect to the view rectangle instead of the whole video stream rectangle.

long

AvgCharWidth

Get the average width, in pixels, of one character according to the current font settings.

long

MaxCharWidth

Get the maximum possible width, in pixels, of one character according to the current font settings.

long

CharHeight

Get the height, in pixels, of one character according to the current font settings.

BSTR

CurrentText

This is an internal property. Do not attempt to use it.

RotationCenterConstants

RotationCenter

Determines the text rotation center. Possible values are:

ROTATIONCENTER_LEFT_TOP

ROTATIONCENTER_RIGHT_TOP

ROTATIONCENTER_CENTER

ROTATIONCENTER_AUTO

VARIANT_BOOL

TextAlwaysVisible

Enables or disables the option that handle the text visibility when the text rotated outside the view area.. This is valid only if the EnableXYPosition is disabled.

VARIANT_BOOL

IgnoreHTMLTags

Ignores the HTML tags from the subtitle file.

VARIANT_BOOL

IsLEADInputPinConnected

Read only. Gets the filters input pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.

VARIANT_BOOL

IsLEADOutputPinConnected

Read only. Gets the filters output pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.

long

InWidth

Read only. Gets the input video stream width in pixels. Should contain the same value as the OutWidth property.

long

InHeight

Read only. Gets the input video stream height in pixels. Should contain the same value as the OutHeight property.

long

OutWidth

Read only. Gets the output video stream width in pixels. Should contain the same value as the InWidth property.

long

OutHeight

Read only. Gets the output video stream height in pixels. Should contain the same value as the InHeight property.

long

InBits

Read only. Gets the input video stream bits per pixel. Should contain the same value as the OutBits property.

long

OutBits

Read only. Gets the input video stream bits per pixel. Should contain the same value as the InBits property.

long

CodePage

Numeric value for the code page setting that determines the text encoding in .SRT subtitle files.


LEAD Video Unsharp Mask Filter (2.0)

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Video Unsharp Mask Filter (2.0)

The unsharp mask filter is a DirectShow transform filter that performs a sharpening effect on a video stream. The filter exposes its functionality through both user and programming interfaces. The processing time of the filter is high, so the filter will be slow, and low frame rate is expected. All the functionality in the filters property page is available via the programming interface of the filter.

Filter Interface | ILMVUshrpMsk , ILMMCommon
Interface ID | IID_ILMVUshrpMsk
Input/Output Media Types | MEDIATYPE_Video and the following subtypes: MEDIASUBTYPE_RGB24 This filter does not change the passing media types.
Filter CLSID | CLSID_LMVUshrpMsk
Property Page CLSID | CLSID_LMVUshrpMskPropertyPage
Filter category | CLSID_ltmmVideoProcessorCategory
Executable | LMVUsMsk2.dll, DSKernel2.dll
Header | ILMVUsMsk2.h

Platforms

Win32, x64

LEAD Video Unsharp Mask Filter User Interface


LEAD Video Unsharp Mask Filter User Interface (2.0)

The Unsharp Mask Video filter enhances edges and improves the quality of movies that look "washed out". The Unsharp Mask Video Effect produces better results than the Edge Enhance Video Effect, but is slower. The property page is shown in the figure below:

The Unsharp Mask property page provides a use interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Enables/Disables the effect.

Amount slider

Gets or sets the amount of sharpening. Possible values range from 0 to 500. For any value below the lower limit, a minimum value of 0 will be used. For any value beyond the upper limit, a maximum value of 500 will be used. The default value is 250.

Radius slider

Gets or sets the radius value. This value indicates the size of the neighborhood used for blurring each pixel of the video sample.

Possible values range from 1 to 100. For any value below the lower limit, a minimum value of 1 will be used. For any value beyond the upper limit, the maximum value of 100 will be used. The default value is 1.

Threshold slider

Gets or sets the threshold value. This value indicates the threshold for modifying the original value of the pixel. If the difference in the original pixel value and the blurred pixel value is greater than the threshold value, the original pixel value will be modified. Possible values range from 0 to 255. For any value below the lower limit, a minimum value of 0 will be used. For any value beyond the upper limit, the maximum value of 255 will be used. The default value is 0.


ILMVUshrpMsk Interface

ILMVUshrpMsk Interface

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables the Unsharp Mask effect. If set to VARIANT_FALSE, the filter will pass the video samples intact.

VARIANT_BOOL

UseDefaultAutoRadius

Indicates whether to use the default value of the Radius property. If set to VARIANT_TRUE, the value of the Radius property is ignored.

VARIANT_BOOL

UseDefaultThreshold

Indicates whether to use the default value of the Threshold property. If set to VARIANT_TRUE, the value of the Threshold property is ignored.

Long

UnsharpMask

Gets or sets the amount of sharpening. Possible values range from 0 to 500. For any value below the lower limit, a minimum value of 0 will be used. For any value beyond the upper limit, a maximum value of 500 will be used. The default value is 250.

Long

Radius

Gets or sets the radius value. This value indicates the size of the neighborhood used for blurring each pixel of the video sample.

Possible values range from 1 to 100. For any value below the lower limit, a minimum value of 1 will be used. For any value beyond the upper limit, the maximum value of 100 will be used. The default value is 1.

Long

Threshold

Gets or sets the threshold value. This value indicates the threshold for modifying the original value of the pixel. If the difference in the original pixel value and the blurred pixel value is greater than the threshold value, the original pixel value will be modified. Possible values range from 0 to 255. For any value below the lower limit, a minimum value of 0 will be used. For any value beyond the upper limit, the maximum value of 255 will be used. The default value is 0.

VARIANT_BOOL

IsLEADInputPinConnected

Read only. Gets the filter’s input pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.

VARIANT_BOOL

IsLEADOutputPinConnected

Read only. Gets the filter’s output pin connection state. VARIANT_TRUE if connected, and VARIANT_FALSE otherwise.

long

InWidth

Read only. Gets the input video stream width in pixels. Should hold the same value as the OutWidth property.

long

InHeight

Read only. Gets the input video stream height in pixels. Should hold the same value as the OutHeight property.

long

OutWidth

Read only. Gets the output video stream width in pixels. Should hold the same value as the InWidth property"x-text-underline: normal; /*begin!kadov{{*/ text-decoration: underline; /*}}end!kadov*/ ">.

long

OutHeight

Read only. Gets the output video stream height in pixels. Should hold the same value as the InHeight property.

long

InBits

Read only. Gets the input video stream bits per pixel. Should hold the same value as the OutBits property.

long

OutBits

Read only; get the input video stream bits per pixel. Should hold the same value as the InBits property.


LEAD Audio Converter Filter

LEAD Audio Converter Filter

The LEAD Audio Converter filter allows you to change the frequency of the audio stream. This filter is especially useful if you need to convert a file to a file format that supports a limited range of audio frequencies. For example, FLV files can take audio only with these frequencies: 5500Hz, 11025Hz, 22050Hz and 4410Hz

If you try to convert a file whose audio frequency not listed above (eg 32 or 48KHz), then you can use this filter to convert the audio to one of the allowed frequencies before compressing it.

Filter Interfaces | ILMAConverter, ILMMCommon
Interface IDs | IID_ILMAConverter
Input/Output Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMAConverter
Property Page CLSID | None.
Filter category | CLSID_LMAConverterPropPage
Executable | LMAConv.dll
Header | ILMAConverter.h

Platforms

Win32, x64


LEAD Audio Converter Fillter User Interface

LEAD Audio Converter Filter User Interface

The Audio Converter Filter allows you to specify a particular output frequency (also knows as ‘audio sampling rate’). The following figure shows the property page:

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel.

The following table shows the controls and their descriptions:

Control | Description
Output Sample Rate | Enter the desired output sample rate, in samples/sec or Hz.

LEAD Audio Converter Filter

ILMAConverter Interface


ILMAConverter Interface

ILMAConverter Interface

Interface Properties:

Type | Name | Description
long | OutputSampleRate | The desired output sample rate, in samples/sec (Hz). For example, if you desire 44.1 KHz, set this value to 44100.The default value is 16000 (equivalent to 16KHz). The allowable rates are between 100 and 200000 (inclusive). You will get an E_INVALIDARG error if you set a value outside this range.


LEAD Audio Callback Filter

LEAD Audio Callback Filter

The LEAD Audio Callback filter, is an in-place filter that will call a method on a user callback interface each time it receives a sample. You can manipulate the audio data according to your needs before returning from the callback procedure.

Filter Interfaces | ILMACallback, ILMAUserCallback, ILMAUserCallback2, ILMMCommon
Interface IDs | IID_ILMACallback IID_ILMAUserCallback IID_ILMAUserCallback2
Input/Output Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMACallback
Property Page CLSID | None.
Filter category | CLSID_ltmmAudioProcessorCategory
Executable | LMACalBk.dll
Header | ILMACallback.h

Platforms

Win32, x64


ILMACallback Interface

ILMACallback Interface

Interface Properties:

Type

Name

Description

IUnknown

CallbackObj2

(Write-only) Sets the callback object pointer.

If not NULL, the CallbackProc method of this interface will be called with every audio buffer.

Set to NULL (or to "Nothing" in VB) if you do not wish to receive notifications anymore. (For example, before you delete (release) the callback object interface).

There are two types of callbacks you can set:
- ILMAUserCallback uses variants, while
- ILMAUserCallback2 uses a pointer to the data.

VB 6.0 or earlier users should use a ILMAUserCallback interface, while C# and VB.NET users should use a ILMAUserCallback2 interface.

C/C++ users can use either interface.

VARIANT_BOOL

CallInSameThread

Enables or disables the calling of the CallbackProc notifications in the same thread that set the ReceiveProcObj property. The default value is VARIANT_TRUE.

Possible values are:

Value

Meaning

VARIANT_TRUE

Call the notifications in the same thread that set the callback. This reduces the performance and requires the application to process messages, otherwise the callback will not get called. It is the default and is required for platforms that have problem with multithreading. VB 6.0 and dotnet applications should use this mode.

VARIANT_FALSE

Call the notifications in any thread of the process. Use this setting for best performance in platforms that can handle this. This is the recommended mode for C/C++ applications.

double

CurrentPosition

[read-only] Use this property to get the current position (in seconds) of the current sample passed to the callback. It is recommended you call this property to get the current position from inside CallbackProc rather than trying to get the current position from the graph or LTMM object.


ILMAUserCallback Interface

ILMAUserCallback Interface

This is a user callback interface that should be implemented to receive the audio buffers. You register the callback by setting the ILMACallback::CallbackObj or ILMACallback::CallbackObj2 properties. This interface has one method, which will be called by the LEAD Audio Callback Filter whenever the filter receives an audio buffer.

DirectShow determines the duration of the audio buffer. If you use the LEADTOOLS Multimedia toolkit, you can change the size of the audio buffers using the AudioBufferSize property.

You should use this interface from VB (6 or earlier) or other programming languages that cannot deal with pointers. This interface will not work well in .NET. For .NET programming, you should use the ILMAUserCallback2 interface instead.

Interface Methods:

HRESULT CallbackProc (VARIANT* pData, long lDataSize, long lBitsPerSample, long lChannels, long lSamplesPerSec, long lAvgBytesPerSec);

This function will be called each time an audio sample is received by the filter.

Parameters

pData | Pointer to the sample data. The sample data is an array of unsigned bytes (8-bit) or signed short (16-bit) values.
lDataSize | The number of elements in pData. If lBitsPerSample is 8, then this also represents the size (in bytes) of the buffer pointed to by pData. If lBitsPerSample is 16, then the size of the pData buffer is lDataCount * 2.
lBitsPerSample | Number of bits per sample of mono data. This can be 8 or 16. This determines the format of the data pointed to by pData.
lChannels | Number of channels (i.e. 1=mono, 2=stereo...)
lSamplesPerSec | Sample rate, in samples per second.
lAvgBytesPerSec | Average bandwidth in bytes per second. It should be equal to lSamplesPerSec * lChannels * (lBitsPerSample / 8).

Returns

AUDCALBK_ERR_OK | Successful, pass this sample data array downstream.
AUDCALBK_ERR_DROP | Drop this sample; the sample will not be delivered downstream.
AUDCALBK_ERR_DELIVERLASTSAMPLE | Repeat the last successfully delivered sample.
Other error codes | Any other error code will be returned by the filter as is and the data will not be passed downstream.

Comments

Format of audio data:

The general format of the audio data (lChannels) is as follows:

Sample 0

Channel 0

Channel 1

-

Channel lChannels - 1

In this case,

pData(0) is Sample 0, Channel 0
pData(1) is Sample 0, Channel 1

pData(lChannels - 1) is Sample 0, Channel lChannels -1
pData(lChannels) is Sample 1, Channel 0
pData(lChannels + 1) is Sample 1, Channel 1

The format for mono data is simple, because there is only one channel. In this case, every value in the array is one sample:

pData(0) is Sample 0
pData(1) is Sample 1

The format for stereo data is still simple: there are two values per sample (one for left channel and the other for right channel):

pData(0) is Sample 0, Left channel
pData(1) is Sample 0, Right channel
pData(2) is Sample 1, Left channel
pData(3) is Sample 1, Right channel

The format of the value is different depending on whether lBitsPerChannel is 8 or 16.

Format of 8-bit audio data:

The values in the array are unsigned and between 0 and 255. The real audio value will be obtained by subtracting 128 from the array value and should have a value between -128 and 127. If you want to change the value, you must remember to add 128 before putting back the data.

Here is some Visual Basic code that doubles the intensity of the sound for pData(i):

Dim val As Long - use a signed data type
val = pData(i) - 128 - convert pData(i) to long. val is now the audio value, in the 0..255 range
val = val * 2 - double the sound intensity

' convert the value to signed 8-bit
val = pData(i) - 128

' double the audio value
val = val * 2

' clip the output to -128..127
If val > 127 Then
val = 127
ElseIf val < -128 Then
val = -128
End If

' write the data out, adding back 128
pData(i) = val + 128

Note how the real audio value was clipped to the -128 ..127 range before adding 128. This is important, otherwise distortions are introduced.

Format of 16-bit data:

The values in the array are signed and between -32768 and 32767. They contain the real audio value and it is not necessary to do the conversions like for the 8-bit data.

Here is some Visual Basic code that doubles the intensity of the sound for pData(i):

- use a signed data type. Use long (32-bit in VB)
- instead of Integer (16-bit in VB) to avoid overflows when multiplying by 2
Dim val As Long

val = pData(i)
val = val * 2

' clip the output to --32768..32767
If val > 32767 Then
val = 32767
ElseIf (val < -32768) Then
val = -32768
End If

pData(i) = val


ILMAUserCallback2 Interface

ILMAUserCallback2 Interface

This is a user callback interface that should be implemented to receive the audio buffers. You register the callback by setting the ILMACallback::CallbackObj2 property. This interface has one method, which will be called by the LEAD Audio Callback Filter whenever the filter receives an audio buffer.

DirectShow determines the duration of the audio buffer. If you use the LEADTOOLS Multimedia toolkit, you can change the size of the audio buffers using the AudioBufferSize property.

This interface should be used for C++, .NET or other programming languages that can cast a long to a pointer. See below for .NET examples (C# and VB.NET) of a class implementing this interface.

Interface Methods:

HRESULT CallbackProc (long pData, long lDataSize, long lBitsPerSample, long lChannels, long lSamplesPerSec, long lAvgBytesPerSec);

This function will be called each time an audio sample is received by the filter.

Parameters

pData | Pointer to the sample data cast as a 32-bit long. The sample data is an array of unsigned bytes (8-bit) or signed short (16-bit) values. This value should be cast to a pointer to unsigned byte or signed short, depending on the value of lBitsPerSample.
lDataSize | The number of elements in pData. If lBitsPerSample is 8, then this also represents the size (in bytes) of the buffer pointed to by pData. If lBitsPerSample is 16, then the size of the pData buffer is lDataCount * 2.
lBitsPerSample | Number of bits per sample of mono data. This can be 8 or 16. This determines the format of the data pointed to by pData.
lChannels | Number of channels (i.e. 1=mono, 2=stereo...)
lSamplesPerSec | Sample rate, in samples per second.
lAvgBytesPerSec | Average bandwidth in bytes per second. It should be equal to lSamplesPerSec * lChannels * (lBitsPerSample / 8).

Returns

AUDCALBK_ERR_OK | Successful, pass this sample data array downstream.
AUDCALBK_ERR_DROP | Drop this sample; the sample will not be delivered downstream.
AUDCALBK_ERR_DELIVERLASTSAMPLE | Repeat the last successfully delivered sample.
Other error codes | Any other error code will be returned by the filter as is and the data will not be passed downstream.

Comments

Format of audio data:

The general format of the audio data (lChannels) is as follows:

Sample 0

Channel 0

Channel 1

-

Channel lChannels - 1

In this case,

pData(0) is Sample 0, Channel 0
pData(1) is Sample 0, Channel 1

pData(lChannels - 1) is Sample 0, Channel lChannels -1
pData(lChannels) is Sample 1, Channel 0
pData(lChannels + 1) is Sample 1, Channel 1

The format for mono data is simple, because there is only one channel. In this case, every value in the array is one sample:

pData(0) is Sample 0
pData(1) is Sample 1

The format for stereo data is still simple: there are two values per sample (one for left channel and the other for right channel):

pData(0) is Sample 0, Left channel
pData(1) is Sample 0, Right channel
pData(2) is Sample 1, Left channel
pData(3) is Sample 1, Right channel

The format of the value is different depending on whether lBitsPerChannel is 8 or 16.

Format of 8-bit audio data:

The values in the array are unsigned and between 0 and 255. The real audio value will be obtained by subtracting 128 from the array value and should have a value between -128 and 127. If you want to change the value, you must remember to add 128 before putting back the data.

Format of 16-bit data:

The values in the array are signed and between -32768 and 32767. They contain the real audio value and it is not necessary to do the conversions like for the 8-bit data.

Examples

Example1: Fast C# code (using unsafe code)

This C# code silences the sound track by setting all the sound values to 0. Note that this sample uses pointers, which means your application must be compiled as using unsafe code. For slower, safe code, look at the second example, which is written in VB.NET.

private void Form1_Load(object
 sender, EventArgs e)
{
string file = @"c:\myfile.avi";

// Insert Audio Callback Filter
LTMMLib.ltmmProcessor proc = GetAudioProcessor("LEAD
 Audio Callback Filter");
playControl.SelectedAudioProcessors.Add(proc, 0);

// Hook callback.
LMACallbackLib.LMACallback audioCallback = (LMACallbackLib.LMACallback)playControl.GetSubObject((int)LTMMLib.ltmmPlay_Object.ltmmPlay_Object_SelAudioProcessor);
audioCallback.CallbackObj2 = new AudioCallback(audioCallback);

// Play it.
playControl.sourcefile = file;
}

public class AudioCallback : LMACallbackLib.ILMAUserCallback2
{
unsafe public void CallbackProc(int pData, int lDataSize,
 int lBitsPerSample, int lChannels, int lSamplesPerSec, int lAvgBytesPerSec)
{
IntPtr ptrData = new IntPtr(pData);
int i;
if (lBitsPerPixel == 16)
{
short* ptrData16
 = (short*)ptrData.ToPointer();

for(i = 0; i <
 lDataSize; i++)
ptrData16[i]
 = 0;
}
else
{
byte* ptrData8 =
 (byte*)ptrData.ToPointer();

for(i = 0; i <
 lDataSize; i++)
ptrData8[i]
 = 0;
}

' If you need to return a HRESULT other
 than AUDCALBK_ERR_OK, then you need to throw an exception
' throw new ReturnValueException(LMACallbackLib.AudCalBkErrConstants.AUDCALBK_ERR_XXX);
}
}

Example2: VB.NET code (slower, but using safe code)

This VB.NET code silences the sound track by setting all the sound values to 0. Note that this sample is safe, does not use pointers, but is slower than the unsafe code above.

Public Class VBAudioCallback : Implements LMACallbackLib.ILMAUserCallback2
   Public Sub New()
   End Sub

   Sub CallbackProc(ByVal pData As Integer, ByVal lDataSize As Integer, ByVal lBitsPerSample As Integer, ByVal lChannels As Integer, ByVal lSamplesPerSec As Integer, ByVal lAvgBytesPerSec As Integer) Implements LMACallbackLib.ILMAUserCallback2.CallbackProc
      Dim ptrData As IntPtr = New IntPtr(pData)
      Dim i As Integer
      ' copy the data to a managed array, since VB does not support pointers.
      If lBitsPerSample = 16 Then
         Dim ptrData16(lDataSize) As Short
         ' Copy data from pData into ptrData16
         System.Runtime.InteropServices.Marshal.Copy(ptrData, ptrData16, 0, lDataSize)
         ' set the data to 0
         For i = 0 To lDataSize - 1
            ptrData16(i) = 0
         Next
         ' copy the data back into ptrData
         System.Runtime.InteropServices.Marshal.Copy(ptrData16, 0, ptrData, lDataSize)
      Else
         Dim ptrData8(lDataSize) As Byte
         ' Copy data from pData into ptrData8
         System.Runtime.InteropServices.Marshal.Copy(ptrData, ptrData8, 0, lDataSize)
         ' set the data to 0
         For i = 0 To lDataSize - 1
            ptrData8(i) = 0
         Next
         ' copy the data back into ptrData
         System.Runtime.InteropServices.Marshal.Copy(ptrData8, 0, ptrData, lDataSize)
      End If

   End Sub
End Class


LEAD Audio Chorus Filter

LEAD Audio Chorus Filter

The LEAD Audio Chorus filter can be used to add a chorus effect. The chorus effect makes one instrument sound like many instruments are being played. It adds some thickness to the sound.

Filter Interfaces

ILMAChorus, ILMAChorusDisp , ILMMCommon

Interface ID

IID_ILMAChorus, IID_ILMAChorusDisp

Input pin Media Types

MEDIATYPE_Audio

Filter CLSID

CLSID_LMAChorus

Property Page CLSID

CLSID_LMAChorusPropertyPage

Executable

LMAChrs.dll

Filter category

CLSID_ltmmAudioProcessorCategory

Header

ILMAChorus.h

Platforms

Win32, x64

LEAD Audio Chorus User Interface


LEAD Audio Chorus Filter User Interface

LEAD Audio Chorus FilterUser Interface

The Chorus filter creates several layers of the same sound, adding depth and resonance. The property page is shown in the figure below:

The chorus property page provides a user interface for changing the filter's attributes.

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. Select the Enable check box to enable the entire chorus effect. Select the Combine check box to preserve the difference between wet and dry mixes. The following table shows the controls and their descriptions:

Control | Description
The Enable check box | Enables/Disables the effect.
The Combine Wet/Dry mix check box | If selected, preserves the difference between wet and dry mixes.
The Wet mix % slider | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
The Dry mix % slider | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
The Feedback % slider | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
The Delay slider | Controls the level of the chorus effect. Larger values result in greater delay times.
The Stereo slider | Stereo represents the phase difference between the left and right channel.
The Defaults button | Restores the default values for the properties.
The Set as defaults button | Sets the current properties values as defaults.


ILMAChorus Interface

ILMAChorus Interface

Data types:

CHORUS_ATTRIBUTES

typedef struct
{
long lDryMix;
long lWetMix;
long lDelay;
long lFeedback;
long lStereo;
BOOL bEnabled;
long lDDryMix;
long lDWetMix;
long lDDelay;
long lDFeedback;
long lDStereo;
BOOL bDEnabled;
} CHORUS_ATTRIBUTES;

Describes chorus attributes.

Member | Description
lDryMix | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
lWetMix | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
lDelay | Controls the level of the chorus effect. Larger values result in greater delay times.
lFeedback | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
lStereo | Stereo represents the phase difference between the left and right channel.
bEnabled | Indicates whether the chorus effect is enabled (TRUE) or not (FALSE).
lDDryMix | Default Dry Mix value. Original default value is 70.
lDWetMix | Default Wet Mix value. Original default value is 50.
LDDelay | Default delay value. Original default value is 500.
LDFeedback | Default feedback value Original default value is 25.
lDStereo | Default stereo value Original default value is 90.
bDEnabled | Default for bEnabled value Original default value is TRUE.

Interface methods:

HRESULT GetNumChannels (int * pnChannels)

Parameters

pnChannels

valid pointer to an integer variable to be updated with the number of channels.

Description

Gets number of channels per sample of the current connected media format.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT SetChorusAttributes(CHORUS_ATTRIBUTES ChorusAttributes)

Parameters

ChorusAttributes

CHORUS_ATTRIBUTES structure that contains the attributes to set.

Description

Sets the properties for the chorus effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetChorusAttributes(CHORUS_ATTRIBUTES* pChorusAttributes)

Parameters

pChorusAttributes

valid pointer to a CHORUS_ATTRIBUTES structure to be updated with the current chorus attributes.

Description

Retrieves the current chorus attributes.

Returns

S_OK if successful, S_FALSE otherwise.


ILMAChorusDisp Interface

ILMAChorusDisp Interface

Interface Properties:

Type | Name | Description
long | DryMix | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
long | WetMix | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
long | Delay | Controls the level of the chorus effect. Larger values result in greater delay times.
long | Feedback | Feedback of the repeated signal, by default from -90 to 90. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
long | Stereo | Stereo represents the phase difference between the left and right channel.
BOOL | Enabled | Indicates whether the chorus effect is enabled (TRUE) or not (FALSE).
long | DefaultDryMix | Default Dry Mix value. Original default value is 70.
long | DefaultWetMix | Default Wet Mix value. Original default value is 70.
long | DefaultDelay | Default delay value. Original default value is 500.
long | DefaultFeedback | Default feedback value. Original default value is 25.
long | DefaultStereo | Default stereo value. Original default value is 50.
BOOL | DefaultEnabled | Default for Enabled value. Original default value is TRUE.
long | NumChannels | Number of channels per sample of the current media format.


LEAD Audio Detection Filter (2.0)

LEAD Audio Detection Filter (2.0)

This filter determines whether there is sound or not. The filter uses a silence threshold: signal levels above this threshold are considered sound and levels below this threshold are considered silence.

The filter passes the sound/silence notifications through a user callback.

The filter exposes its functionality through both user and programming interfaces.

Filter Interface(s) | ILMADet, ILMADetUserCallback , ILMMCommon
Interface ID | IID_ILMADet IID_ILMADetUserCallback
Input/Output Media Types | MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_PCM MEDIASUBTYPE_WAVE
Filter CLSID | CLSID_LMADet
Property Page(s) CLSID | CLSID_LMADetPropertyPage
Filter category | CLSID_ltmmAudioProcessorCategory
Executable | LMADet2.dll, DSKernel2.dll
Header | ILMADET2.h

Platforms

Win32, x64

LEAD Audio Detection Filter User Interface

You need to unlock the LEAD Audio Detection Filter (2.0) to use it in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Audio Detection Filter User Interface (2.0)

LEAD Audio Detection Filter User Interface (2.0)

The Audio Detection property page provides a user interface for changing the filter's attributes. The property page is shown in the following figure:

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control

Description

Enable check box

Determines whether the audio detection filter is enabled (checked) or not (cleared). When the filter is enabled, the filter will fire callbacks notifications (for silence and sound).

Min Silence Time slider

The minimum duration of silence (in milliseconds) needed for a lack of sound to be considered silence. Silences shorter than the Minimum Silence Time will be considered part of the sound. You want to set this value so short pauses do not trigger false silences. Most conversations contain short silences while the people talking draw their breath or pause while they are thinking.

Threshold slider

The signal level below which the signal is considered silence (all levels above this value are considered sound, and all levels below this value are considered silence). You set this value to the maximum volume of the background noise. This will depend on the microphones (some microphones are noisier than others).

You would typically do something like this:

a. Speak into the microphone and notice the lowest level reached by the green bar for sound you would want to record.

b. Be silent and notice if there is any movement of the green bars.

After that, you would set the threshold between the limits noticed in the steps above.

Interval edit and spin controls

The time interval at which the filter will check the stream for audio data. In most cases, this should be as small as possible. If the interval is small enough, then every sample will be checked for sound data. When it is not necessary to check every sample for sound, the user can use a larger value; however, the length of the interval depends on the event the user wants to detect, in any case, the interval should not exceed the length of the event to be detected.

Delay edit and spin controls

The amount of time the filter waits before it starts checking the stream for sound data (sound detection). This is the time between pressing the “Start Detection” button (or starting streaming if the “Auto Start Detection” is checked) and the time at which the filter actually starts checking for sound data. The Delay may be beneficial when hardware components must be initialized. Sound detection can be delayed until the initialization process has completed.

Start Detection button

Starts (or stops) sound detection. If the Delay property has been set, sound detection will not start until the delay period has elapsed.

Auto Start Detection check box

If checked, sound detection will begin immediately after the filter is set in the running state (streaming started). If the Delay property has been set, sound detection will not start until the delay period has elapsed.

Left and Right level indicators

The “Left” and “Right” indicators show the power level of the audio samples currently passing through the filter.

LEAD Audio Detection Filter

ILMADet Interface

ILMADetUserCallback Interface


ILMADet Interface

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

oftware component which decompresses audio. It must be designed to work with ACM or DirectShow . Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams.

Available in LEADTOOLS Multimedia toolkits.

ILMADet Interface

This is the interface for the LEAD Audio Detection Filter (2.0).

Interface Properties:

Type

Name

Description

ILMADetUserCallback

CallbackObj

(write-only) Set the callback object pointer.

If not NULL, the CallbackProc method of this interface will be called to report audio detection events.

Set to NULL (or to "Nothing" in VB) if you do not wish to receive notifications anymore. (For example, before you delete the callback object interface).

VARIANT_BOOL

Enable

Enable/Disable audio detection. Set to TRUE to enable audio detection and receive event notifications.

long

Threshold

The threshold (in dB) used to detect sound. The allowed range is –40 to 0.

–40 is equivalent to absolute silence and 0 is the loudest possible sound. All sounds below this threshold are considered silence.

You set this depending on your microphone. Usually, a value between–38 and –30 is used.

long

MinSilenceTime

The minimum length of silence periods (in milliseconds). Silences shorter than MinSilenceTime will be considered part of the sound. You want to set this value so short pauses do not trigger false silences. Most conversations contain short silences while the people talking draw their breath or pause while they are thinking.

long

LeftLevel

(read-only) The intensity (power) of the signal in the left channel (in dB).

Note: If the audio stream is mono, the values of LeftLevel and RightLevel are the same.

long

RightLevel

(read-only) The intensity (power) of the signal in the right channel (in dB).

Note: If the audio stream is mono, the values of LeftLevel and RightLevel are the same.

long

Interval

The time intervals at which the filter will check the stream for audio data. This value is in milliseconds.

long

Delay

The amount of time the filter waits before it starts checking the stream for sound data (sound detection). This value is in milliseconds.

VARIANT_BOOL

AutoStart

Flag that indicates whether to start sound detection when streaming starts or not. Set this to VARIANT_TRUE to have the filter start sound detection when streaming starts. Set this to VARIANT_FALSE to start sound detection manually. Please note that if the Delay property has been set, sound detection will not begin, regardless of the value of AutoStart, until the delay period has elapsed.

AudDetStateConstants

State

(read only) Indicates the state of audio detection. Possible values are:

AUDDET_STATE_RUNNING: The filter is processing streaming data and the sound detection process has started.

AUDDET_STATE_STOPPED: The filter is not processing streaming data and the sound detection process is not running.

Interface Methods:

HRESULT StartDetection();

Returns

S_OK | The method succeeded.
VFW_E_NOT_CONNECTED | An error has occurred, either the input or output pin is not connected.
VFW_E_NOT_RUNNING | The filter in not in the running state.

Comments

This method starts sound detection manually. If the Delay property has been set, sound detection will not begin until the delay period has elapsed.

To have the filter automatically start sound detection when streaming starts, set the AutoStart property to VARIANT_TRUE and do not call this method. Again, even if AutoStart is set to VARIANT_TRUE, if the Delay property has been set, sound detection will not begin until the delay period has elapsed.

HRESULT StopDetection();

Stops sound detection.

Returns

S_OK | The method succeeded.
VFW_E_NOT_CONNECTED | An error has occurred, either the input or output pin is not connected.

HRESULT ResetToDefaults()

Description:

Resets the filter properties to their default values. Calling this method might cause the filter to reconnect its output pin.

Comments:

The method will fail if the filter is in the running state.

Returns

S_OK | The method succeeded.
VFW_E_WRONG_STATE | The filter is in the wrong state.


ILMADetUserCallback Interface

ILMADetUserCallback Interface

This is a user callback interface that should be implemented to receive notifications of whether sound/silence is detected. You register the callback by setting the ILMADet::CallbackObj property. This interface has one method, which will be called by the filter to report sound/silence events.

DirectShow determines the duration of the audio buffer. If you use the LEADTOOLS Multimedia toolkit, you can change the size of the audio buffers using the AudioBufferSize property.

Interface Methods:

HRESULT CallbackProc (long nEvent, VARIANT *pData, long lDataCount, long lBitsPerSample, long lChannels, long lSamplesPerSec, long lAvgBytesPerSec);

Parameters

nEvent | Event notification type. It tells whether we have sound or silence. Possible values for are:
 | Value | Meaning
 | AUDIO_LEVEL_STARTSOUND | The filter has detected sound. The previous buffer contained silence.
 | AUDIO_LEVEL_SOUND | The filter has detected sound. The previous buffer contained sound also.
 | AUDIO_LEVEL_STARTSILENCE | The filter has detected silence. The previous buffer contained sound.
 | AUDIO_LEVEL_SILENCE | The filter has detected silence. The previous buffer contained silence also.
 | pData | Pointer to the audio data. The audio data is an array of unsigned bytes (8-bit) or signed short (16-bit) values. For more information on the audio data, refer to the Comments section below.
 | lDataCount | The number of elements in pData. If lBitsPerSample is 8, then this also represents the size (in bytes) of the buffer pointed to by pData. If lBitsPerSample is 16, then the size of the pData buffer is lDataCount * 2.
 | lBitsPerSample | Number of bits per sample of mono data. This can be 8 or 16. This determines the format of the data pointed to by pData.
 | lChannels | Number of channels (i.e. 1=mono, 2=stereo...)
 | lSamplesPerSec | Sample rate, in samples per second.
 | lAvgBytesPerSec | Average bandwidth in bytes per second. It should be equal to lSamplesPerSec * lChannels * (lBitsPerSample / 8).

Description

The filter will call this method when sound or silence is detected. Every time the callback is received, you are also given the audio data buffer.

Returns

S_OK if successful, an HRESULT error code otherwise.

Comments

Format of audio data:

The general format of the audio data (lChannels) is as follows:

Sample 0

Channel 0

Channel 1

…

Channel lChannels – 1

In this case,

pData(0) is Sample 0, Channel 0
pData(1) is Sample 0, Channel 1

pData(lChannels - 1) is Sample 0, Channel lChannels -1
pData(lChannels) is Sample 1, Channel 0
pData(lChannels + 1) is Sample 1, Channel 1

The format for mono data is simple, because there is only one channel. In this case, every value in the array is one sample:

pData(0) is Sample 0
pData(1) is Sample 1

The format for stereo data is still simple: there are two values per sample (one for left channel and the other for right channel):

pData(0) is Sample 0, Left channel
pData(1) is Sample 0, Right channel
pData(2) is Sample 1, Left channel
pData(3) is Sample 1, Right channel

The format of the value is different depending on whether lBitsPerChannel is 8 or 16.

Format of 8-bit audio data:

The values in the array are unsigned and between 0 and 255. The real audio value will be obtained by subtracting 128 from the array value and should have a value between –128 and 127. If you want to change the value, you must remember to add 128 before putting back the data.

Here is some Visual Basic code that doubles the intensity of the sound for pData(i):

Dim val As Long ‘ use a signed data type
val = pData(i) - 128 ‘ convert pData(i) to long. val is now the audio value, in the 0..255 range
val = val * 2 ‘ double the sound intensity

' convert the value to signed 8-bit
val = pData(i) - 128

' double the audio value
val = val * 2

' clip the output to -128..127
If val > 127 Then
val = 127
ElseIf val < -128 Then
val = -128
End If

' write the data out, adding back 128
pData(i) = val + 128

Note how the real audio value was clipped to the –128 ..127 range before adding 128. This is important, otherwise distortions are introduced.

Format of 16-bit data:

The values in the array are signed and between -32768 and 32767. They contain the real audio value and it is not necessary to do the conversions like for the 8-bit data.

Here is some Visual Basic code that doubles the intensity of the sound for pData(i):

‘ use a signed data type. Use long (32-bit in VB)
‘ instead of Integer (16-bit in VB) to avoid overflows when multiplying by 2
Dim val As Long

val = pData(i)
val = val * 2

' clip the output to --32768..32767
If val > 32767 Then
val = 32767
ElseIf (val < -32768) Then
val = -32768
End If

pData(i) = val


LEAD Audio Echo Filter

LEAD Audio Echo Filter

The LEAD Audio Echo filter can be used to add an echo effect. The echo effect reflects a sound wave back to its source with sufficient strength and time lag to be separately distinguished.

Filter Interfaces | ILMAEcho, ILMAEchoDisp , ILMMCommon
Interface ID | IID_ILMAEcho, IID_ILMAEchoDisp
Input pin Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMAEcho
Property Page CLSID | CLSID_LMAEchoPropertyPage
Executable | LMAEcho.dll
Filter category | CLSID_ltmmAudioProcessorCategory
Header | ILMAEcho.h

Platforms

Win32, x64

LEAD Audio Echo User Interface


LEAD Audio Echo Filter User Interface

LEAD Audio Echo FilterUser Interface

The Echo filter reflects a sound wave back to its source with sufficient strength and time lag to be distinguished as a separate sound. The property page is shown in the figure below:

The Echo property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
The Enable check box | Enables/Disables the effect.
The Wet mix % slider | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
The Dry mix % slider | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
Combine check box | If selected, preserves the difference between the wet and dry mixes.
Feedback % slider | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
Delay slider | Controls the level of the echo. Larger values result in greater delay times.
The Defaults button | Restores the default values for the properties.
The Set as defaults button | Sets the current properties values as defaults.


ILMAEcho Interface

ILMAEcho Interface

Data types:

ECHO_ATTRIBUTES

typedef struct
{
long lDryMix;
long lWetMix;
long lDelay;
long lFeedback;
BOOL bEnabled;
long lDDryMix;
long lDWetMix;
long lDDelay;
long lDFeedback;
BOOL bDEnabled;
} ECHO_ATTRIBUTES;

Describes the echo attributes.

Name | Description
lDryMix | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
lWetMix | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
lDelay | Controls the level of the echo. Larger values result in greater delay times.
lFeedback | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
bEnabled | Indicates whether the echo effect is enabled (TRUE) or not (FALSE).
lDDryMix | Default Dry Mix value. Original default value is 70.
lDWetMix | Default Wet Mix value. Original default value is 50.
lDDelay | Default depth value. Original default value is 500.
lDFeedback | Default feedback value Original default value is 25.
bDEnabled | Default for bEnabled value Original default value is TRUE.

Interface methods:

HRESULT GetNumChannels (int * pnChannels)

Parameters

pnChannels

valid pointer to an integer variable to be updated with the number of channels.

Description

Gets the number of channels per sample of the current connected media format.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetEchoAttributes(ECHO_ATTRIBUTES EchoAttributes)

Parameters

EchoAttributes

ECHO_ATTRIBUTES structure that contains the attributes to set.

Description

Sets the properties for the echo effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetEchoAttributes(ECHO_ATTRIBUTES* pEchoAttributes)

Parameters

pEchoAttributes

valid pointer to an ECHO_ATTRIBUTES structure to be updated with the current echo attributes.

Description

Retrieves the current echo attributes.

Returns

S_OK if successful, S_FALSE otherwise.


ILMAEchoDisp Interface

ILMAEchoDisp Interface

Interface Properties:

Type | Name | Description
long | DryMix | Controls the level of unprocessed signals. Adjust to control the mixed amount of the unprocessed signal.
long | WetMix | Controls the level of processed signals. Adjust to control the mixed amount of the processed signal.
long | Delay | Controls the level of echo, increased values will result an increase in the delay time.
long | Feedback | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
VARIANT_BOOL | Enabled | Indicates weather the echo effect is enabled (VARIANT_TRUE) or not (VARIANT_FALSE).
long | DefaultDryMix | Default Dry Mix value. Original default value is 70.
long | DefaultWetMix | Default Wet Mix value. Original default value is 50.
long | DefaultDelay | Default delay value. Original default value is 500.
long | DefaultFeedback | Default feedback value Original default value is 25.
VARIANT_BOOL | DefaultEnabled | Default for bEnabled value Original default value is VARIANT_TRUE.
long | NumChannels | Number of channels per sample of the current media format.


LEAD Audio Flanger Filter

LEAD Audio Flanger Filter

The LEAD Audio Flangerfilter can be used to add a flange effect. Flanging has a characteristic sound often described as a "whooshing" sound, similar to the sound of a jet plane flying overhead.

Filter Interfaces | ILMAFlangerDisp , ILMMCommon
Interface ID | IID_ILMAFlanger, IID_ILMAFlangerDisp
Input pin Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMAFlanger
Property Page CLSID | CLSID_LMAFlangerPropertyPage
Executable | LMAFlng.dll
Filter category | CLSID_ltmmAudioProcessorCategory
Header | ILMAFlanger.h

Platforms

Win32, x64

LEAD Audio Flanger Filter User Interface


LEAD Audio Flanger Filter User Interface

LEAD Audio Flanger FilterUser Interface

The Flanger Audio filter creates a characteristic sound often described as a "whooshing" sound, similar to the sound of a jet plane flying overhead. The property page is shown in the following figure:

The property page provides a user interface for changing the filter's attributes. Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Combine check box | If selected, preserves the difference between the wet and dry mixes.
Wet mix % slider | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
Dry mix % slider | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
Feedback % slider | Controls the feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
Delay slider | Controls the level of flange effect: larger values result in greater delay times.
Stereo slider | Controls the phase difference between the left and right channel.
Rate slider | Controls the rate at which the LFO waveform repeats itself. By increasing the speed, the flanger will have to sweep through the depth in less time.
Sweep slider | Controls how wide the sweep is in terms of delay time - essentially the width of the LFO. This sweep depth is the maximum additional delay that is added to the signal in addition to the delay in the delay parameter.
Default button | Restores properties to their default values.
Set as Default button | Saves the current property values as the default values.


ILMAFlanger Interface

ILMAFlanger Interface

Data types:

FLANGER_ATTRIBUTES

typedef struct
{
long lDryMix;
long lWetMix;
long lDelay;
long lFeedback;
long lRate;
long lSweep;
long lStereo;
BOOL bEnabled;
long lDDryMix;
long lDWetMix;
long lDDelay;
long lDFeedback;
long lDRate;
long lDSweep;
long lDStereo;
BOOL bDEnabled;
} FLANGER_ATTRIBUTES;

Describes the flanger attributes.

Member | Description
lDryMix | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
lWetMix | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
lDelay | Controls the level of flange effect. :Larger values result in greater delay times.
lFeedback | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
lRate | This parameter refers to the rate at which the LFO waveform repeats itself. By increasing the speed, the flanger will have to sweep through the depth in less time.
lSweep | The sweep depth determines how wide the sweep is in terms of delay time - essentially the width of the LFO. This sweep depth is the maximum additional delay that is added to the signal in addition to the delay in the delay parameter.
lStereo | Stereo represents the phase difference between the left and right channel.
bEnabled | Indicates whether the Flange effect is enabled (TRUE) or not (FALSE).
lDDryMix | Default Dry Mix value. Original default value is 70.
lDWetMix | Default Wet Mix value. Original default value is 50.
lDDelay | Default delay value. Original default value is 500.
lDFeedback | Default feedback value Original default value is 25.
lDRate | Default rate value Original default value is 5.
lDSweep | Default sweep value Original default value is 10.
lDStereo | Default stereo value Original default value is 90.
bDEnabled | Default for bEnabled value Original default value is TRUE.

Interface methods:

hHRESULT GetNumChannels (int * pnChannels)

Parameters

pnChannels

valid pointer to an integer variable to be updated with the number of channels.

Description

Gets the number of channels per sample of the current connected media format.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetFlangerAttributes(FLANGER_ATTRIBUTES FlangerAttributes)

Parameters

FlangerAttributes

FLANGER_ATTRIBUTES structure that contains the attributes to set.

Description

Sets the properties for the flange effect.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetFlangerAttributes(FLANGER_ATTRIBUTES* pFlangerAttributes)

Parameters

pFlangerAttributes

valid pointer to a FLANGER_ATTRIBUTES structure to be updated with the current flange attributes.

Description

Retrieves the current flange attributes.

Returns

S_OK if successful, S_FALSE otherwise.


ILMAFlangerDisp Interface

ILMAFlangerDisp Interface

Properties:

Type | Name | Description
long | DryMix | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
long | WetMix | Controls the level of processed signals. Adjust to control the mixed amount of the processed signal.
long | Delay | Controls the level of flange, increased values will result in an increase in the delay time.
long | Feedback | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
long | Rate | Refers to the rate at which the LFO waveform repeats itself. By increasing the speed, the flanger will have to sweep through the depth in less time.
long | Sweep | The sweep depth determines how wide the sweep is in terms of delay time - essentially the width of the LFO. This sweep depth is the maximum additional delay that is added to the signal in addition to the delay in the Delay property.
long | Stereo | Represent the phase difference between the left and right channel.
VARIANT_BOOL | Enabled | Indicates weather Flange effect is enabled (VARIANT_TRUE) or not (VARIANT_FALSE).
long | DefaultDryMix | Default Dry Mix value. Original default value is 70.
long | DefaultWetMix | Default Wet Mix value. Original default value is 50.
long | DefaultDelay | Default delay value. Original default value is 500.
long | DefaultFeedback | Default feedback value Original default value is 25.
long | DefaultRate | Default rate value Original default value is 5.
long | DefaultSweep | Default sweep value Original default value is 10.
long | DefaultStereo | Default stereo value Original default value is 90.
VARIANT_BOOL | DefaultEnabled | Default for bEnabled value Original default value is VARIANT_TRUE.
long | NumChannels | Number of channels per sample of the current media format.


LEAD MPEG Audio Encoder (2.0)

Software component that compresses and decompresses audio. Codec stands for COmpressor and DECompressor.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG Audio Encoder (2.0)

The LEAD MPEG Audio Encoder is a DirectShow Ò filter for compressing Audio data using the MPEG-1 Layer 2 audio compression standard (ISO/IEC 11172-3). This audio format can be multiplexed into an MPEG-1 or MPEG-2 file. Use this audio codec when you create MPEG-1 or MPEG-2 (DVD) files.

MPEG-1 Layer 3 compression offers higher audio compression than MPEG-1 Layer 2, but this audio compression is not supported by most MPEG splitters.

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_WAVE MEDIASUBTYPE_PCM
Output Media Types | Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_MPEG1AudioPayload
Filter CLSID | CLSID_LMAMpgEncoder
Property Page CLSID | N/A
Executable | LEncMpgA.dll, DSKernel2.dll
Filter category | CLSID_AudioCompressorCategory
Header | N/A

Platforms

Win32, x64

LEAD MPEG Audio Encoder User Interface (2.0)

This filter is included as part of the following modules:

LEAD MPEG-2 Video Encoder Module

LEAD MPEG-2 Video Codec Module


LEAD MPEG Audio Converter

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG Audio Converter

The LEAD MPEG Audio Converter is a helper filter that is used automatically to convert audio subtype from MEDIASUBTYPE_MPEG2_AUDIO to MEDIASUBTYPE_MPEG1AudioPayload to help play the audio in MPEG2 files created with "LEAD MPEG Audio Encoder" in case a DVD audio decoder is not installed. So basically this filter converts MPEG2 audio type to MPEG1.

Filter Interface | -
Interface ID | -
Input/Output Media Types | MEDIATYPE_Audio
Input Media Sub Type | MEDIASUBTYPE_MPEG2_AUDIO
Output Media Sub Type | MEDIASUBTYPE_MPEG1AudioPayload
Filter CLSID | CLSID_LMAMP2Conv
Filter category | -
Executable | LMAMpgCnv.dll
Header | -

Platforms

Win32, x64


LEAD MPEG Audio Encoder User Interface (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Software component that compresses and decompresses audio. Codec stands for COmpressor and DECompressor.Codec stands for COmpressor and DECompressor.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG Audio Encoder User Interface (2.0)

The LEAD MPEG Audio Encoder is a DirectShow Ò filter for compressing Audio data using the MPEG-1 Layer 2 audio compression standard (ISO/IEC 11172-3). This audio format can be multiplexed into an MPEG-1 or MPEG-2 file. Use this audio codec when you create MPEG-1 or MPEG-2 files, or DVDs.

MPEG-1 Layer 3 compression offers higher audio compression than MPEG-1 Layer 2, but this audio compression is not supported by most MPEG splitters.


LEAD Audio Phaser Filter

LEAD Audio Phaser Filter

The LEAD Audio Phaser filter can be used to add the distinctive phaser sound. This distinctive sound is obtained by creating one or more notches in the frequency domain that eliminate sounds at the notch frequencies. Notches are created by filtering the signal, and mixing the filter output with the input signal. The flanger, a specific type of phasing, also makes use of notches.

Filter Interfaces | ILMAPhaser, ILMAPhaserDisp, ILMMCommon
Interface ID | IID_ILMAPhaser, IID_ILMAPhaserDisp
Input pin Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMAPhaser
Property Page CLSID | CLSID_LMAPhaserPropertyPage
Executable | LMAPhase.dll
Filter category | CLSID_ltmmAudioProcessorCategory
Header | ILMAPhase.h

Platforms

Win32, x64

LEAD Audio Phaser Filter User Interface


LEAD Audio Phaser Filter User Interface

LEAD Audio Phaser FilterUser Interface

The Phaser Audio filter makes the audio thinner or fuller. This distinctive sound is obtained by creating one or more notches in the frequency domain that eliminate sounds at the notch frequencies. Notches are created by filtering the signal, and mixing the filtered signal with the input signal. The flanger, a specific type of phasing, also makes use of notches. The property page is shown in the figure below:

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Enable check box | Enables/Disables the effect.
Combine check box | If selected, preserves the difference between the wet and dry mixes.
Wet mix % slider | Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.
Dry mix % slider | Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.
Feedback slider | Controls the feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
Delay slider | Controls the level of Phasing effect. Larger values result in greater delay times.
Stereo slider | Controls the phase difference between the left and right channel.
Depth slider | Controls the amount of the filter output that is added to the sound.
Rate slider | Controls how quickly the notches sweep up and down over the frequency range.
Default button | Restores properties to their default values.
Set as Default button | Saves the current property values as the default values.


ILMAPhaser Interface

ILMAPhaser Interface

Data types:

PHASER_ATTRIBUTES:

typedef struct
{
long lDryMix;
long lWetMix;
long lDelay;
long lFeedback;
long lStereo;
long lDepth;
long lRate;
BOOL bEnabled;
long lDDryMix;
long lDWetMix;
long lDDelay;
long lDFeedback;
long lDStereo;
long lDDepth;
long lDRate;
BOOL bDEnabled;
} PHASER_ATTRIBUTES;

Describes phaser attributes.

Member

Description

lDryMix

Controls the level of unprocessed signals. Adjust to control the pass-through volume of the unprocessed signal.

lWetMix

Controls the level of processed signals. Adjust to control the pass-through volume of the processed signal.

lDelay

Controls the level of Phasing effect. Larger values result in greater delay times.

lFeedback

Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.

lStereo

Stereo represents the phase difference between the left and right channel.

lDepth

The depth parameter controls the amount of the filter output that is added to the sound

lRate

This parameter controls how quickly the notches sweep up and down over the frequency range.

bEnabled

Indicates weather Phase effect is enabled (TRUE) or not (FALSE).

lDDryMix

Default Dry Mix value.

Original default value is 70.

lDWetMix

Default Wet Mix value.

Original default value is 50.

lDDelay

Default delay value.

Original default value is 100.

lDFeedback

Default feedback value

Original default value is 25.

lDStereo

Default stereo value

Original default value is 90.

lDDepth

Default Depth value

Original default value is 50.

lDRate

Default Rate value

Original default value is 100.

bDEnabled

Default for bEnabled value

Original default value is TRUE.

Interface Methods:

HRESULT GetNumChannels (int * pnChannels)

Parameters

pnChannels

valid pointer to an integer variable to be updated with the number of channels.

Description

Gets the number of channels per sample of the current connected media format.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetPhaserAttributes(PHASER_ATTRIBUTES PhaserAttributes)

Parameters

PhaserAttributes

a PHASER_ATTRIBUTES structure that contains the effects to set.

Description

Sets the properties for the phase effect.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT GetPhaserAttributes(PHASER_ATTRIBUTES* pPhaserAttributes)

Parameters

pPhaserAttributes

valid pointer to a PHASER_ATTRIBUTES structure to be updated with the current phase attributes.

Description

Retrieves the current phase attributes.

Returns

S_OK if successful, S_FALSE otherwise.


ILMAPhaserDisp Interface

ILMAPhaserDisp Interface

Properties:

Type | Name | Description
long | DryMix | Controls the level of unprocessed signals. Adjust to control the mixed amount of the unprocessed signal.
long | WetMix | Controls the level of processed signals. Adjust to control the mixed amount of the processed signal.
long | Delay | Controls the level of Phasing effect, increased values will result in an increase in the delay time.
long | Feedback | Feedback of the repeated signal, by default from -100 to 100. Zero feedback will result in only a single repeat, while nonzero feedback settings will generate numerous repeats.
long | Stereo | Represent the phase difference between the left and right channel.
long | Depth | Controls the amount of the filter output that is added to the sound
long | Rate | Refers to the rate at which the LFO waveform repeats itself. By increasing the speed, the phaser will have to sweep through the depth in less time.
VARIANT_BOOL | Enabled | Indicates weather Phase effect is enabled (VARIANT_TRUE) or not (VARIANT_FALSE).
long | DefaultDryMix | Default Dry Mix value. Original default value is 70.
long | DefaultWetMix | Default Wet Mix value. Original default value is 50.
long | DefaultDelay | Default delay value. Original default value is 100.
long | DefaultFeedback | Default feedback value Original default value is 25.
long | DefaultStereo | Default stereo value Original default value is 90.
long | DefaultDepth | Default Depth value Original default value is 50.
long | DefaultRate | Default Rate value Original default value is 1000.
VARIANT_BOOL | DefaultEnabled | Default for bEnabled value Original default value is VARIANT_TRUE.
long | NumChannels | Number of channels per sample of the current media format.


LEAD Audio Volume Filter

LEAD Audio Volume Filter

The LEAD Audio Volume filter allows the user to change the volume of sound samples.

Filter Interface | ILMAVolumeDisp
Interface ID | IID_ILMAVolume, IID_ILMAVolumeDisp
Input pin Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMAVolume
Property Page CLSID | CLSID_LMAVolumePropertyPage
Executable | LMAVol.dll
Filter category | CLSID_ltmmAudioProcessorCategory
Header | ILMAVolume.h

Platforms

Win32, x64

LEAD Audio Volume Filter User Interface


LEAD Audio Volume Filter User Interface

LEAD Audio Volume FilterUser Interface

The Volume Audio filter makes it possible to change the volume of sound samples. This is useful when bringing audio files to the same volume level. The property page is shown in the following figure:

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Mute check box | If selected, mutes the sound (all the samples are set to the silence level).
Volume slider | Sets the sound stream volume. Possible values range from -10 (lowest level) to 10 (highest level); a value of zero will cause the stream to be passed without change.


ILMAVolume Interface

ILMAVolume Interface

Interface methods:

HRESULT SetAmplitude(int lAmplitude)

Parameters

lAmplitude

Integer value that represents the requested volume amplitude, possible values are between –10 and 10.

Description

Sets the volume of the sound stream.

Returns

S_OK if successful, amplitude values out of the range will be clipped.

S_FALSE otherwise.

HRESULT GetAmplitude(int *lAmplitude)

Parameters

lAmplitude

A valid pointer to an integer variable that will receive the current volume.

Description

Gets the current volume value.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetMute(BOOL bMute)

Parameters

bMute

New status of mute option, TRUE or FALSE.

Description

Sets the mute volume option.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetMute(BOOL *bMute)

Parameters

bMute

A valid pointer to a Boolean variable that will receive the current mute volume option.

Description

Gets the current mute volume option status.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetNumChannels(int *nChannels)

Parameters

nChannels

A valid pointer to an integer variable that will receive the number of channels in the current sound stream.

Description

Gets the number of channels in the current sound stream.

Returns

S_OK if successful, S_FALSE otherwise.


ILMAVolumeDisp Interface

ILMAVolumeDisp Interface

Properties:

Type | Name | Description
int | Amplitude | Sets or gets sound stream volume.
VARIANT_BOOL | Mute | Sets or gets mute volume option.
long | NumChannels | Number of audio channels of the current media format.


LEAD Audio VU Meter Filter

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

oftware component which decompresses audio. It must be designed to work with ACM or DirectShow . Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams.

Available in LEADTOOLS Multimedia toolkits.

LEAD Audio VU Meter Filter

The LEAD Audio VU meter filter can be used to add a VU meter to an audio stream. The VU meter allows the user to retrieve left and right channel audio power levels. The filter can be used to monitor the output level of other filters placed before it in the stream.

Filter Interfaces | ILMAVUMeter, ILMAVUMeterDisp
Interface ID | IID_ILMAVUMeter, IID_ILMAVUMeterDisp
Input pin Media Types | MEDIATYPE_Audio
Filter CLSID | CLSID_LMAVUMeter
Property Page CLSID | CLSID_LMAVUMeterPropertyPage
Executable | LMAVUMeter.dll
Filter category | CLSID_ltmmAudioProcessorCategory
Header | ILMAVUMeter.h

Platforms

Win32, x64

LEAD Audio VU Meter Filter User Interface


LEAD Audio VU Meter Filter User Interface

LEAD Audio VU Meter FilterUser Interface

The VU meter property page provides a simple graphical display of the current audio power levels.


ILMAVUMeter Interface

ILMAVUMeter Interface

Data types:

VUMETER_LEVEL

typedef struct
{
long lLeft;
long lRight;
} VUMETER_LEVEL;

Describes the current VU meter power levels.

Member | Description
lLeft | Left channel power level. The range is 10000 to 0. Full power is 0, and 10,000 is silence; the scale is logarithmic. Divide by 100 to get equivalent decibel value (for example 10,000 = 100 dB).
lRight | Right channel power level. The range is 10000 to 0. Full power is 0, and 10,000 is silence; the scale is logarithmic. Divide by 100 to get equivalent decibel value (for example 10,000 = 100 dB).

Interface methods:

HRESULT GetLevel(VUMETER_LEVEL* pLevel);

Parameters

pLevel

Pointer to a VUMETER_LEVEL structure that receives the current power levels.

Description

Used to query the current audio power levels.

Returns

S_OK if successful, an HRESULT error code otherwise.


ILMAVUMeterDisp Interface

ILMAVUMeterDisp Interface

Interface methods:

HRESULT get_LeftLevel(long* pVal);

Parameters

pVal

Pointer to a variable that receives the current left channel power level.

Description

Used to query the current left channel power level. The range is –10000 to 0. Full power is 0, and –10,000 is silence; the scale is logarithmic.

Divide by 100 to get equivalent decibel value (for example –10,000 = –100 dB).

Returns

S_OK if successful, an HRESULT error code otherwise.

HRESULT get_RightLevel(long* pVal);

Parameters

pVal

Pointer to a variable that receives the current right channel power level.

Description

Used to query the current right channel power level. The range is –10000 to 0. Full power is 0, and –10,000 is silence; the scale is logarithmic.

Divide by 100 to get equivalent decibel value (for example –10,000 = –100 dB).

Returns

S_OK if successful, an HRESULT error code otherwise.


LEAD DICOM Reader (2.0)

LEAD DICOM Reader (2.0)

The LEAD DICOM Reader makes it possible to stream the video data in any DICOM file. It also makes it possible for any DirectShow Ò -based media player to play video data in a DICOM file. The filter offers the ability to control the stream speed by changing the frame time. In addition to the basic stream and speed control functionality, this filter makes it possible to insert one’s own external DICOM dataset and gain access to the initialized dataset for use with other processes.

The DICOM reader has a built-in JPEG and JPEG2000 decompressor. It can play DICOM MPEG-2 (SD or HD) file, but it requires an external MPEG-2 decompressor. The DICOM Reader is designed to work with the LEAD MPEG-2 Decoder.

Filter Interface | ILTDicRd, ILMMCommon
Interface ID | IID_ILTDicRd
Input/Output Media Types | Major output type is MEDIATYPE_Video.
Filter CLSID | CLSID_LTDicRd
Property Page CLSID | CLSID_LTDicRdPropertyPage
Filter category | --
Executable | LTDicRd2.dll, DSKernel2.dll
Header | ILTDicRd2.h

Platforms

Win32, x64

LEAD DICOM Reader User Interface

See Also

ILTDicRd Interface

LEAD MPEG-2 Decoder

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module


LEAD DICOM Reader User Interface (2.0)

LEAD DICOM Reader User Interface (2.0)

Control | Description
Input file name edit box: | Use this edit box to type in the name of the input file. This edit box is disabled after the output pin is connected.
Browse Button | Click this button to open the Open Dialog to browse to the location of the input file. This button is disabled after the output pin is connected.
Enable frame time control Check box | Select this check box to enable frame rate control by setting the frame time (amount of time a frame is displayed). If this check box is not selected, the stream plays with the frame time set at 40 milliseconds (equating to 25 frames per second).
Frame time Spin Box | Sets the frame time, in milliseconds. This spin box is enabled if the Enable Frame Time Control check box is selected. Possible values range from 20 through 1000.
Enable Frame Dropping Check box | Select this check box to allow frames to be dropped as necessary to maintain the frame time.

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module

See Also

ILTDicRd Interface

LEAD DICOM Reader (2.0)


ILTDicRd Interface

Also known as a decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILTDicRd Interface

This is the interface for the LEAD DICOM Reader.

Interface Properties

HRESULT put_InputFileName(const OLECHAR *pszFileName)

Parameters

pzFileName

Pointer to an OLECHAR string that contains the input DICOM file

Description

Sets the input file name. Should you set the InputFileName to NULL, be sure to set an input dataset using SetDicomDS because otherwise you will have no input data and the filter will fail to connect. The function fails under the following conditions:

  • If the filter output pin is already connected.

  • If a user dataset is initialized.

  • If the input file contains no pixel data.

  • If the input file is not a valid DICOM file.

  • If the length of the input file name exceeds the maximum length allowed for a file name (260 characters)

The default value is "". Note that the DICOM file may contain MPEG2 data, which would require that a MPEG-2 video decoder be installed before the file could be played.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_InputFileName(OLECHAR **ppszFileName)

Parameters

ppszFileName

Address of a pointer to the returned DICOM input file name.

Description

Retrieves the input file name. This function allocates memory for the string. You are responsible for freeing the memory by using SysFreeString().

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_ConnectionState(int * pbConnected)

Parameters

pbConnected | Pointer to a variable that will receive the connection state of the output pin. Possible values are:
 | Value | Meaning
 | TRUE | The output pin is connected.
 | FALSE | The output pin is not connected.

Description

Gets a value that indicates whether the output pin is connected.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_DicomDS(long * pDS)

Parameters

pDS

Address of a pointer to the returned dataset.

Description

Retrieves the currently initialized DICOM dataset. Typecast this pointer to LDicomDS before using it. Do not make changes to the dataset after the filter is connected, since this might cause problems with the LEAD DICOM Reader.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT put_FrameTime(long lFrameTime)

Parameters

lFrameTime

New frame time value in milliseconds.

Description

Sets the frame time (the time each frame is displayed while playing the PixelData), in milliseconds. Possible values range between 20 and 1000. The Frame Control feature must be enabled in order to control the frame time (and thus the play speed). If frame time is not enabled, the stream plays with the frame time set to 40 milliseconds (25 frames per second).

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_FrameTime(long * lFrameTime)

Parameters

lFrameTime

Pointer to a variable that will receive the current frame time.

Description

Retrieves the frame time (the time each frame is displayed while playing the PixelData), in milliseconds. The default value is 40.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT put_FrameControl(int bEnableFrameControl)

Parameters

bEnableFrameControl | A Boolean value that enables or disables frame control. Possible values are:
 | Value | Meaning
 | TRUE | Enable frame control.
 | FALSE | Disable frame control.

Description

Sets the frame control using put_FrameTime or set through the interface by using the property page.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_FrameControl(int *bEnableFrameControl)

Parameters

bEnableFrameControl | Pointer to a variable that indicates whether frame control is enabled. Possible values are:
 | Value | Meaning
 | TRUE | Frame control is enabled.
 | FALSE | Frame control is disabled.

Description

Retrieves a value that indicates whether frame control is enabled. The default values is FALSE.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT put_FrameDropping(int EnableFrameDropping)

Parameters

bEnableFrameDropping | A Boolean variable that contains a value that indicates whether frames can be dropped. Possible values are:
 | Value | Meaning
 | TRUE | Frames can be dropped.
 | FALSE | Keep every frame.

Description

Use this function to set the filter to drop frames when necessary in order to maintain the frame rate. To enable frame dropping set bEnableFrameDropping to TRUE. To keep every frame set bEnableFrameDropping to FALSE.

Returns

Always returns S_OK.

HRESULT get_FrameDropping(int *pbEnableFrameDropping)

Parameters

pbEnableFrameDropping | pointer to a Boolean value that indicates whether the frame dropping feature is currently set to drop frames.
 | Value | Meaning
 | TRUE | The filter is currently set to drop frames when necessary to maintain the frame time.
 | FALSE | The filter is set to keep every frame.

Description

Gets a value that indicates whether the filter is currently set to drop frames when necessary to maintain the frame time. The default value is FALSE.

Returns

S_OK | SUCCESS
E_INVALIDARG | The input pointer is invalid.

Interface Methods

HRESULT SetDicomDS(long pDS, int bCopy)

Parameters

pDS | Pointer to the user dataset.
bCopy | A value that specifies whether the filter should make a copy of the passed dataset for future usage. Possible values are:
 | Value | Meaning
 | TRUE | Make a copy of the dataset (allocating memory for it, and maintaining responsibility for freeing this memory).
 | FALSE | The user will take care of the pointer life (and ensure its availability for the Writer as long as it is needed).

Description

Sets the DICOM dataset inside the LEAD DICOM Reader filter. Before using this function you need to first create and initialize a dataset using the raster toolkit and LDicomDS::InitDS and either LDicomDS::LoadDS or LDicomDS::LoadDSMemory. This function fails:

  • If the LEAD DICOM Reader is already connected

  • If the dataset contains no pixel data

  • If the pixel data could not be read properly.

Call this method with pDS set to NULL:

  • To stop the LEAD DICOM Reader from using the dataset

  • Before freeing the dataset's memory.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT ResetToDefaults()

Description

Resets the LEAD DICOM Reader option values to the default values, as follows:

  • InputFileName = ""

  • FrameControl = FALSE

  • FrameDropping = FALSE

  • FrameTime = 40

Returns

Always returns S_OK.

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module

See Also

LEAD DICOM Reader (2.0)

LEAD DICOM Reader User Interface (2.0)


Introduction to the LEAD DICOM Writer

The LEAD DICOM Writer includes DirectShow filters that are used for creating DICOM objects with compressed video and audio data.

Key Features:

Ability to create DICOM files with both video and audio using MPEG-2 compression (SD or HD). The user can adjust various attributes of the MPEG-2 stream, including bit rate and quality factor.

Ability to create DICOM files with video data (cine images) using lossy and lossless JPEG and JPEG2000 compression, with the option to adjust quality factor.

Ability to add video data to either an existing DICOM file or create a new one from a set of predefined DICOM classes or IODs.

Ability to accept 8-bit RGB, 12-bit grayscale (LGRY), 16-bit grayscale (LGRY), 16-bit UYVY, 16-bit YUY2, 24-bit RGB data or MPEG-2 compressed data.

Includes a number of video processing filters, including:

Auto Contrast

Auto Intensity

Auto Level

Video Text Overlay

Video Crop

Ability to be used with an existing application that uses DirectShow, or programmatically from within the LEADTOOLS Medical Imaging toolkit.

Examples of DICOM objects that can be created using the LEAD DICOM Writer component:

Secondary Capture Multi-Frame True Color Image Storage

Video Endoscopic Image Storage

Video Photographic Image Storage

Video Microscopic Image Storage

Ultrasound Multi-frame Image Storage

X-Ray Radiofluoroscopic Image

X-Ray Angiographic Image Storage

Secondary Capture Multi-frame Grayscale Byte Image Storage

Secondary Capture Multi-frame Grayscale Word Image Storage

MPEG-2 Encoding in DICOM:

MPEG-2 is a high quality video compression, primarily targeted for applications that require higher bitrates or high bandwidth usage. The DICOM standard uses MPEG-2 lossy compression with middle range quality, which typically delivers between 30 Mbytes and 60 Mbytes per minute of video (SD) or 112 Mbytes and 300 Mbytes per minute of video (HD).

The DICOM MPEG-2 objects created using the writer fully adhere to the rules of MPEG-2 encoding in DICOM, which are described by the new transfer syntaxes:

  • "MPEG-2 Main Profile @ Main Level” (1.2.840.10008.1.2.4.100) for SD MPEG-2 Compression. See "Supplement 42: MPEG2 Transfer Syntax" of the DICOM standard for more information.

  • "MPEG-2 Main Profile @ High Level" (1.2.840.10008.1.2.4.101) for HD MPEG-2 Compression. See "Supplement 137: MPEG2 MP@HL Transfer Syntax" of the DICOM standard for more information.

Some of the typical modalities that can take advantage of MPEG-2 encoding in DICOM include microscopic and endoscopic applications such as Gastro-Enterology, Laparoscopy, Orthopedics, Ophthalmology, ENT, Gynaecology, Bronchoscopy, Pathology, and (Microscopic) Surgery.

DirectShow filters included as part of the LEAD DICOM Writer component:

LEAD DICOM Writer Filter

LEAD MPEG-2 Encoder

LEAD MPEG-2 Multiplexer

LEAD MCMP-MJPEG Video Codec

LEAD Auto Contrast Filter

LEAD Auto Intensity Filter

LEAD Auto Level Filter

LEAD RGB Converter

LEAD Video Text Overlay Filter

LEAD Video Crop Filter

See Also

LEAD DICOM Writer (2.0)

LEAD DICOM Writer User Interface (2.0)

ILTDicWrt Interface

IFileSinkFilter Interface


LEAD DICOM Writer (2.0)

DICOM Writer (2.0)

The DICOM Writer makes it possible to set the pixel data of any DICOM file (existing or new), offering many options to store the DICOM file using the DICOM Writer available in the LEADTOOLS Medical Multimedia Filter Pack. With the DICOM Writer it is possible to access the DICOM dataset in the file, and save any changes made to the dataset with another utility. By default the filter uses a template input file to combine the available information of this template file with the pixel data fed from up-stream. If the input file is not available, the pixel data fed from up-stream is combined with the standard classes available to the DICOM Writer.

The DICOM Writer can create uncompressed, JPEG/JPEG2000 compressed or MPEG-2 compressed (SD or HD) DICOM files. It has a built-in JPEG/JPEG2000 compressor but for MPEG-2 compression it needs an external compressor. The DICOM Writer is designed to be used with the LEAD MPEG-2 Encoder. It can also accept data from capture cards that output compressed MPEG-2 video.

Filter Interface | ILTDicWrt, ILMMCommon
Interface ID | IID_ILTDicWrt
Input/Output Media Types | Major output type is MEDIATYPE_Video.
Filter CLSID | CLSID_DICOMWrt
Property Page CLSID | CLSID_LTDicWrtPropertyPage
Filter category | CLSID_LegacyAmFilterCategory
Executable | LTDicWrt2.dll, DSKernel2.dll
Header | ILTDicWrt2.h

Platforms

Win32, x64

LEAD DICOM Writer User Interface

See Also

ILTDicWrt Interface

IFileSinkFilter Interface

LEAD MPEG-2 Encoder

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module


Joint Photographic Experts Group- commonly used method of compression for photographic images

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.encoder , this is a module or algorithm to compress data. Playing that data back requires a decompressor , or decoder .encoder , this is a module or algorithm to compress data. Playing that data back requires a decompressor , or decoder .encoder , this is a module or algorithm to compress data. Playing that data back requires a decompressor , or decoder .encoder , this is a module or algorithm to compress data. Playing that data back requires a decompressor , or decoder .

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decoder, this is a module or algorithm to decompress data.

Also known as a decompressor, this is a module or algorithm to decompress data.

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

Available in LEADTOOLS Multimedia toolkits.

LEAD DICOM Writer User Interface (2.0)

The DICOM Writer filter makes it possible to set the pixel data of an existing or new DICOM file. The DICOM Writer accepts 8-bit RGB, 24-bit RGB, 16-bit UYVY, 16-bit YUY2 uncompressed data or MPEG-2 (SD or HD) compressed data. The filter has a built-in JPEG and JPEG 2000 compressor so it can create JPEG and/or JPEG 2000-compressed DICOM files. It can also create MPEG2 (SD or HD) DICOM files but it needs an external MPEG2 encoder. The DICOM Writer property page has two tabs to control the output. The LEAD DICOM File Writer tab is shown in Figure 1.

LEAD DICOM File Writer Tab

Figure 1. LEAD DICOM File Writer Tab

Control | Description
Input template file name Edit box: | Contains the input template file name. This edit box is disabled during streaming.
Browse Button | Select this button to open the Open Dialog to browse to the location of the input file. This button is disabled during streaming.
DICOM Class Drop-down list box | Select an item from this list to construct certain DICOM files based on standard DICOM classes without choosing an input template file. If an input template file is selected then this list will be disabled. This drop-down list box is disabled during streaming. Possible values depend on whether the input stream is MPEG2, as follows:
 | When the Input Stream is MPEG2 | When the Input Stream is not MPEG2
 | Secondary Capture Multi-frame True Color Image Storage | Nuclear Medicine Image Storage
 | Video Endoscopic Image Storage | Ultrasound Multi-frame Image Storage
 | Video Photographic Image Storage | X-Ray Angiographic Image Storage
 | Video Microscopic Image Storage | X-Ray Radiofluoroscopic Image Storage
 |  | Secondary Capture Multi-frame Grayscale Byte Image Storage
 |  | Secondary Capture Multi-frame Grayscale Word Image Storage
 |  | Secondary Capture Multi-frame True Color Image Storage
 |  | UNKNOWN

Table 1. LEAD DICOM File Writer Tab description

DICOM Compression Tab

The following tab appears when the input data is not MPEG2 data:

Figure 2. DICOM Compression Tab

Control | Description
Enable Check box | Select this check box to enable compression.
Flip YUV data Check box | Select this check box to flip the YUV data. This check box is ignored if the input data is not in the YUV color space.
Format drop-down list box: | Sets which compression type is to be used for the pixel data in the DICOM file. Possible values are:
 | Uncompressed
 | Lossless JPEG
 | Lossy JPEG
 | JPEG 2000
 | Lossless JPEG 2000
Quality factor Slider bar | Sets the quality factor. Values range from 2 (Best) to 255 (Worst). The exact value is displayed in the Quality factor edit box.
Quality factor Edit box | Displays the Quality factor. Type in a value, or use the slider bar.

Table 2. DICOM Compression Tab description

LEAD MPEG2 Compression property page

The following page appears when the input data is MPEG2:

Figure 3. DICOM Compression Tab

Control | Description
MPEG-2 Stream DICOM compatibility Drop-down list box: | Sets the MPEG2 DICOM compatibility option, which specifies how to handle MPEG2 encoder settings when they conflict with the DICOM standard. Possible values are:
 | Value | Meaning
 | Force | Force MPEG2 encoder settings to be compatible with the MPEG2 DICOM standard. Return an error code if the audio stream is not compatible with the DICOM standard. Accepts MPEG1 audio with these frequencies: 32KHz, 44.1KHz, 48KHz.
 | Ignore | Do not change the MPEG2 encoder settings if they are not compatible with the MPEG2 DICOM standard. Tolerate audio compression settings that are not compatible with the MPEG2 standard (accepts MPEG audio with these frequencies: 16KHz, 22.05KHz, 24KHz, 32KHz, 44.1KHz, 48KHz.
 | Stop Graph | Stop the graph if the MPEG2 encoder settings are not compatible with the MPEG2 DICOM standard. Return an error code if the audio stream is not compatible with the DICOM standard. Accepts MPEG1 audio with these frequencies: 32KHz, 44.1KHz, 48KHz.

Table 3. DICOM Compression Tab description


ILTDicWrt Interface

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

ILTDicWrt Interface

This is the interface for the LEAD DICOM Writer.

Interface Properties

HRESULT put_DICOMTemplateFile(const OLECHAR *pszFileName)

Parameters

pszFileName

Pointer to an OLECHAR string that contains the input DICOM template file.

Description

Use this function to specify an input template file name. The template file will be used to fill all of the data elements except for the ImagePixel element, which will be filled from the source stream. This function does not affect DICOM file creation when it is done by inserting one-s own DICOM dataset using the SetDicomDS() function. To use the assigned DICOM class as a source for all data elements except for the ImagePixel data if no user data has been set, set pszFileName to NULL so the function will set the input template file name to blank. The function fails under the following conditions:

  • during streaming

  • if the file does not exist

  • if the file is not a valid DICOM File

  • if the length of the file name exceeds 260 characters.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_DICOMTemplateFile(OLECHAR **ppszFileName)

Parameters

ppszFileName

Address of a pointer to the returned DICOM input template file name.

Description

Retrieves the file name of the input template. The function allocates memory for this pointer. It is the responsibility of the user to free it using SysFreeString().

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT put_OutputFileName(const OLECHAR *pszFileName)

Parameters

pszFileName

Pointer to an OLECHAR string that contains the name of the output DICOM template file.

Description

Sets the name of the file to which the DICOM dataset will be saved.

If pszFileName is NULL, the function sets the output file name to blank. At save time if the output file name is blank, a temporary file name is generated and the user is informed about it. The output file name can be the same as the input template file name. If the output file already exists, its contents will be replaced. The function fails under the following conditions:

  • during streaming

  • if the length of the file name exceeds 260 characters.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_OutputFileName(OLECHAR **ppszFileName)

Parameters

ppszFileName

Address of a pointer to the returned DICOM output file name.

Description

Retrieves the output file name. The function allocates memory for this pointer and it is the user responsibility to free it using SysFreeString().

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT put_DefaultDICOMClass(int nDICOMClass)

Parameters

nDICOMClass | The class type of the dataset to be initialized. Possible values depend on whether the input stream is MPEG2, as follows:
 | Input Stream is MPEG2 | Input Stream is not MPEG2
 | VL_ENDOSCOPIC_IMAGE_STORAGE | NM_IMAGE_STORAGE
 | VL_MICROSCOPIC_IMAGE_STORAGE | US_MULTI_FRAME_IMAGE_STORAGE
 | VL_PHOTOGRAPHIC_IMAGE_STORAGE | XA_IMAGE_STORAGE
 | SC_MULTI_FRAME_TRUE_COLOR_IMAGE_STORAGE | XRF_IMAGE_STORAGE
 |  | SC_MULTI_FRAME_GRAYSCALE_BYTE_IMAGE_STORAGE
 |  | SC_MULTI_FRAME_GRAYSCALE_WORD_IMAGE_STORAGE
 |  | SC_MULTI_FRAME_TRUE_COLOR_IMAGE_STORAGE
 |  | UNKNOWN

Description

Sets the default DICOM class that will be used to set the DICOM output file data elements except for the ImagePixel data. This function will not affect the DICOM file creation if you insert your own DICOM dataset using the SetDicomDS() function, or if the input template file is set.

This function always fails during streaming.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_DefaultDICOMClass(int *nDICOMClass)

Parameters

nDICOMClass | Pointer to a variable that will receive the class type used to initialize the DICOM dataset. Possible values depend on whether the input stream is MPEG2, as follows:
 | Input Stream is MPEG2 | Input Stream is not MPEG2
 | VL_ENDOSCOPIC_IMAGE_STORAGE | NM_IMAGE_STORAGE
 | VL_MICROSCOPIC_IMAGE_STORAGE | US_MULTI_FRAME_IMAGE_STORAGE
 | VL_PHOTOGRAPHIC_IMAGE_STORAGE | XA_IMAGE_STORAGE
 | SC_MULTI_FRAME_TRUE_COLOR_IMAGE_STORAGE | XRF_IMAGE_STORAGE
 |  | SC_MULTI_FRAME_GRAYSCALE_BYTE_IMAGE_STORAGE
 |  | SC_MULTI_FRAME_GRAYSCALE_WORD_IMAGE_STORAGE
 |  | SC_MULTI_FRAME_TRUE_COLOR_IMAGE_STORAGE
 |  | UNKNOWN

Description

Retrieves the DICOM class used to construct the output file data elements except for the ImageData element. If nDICOMClass is NULL the function fails.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_InputPinStreamingState(int * pbStreaming)

Parameters

pbStreaming | Pointer to a variable that will receive the streaming state of the input pin. Possible values are:
 | Value | Meaning
 | TRUE | The input pin is streaming.
 | FALSE | The input pin is stopped.

Description

Retrieves the input pin streaming state.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT get_DicomDS(long * pDS)

Parameters

pDS

Address of a pointer to the returned dataset.

Description

Retrieves the currently initialized DICOM dataset. Typecast this pointer to LDicomDS before using it. Be careful not to use this DICOM dataset if it becomes invalid or after it is destroyed. If you insert your own DICOM dataset into the filter using the SetDicomDS() function with the bCopy flag set to FALSE, it is safe to use this dataset even after the termination of the filter, since the filter will not destroy the original, user-defined DICOM dataset.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT put_CompressionFormat(int nFormat)

Parameters

nFormat | An integer enumerator that sets the compression type for the pixel data in the DICOM file. Possible values are:
 | Value | Meaning
 | COMP_UNCOMPRESSED | Do not use compression.
 | COMP_LOSSLESSJPEG | Use lossless JPEG compression.
 | COMP_JPEG422 | Use JPEG 4:2:2 compression.
 | COMP_JPEG2000 | Use JPEG 2000 compression.
 | COMP_LOSSLESSJPEG2000 | Use Lossless JPEG 2000 compression.

Description

This function sets the compression type to be used for the pixel data in the DICOM file. The allowed compression types are JPEG lossless, JPEG 4:2:2, and uncompressed. The JPEG lossless and JPEG 4:2:2 compression types need either the YUY2, or UYVY input media type.

Returns

S_OK | SUCCESS
E_INVALIDARG | The input pointer is invalid.

HRESULT get_CompressionFormat(int *pnFormat)

Parameters

pnFormat | An integer enumerator that indicates which compression type for the pixel data in the DICOM file is being used. Possible values are:
 | Value | Meaning
 | COMP_UNCOMPRESSED | No compression is being used.
 | COMP_LOSSLESSJPEG | Lossless JPEG compression is being used.
 | COMP_JPEG422 | JPEG 4:2:2 compression is being used.
 | COMP_JPEG2000 | JPEG 2000 compression is being used.
 | COMP_LOSSLESSJPEG2000 | Lossless JPEG 2000 compression is being used.

Description

This function returns a value that indicates which compression type is being used for the pixel data in the DICOM file.

Returns

S_OK | SUCCESS
E_FAIL. | An error occurred.

HRESULT put_CompressionQuality(int nQFactor)

Parameters

nQFactor

An integer value that represents the compression quality to be used for the file.

Description

Sets the compression quality that will be used. The compression quality is the factor that balances the compression ratio with the quality: more compression means less quality. Possible values range from 2 to 255. Values out of this range will be rejected. An nQFactor of 2 has the highest quality and lowest compression ratio. As the nQFactor increases, the quality decreases and the compression ratio increases. A nQFactor of 255 has the lowest quality and highest compression ratio.

Returns

S_OK | SUCCESS
E_INVALIDARG. | The input pointer is invalid.

HRESULT get_CompressionQuality(int *pnQFactor)

Parameters

pnQFactor

Pointer to an integer value that indicates what compression quality factor is being used.

Description

Gets the compression quality is being used for the file. The compression quality is the factor that balances the compression ratio with the quality: more compression means less quality. Possible values range from 2 to 255. Values out of this range will be rejected. An nQFactor of 2 has the highest quality and lowest compression ratio. As the nQFactor increases, the quality decreases and the compression ratio increases. An nQFactor of 255 has the lowest quality and highest compression ratio.

Returns

S_OK | SUCCESS
E_INVALIDARG. | The input pointer is invalid.

HRESULT put_MPEG2DicomCompatibilityOption(MPEG2DicomCompatibilityConstants newVal)

Parameters

newVal | An enumerated value that specifies how to handle MPEG2 encoder settings. Possible values are:
 | Value | Meaning
 | MPEG2DICOMCOMP_FORCE | Force MPEG2 encoder settings to be compatible with the MPEG2 DICOM standard.
 | MPEG2DICOMCOMP_IGNORE | Do not change the MPEG2 encoder settings if they are not compatible with the MPEG2 DICOM standard.
 | MPEG2DICOMCOMP_STOPGRAPH | Stop the graph if the MPEG2 encoder settings are not compatible with the MPEG2 DICOM standard.

Description

Sets the MPEG2 DICOM compatibility option, which specifies how to handle MPEG2 encoder settings that conflict with the DICOM standard.

Returns

S_OK | SUCCESS
E_INVALIDARG | The input pointer is invalid.

HRESULT get_MPEG2DicomCompatibilityOption(MPEG2DicomCompatibilityConstants *pVal)

Parameters

pVal | A pointer to an enumerated value that specifies how MPEG2 encoder settings are being handled. Possible values are:
 | Value | Meaning
 | MPEG2DICOMCOMP_FORCE | Force MPEG2 encoder settings to be compatible with the MPEG2 DICOM standard.
 | MPEG2DICOMCOMP_IGNORE | Do not change the MPEG2 encoder settings if they are not compatible with the MPEG2 DICOM standard.
 | MPEG2DICOMCOMP_STOPGRAPH | Stop the graph if the MPEG2 encoder settings are not compatible with the MPEG2 DICOM standard.

Description

Gets a value which specifies how to handle MPEG2 encoder settings that conflict with the DICOM standard.

Returns

S_OK | SUCCESS
E_POINTER | An error occurred.

HRESULT get_RasterVersion(int *pnVersion)

Parameters

pnVersion

Pointer to an integer value that indicates which version of the LEADTOOLS raster toolkit is being used.

Description

Gets the version of the raster toolkit that is used by the DICOM writer. The possible values are:

0 | The supporting LEADTOOLS raster DLLs are missing. The DICOM writer will not be able to create any files.
15 | LEADTOOLS 15 DLLs are being used (LTDIC15U.DLL, etc)
16 | LEADTOOLS 16.5 DLLs are being used (LTDICU.DLL, etc)
17 | LEADTOOLS 17 DLLs are being used (LTDICU.DLL, etc)

Returns

S_OK | SUCCESS
E_INVALIDARG. | The input pointer is invalid.

Interface Methods:

HRESULT SetDicomDS(long pDS, long pPixelData, int bAutoSave, int bCopy)

Parameters

pDS | Pointer to the user dataset. This pointer must be allocated or created through LEADTOOLS version 14 or 14.5 binaries, otherwise calls to this method or subsequent calls to other methods inside this interface will fail and in some cases will have an undefined behavior.
pPixelData | Pointer to the PixelData element in the user dataset. If this parameter is NULL, then the filter will find the first PixelData element automatically, and save the input stream to it.
bAutoSave | Value that specifies whether the filter should save the DICOM dataset to a file or just fill the DICOM dataset with the frames (in which case it is the responsibility of the user to save the dataset or do whatever needs to be done with it). Possible values are:
 | Value | Meaning
 | TRUE | Save the DICOM dataset to a file.
 | FALSE | Fill the DICOM dataset with the frames.
bCopy | Value that specifies whether the filter should make a copy of the passed dataset for future usage. Possible values are:
 | Value |
 | TRUE | The filter will make a copy of the dataset, allocating memory for it and maintaining responsibility for freeing this memory.
 | FALSE | The user will take care of the pointer life (and ensure its availability for the Writer as long as it is needed).

Description

Sets the DICOM dataset. This function may fail if it cannot find or insert the PixelData element into the passed dataset. This function always fails during streaming.

Call this method with pDS set to NULL:

  • when the filter no longer needs to use the passed dataset

  • before freeing the dataset's memory.

The DICOM dataset passed to this method must be a LEADTOOLS Version 14 or 14.5 dataset. What this means is pDS must be allocated or created through LEADTOOLS version 14 or 14.5 binaries, otherwise calls to this method or subsequent calls to other methods inside this interface will fail and in some cases will have an undefined behavior.

In general it is not recommended to pass a pointer to a DICOM dataset to an ILTDicWrt Interface. The better approach is to use file names through calls to the put_DICOMTemplateFile and put_OutputFileName methods. When using file names, you can create a template DICOM file populated with the required information (like patient name and ID) and then pass the template to this interface by calling put_DICOMTemplateFile. An alternative method is to populate the resultant DICOM dataset with the proper information at any time and not necessarily before the video and audio data gets captured, below is a list of suggested steps to achieve that:

  1. It is assumed that we already have a DICOM dataset that will get populated with DICOM information before, after or during the capture process. Let-s call this dataset -InputDataSet-.

  2. Create a template DICOM file that doesn-t include any DICOM elements except for Transfer Syntax UID (0002,0010) .You can achieve this by using one of the demos that ship with LEADTOOLS or programmatically by initializing a DICOM dataset of type unknown (CLASS_UNKNOWN) and then saving the dataset as a template.

  3. Call put_DICOMTemplateFile and pass it the name of the template file created in the previous step.

  4. Call put_OutputFileName and pass it a temporary file name (let-s call it -DicomVideoOutput.dcm-).

  5. Capture the video and optionally the audio data into the output file (-DicomVideoOutput.dcm-).

  6. Load -DicomVideoOutput.dcm- into a DICOM dataset, let-s call it -OutputDataSet-.

  7. Copy all the DICOM elements from -InputDataSet- to -OutputDataSet- by calling CopyDS, make sure -OutputDataSet- is the destination and -InputDataSet- is the source.

  8. Now -OutputDataSet- will include both the video (and optionally audio) data and the required DICOM information.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

HRESULT LockDicomDS(int bLock)

Parameters

bLock | Value that indicates whether to lock or unlock the dataset. Possible values are:
 | Value | Meaning
 | TRUE | Lock the dataset.
 | FALSE | Unlock the dataset.

Description

Locks or unlocks the currently initialized DICOM dataset. Locking the dataset will prevent the filter from making any changes to it. If the dataset is not initialized this function will fail unless the dataset is user-defined. Use this feature to block adding any frames to the dataset while streaming.

Returns

S_OK | SUCCESS
< 0 | An error occurred.

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module

See Also

LEAD DICOM Writer (2.0)

LEAD DICOM Writer User Interface (2.0)

IFileSinkFilter Interface


IFileSinkFilter Interface

IFileSinkFilter Interface

Interface methods:

HRESULT SetFileName(LPCOLESTR pszFileName, const AM_MEDIA_TYPE * pmt)

Parameters

pszFileName | Pointer to a string that contains the name of the file to receive the media samples, as an OLESTR type.
pmt | Pointer to an AM_MEDIA_TYPE structure that indicates the type of media samples to be written to the file and the media type of the sink filter's input pin. This parameter is ignored and is provided only for compatibility. Always pass NULL.

Description

Sets the name of the output DICOM file. If pszFileName does not exist, a file by that name will be created. If pszFileName currently exists, the existing file will be overwritten. For more information, refer to the DirectShow 9.0 IFileSinkFilter::SetFileName and AM_MEDIA_TYPE documentation in the DirectX documentation on MSDN.

Returns

ERROR_FILENAME_EXCED_RANGE | The file name is longer than 260 characters, so the name cannot be set.
S_FALSE | The filter is in the streaming state, so the name cannot be set.
E_POINTER | pszFileName is NULL, so the name cannot be set.
S_OK | Success.

HRESULT GetCurFile (LPOLESTR * ppszFileName, AM_MEDIA_TYPE * pmt)

Parameters

ppszFileName | Address of a pointer to a string to be updated with the name of the current file receiving the media samples, as an OLESTR type. The method allocates the memory for the string returned in ppszFileName. The caller must free it by calling CoTaskMemFree.
pmt | Pointer to an AM_MEDIA_TYPE structure to be updated with the type of media samples being written to the file. This parameter can be NULL, in which case the method does not return the media type. If the filter’s input pin is not connected this variable will not be updated. If this method succeeds the caller must free the memory allocated for the structure by calling the FreeMediaType function in the base DirectShow class library.

Description

Gets the name of the current file along with its media type information. For more information, refer to the DirectShow 9.0 IFileSinkFilter::GetCurFile and AM_MEDIA_TYPE documentation in the DirectX documentation on MSDN.

Return

E_OUTOFMEMORY | Insufficient memory.
E_FAIL | No file is open.
E_POINTER | ppszFileName is NULL.
S_OK | Success.

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module

See Also

LEAD DICOM Writer (2.0)

Introduction to the LEAD DICOM Writer

ILTDicWrt Interface

LEAD DICOM Writer User Interface (2.0)


Introduction to the LEADTOOLS DVR Module

DVR Module

The LEADTOOLS DVR Module allows developers to pause, rewind, and fast-forward live streams. Typical sources could be live TV streams, live MPEG2 Transport data streaming or UDP/TCP. Additionally, developers can copy or convert the buffer to another format or DVD. The DVR module supports MPEG-2 Program streams and MPEG-2 Transport stream support is also available. This module consist of two main components:

ILMDVRSink

The LEAD DVR Sink filter uses the LEAD intelligent time-shifting algorithm to write live video/audio streams to disk for playback. Complete control of the buffer size is provided, including support for having the buffer span more than one disk. The LEAD DVR Sink filter should be used in conjunction with the LEAD DVR Source filter.

ILMDVRSource

The LEAD DVR Source filter is used to read video and audio streams from files created by the LEAD DVR Sink filter. This filter allows the LEAD Player Control to play, pause, rewind, and fast forward live streams.

Key Features:

  • Pause DVR

  • Rewind DVR

  • Fast-forward DVR

  • The LEADTOOLS DVR Module adds on to the and includes a fully enabled development license for the following components:

  • Components:

  • MPEG Multiplexers and Demultiplexers:

  • LEAD MPEG-2 Multiplexer

  • LEAD MPEG-2 Program Demultiplexer

  • DVR Filters:

  • LEAD DVR Sink Filter

  • LEAD DVR Source Filter

  • Codecs:

  • LEAD MPEG-2 Decoder (2.0)

  • LEAD MPEG-2 Encoder (3.0)

  • LEAD MPEG-4 Decoder (2.0)

  • LEAD MPEG-4 Encoder (2.0)

  • LEAD H264 Decoder (3.0)

  • LEAD H264 Encoder (4.0)

  • LEAD MPEG Audio Encoder (2.0)

  • LEAD AAC Encoder

  • LEAD AAC Decoder

  • Video Post Processing Filters:

  • LEAD Video Frame Rate Controller Filter

  • LEAD Video Deinterlace Filter

  • LEAD Video Resize Filter

  • LEAD Video Crop Filter

  • LEAD Video Rotation Filter

DirectX 8 or better is recommended, but supports DirectX 7 and earlier.

Obtaining release versions of the DVR Module Components

You need to unlock the LEADTOOLS DVR Module. For more information, refer to Evaluation Mechanism Overview.

In order to deploy the DVR Module, you must sign the for the DVR specialized components and return it to LEAD. You will be provided with unlock instructions to the release versions of any of these filters or codecs which you wish to license when you have signed the appropriate duplication and distribution license. These release editions will not display a licensing dialog box or LEAD text on the video stream. If you have any questions concerning licensing the codecs/filters, you can contact LEAD licensing at licensing@leadtools.com.


ILMDVRSink Interface

ILMDVRSink

Interface Properties:

Type | Name | Description
long | FolderCount | Gets or sets the number of buffer folder locations. Use this to determine the number of DVR buffer folder locations on the system.
BSTR | FolderName( long nFolderIndex) | Gets or sets the name of the fully qualified folder path for the specified buffer location. Use this to determine the full pathname of the specified DVR buffer folder location.
BSTR | BaseName | Gets or sets the name of the base file name of the buffer list file and recording chunk files. Use this to determine the file name of the DVR buffer files.

Interface Methods:

HRESULT GetAvailabilityInfo(double * pStartOffset, double * pEndOffset, double * pTotalSize)

Parameters

pStartOffset | A pointer to a double type that receives the first offset of available video.
pEndOffset | A pointer to a double type that receives the last offset of available video.
pTotalSize | Total size of all video data available.

Description

Gets the availability information for data for the current playback range.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Unexpected invalid file handle.

LTMM_E_DVR_NO_RECORDINGS = No .LRC recording files exist.

LTMM_E_DVR_CORRUPT_STUB_FILE = Corrupted .LBL file.

HRESULT SetBufferSize(long nFolderIndex, long nFiles, double fileSize)

Parameters

nFolderIndex | The index of the desired buffer location.
nFiles | The maximum number of .LRC files allowed to be created in this location.
fileSize | The maximum file size (in bytes) of each individual .LRC file.

Description

Sets the number of buffer (.LRC) files and the allowed size per buffer file for the specified buffer location.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Unexpected invalid file handle

DISP_E_BADINDEX = Index supplied is outside the range of currently valid indexes.

E_INVALIDARG = Either the number of files or file size specified is not valid.

HRESULT GetBufferTotalSize(long nFolderIndex, long uFlags, long * pnFiles, double * pnTotalFileSize)

Parameters

nFolderIndex | The index of the desired buffer location.
uFlags | Flag specifying how to calculate the total size. Values can be: DVRGetTotalSize_Actual = 0x0000 DVRGetTotalSize_Allowed = 0x0001
pnFiles | Total number of files included in the buffer size calculation.
pnTotalFileSize | The total calculated buffer file size.

Description

Sets the number of buffer (.LRC) files and the allowed size per buffer file for the specified buffer location.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Unexpected invalid file handle

DISP_E_BADINDEX = Index supplied is outside the range of currently valid indexes.

HRESULT CopyBufferToFile(BSTR pszTargetFile, double startOffset, double endOffset)

Parameters

pszTargetFile | Fully qualified pathname of destination file.
startOffset | Starting offset of data to copy.
endOffset | Ending offset of data to copy.

Description

Copies the buffered recording data to the specified fully qualified file pathname.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Starting offset not found.

DISP_E_BADINDEX = Index supplied is outside the range of currently valid indexes.

LTMM_E_DVR_NO_RECORDINGS = No .LRC recording files exist.

E_INVALIDARG = Either the number of files or file size specified is not valid.

HRESULT GetStatus(DVRStatusConstants * pStatus, long * pnCurrentFolderIndex, long * pnCurrentRecordingIndex, double * pnCurrentRecordingSize)

Parameters

pStatus | A pointer to an enumeration type that will receive the current DVR status. Returned values can be: DVRStatus_Stopped DVRStatus_Paused DVRStatus_Writing
pnCurrentFolderIndex | A pointer to a long type that will receive the current location index.
pnCurrentRecordingIndex | A pointer to a long type that will receive the current recording index. This index is the number of the current LRC file.
pnCurrentRecordingSize | A pointer to double type that will receive the current recording size in bytes.

Description

Gets the DVRSink status, buffer files location and buffer file index, and total current recording size.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT CreateEvents(long nRegistrationID, long TargetProcessID, OLE_HANDLE * pDataWrittenEvent, OLE_HANDLE * pRecordingListChangedEvent)

Parameters

nRegistrationID | A unique identifier for this event registration.
TargetProcessID | The process id of the event subscriber.
pDataWrittenEvent | A handle to the write event.
pRecordingListChangedEvent | A handle to the list changed event.

Description

Creates the windows event objects used to signal data write and recording list changed events.

Note:This method is now deprecated. You should use CreateEvents2 instead.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_OUTOFMEMORY = Memory allocation error was encountered.

HRESULT CreateEvents2(long nRegistrationID, long TargetProcessID, OLE_HANDLE * pDataWrittenEvent, OLE_HANDLE * pRecordingListChangedEvent, OLE_HANDLE *pOffsetReachedEvent)

Parameters

nRegistrationID | A unique identifier for this event registration.
TargetProcessID | The process id of the event subscriber.
pDataWrittenEvent | A handle to the write event.
pRecordingListChangedEvent | A handle to the list changed event.
pOffsetReachedEvent | A handle to the offset reached event.

Description

Creates the windows event objects used to signal data was written, recording list changed and offset reached events. This method is used internally by the LEAD DVR Source Filter.

The offset reached event is designed to work together with the SetOffsetToReach method.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_OUTOFMEMORY = Memory allocation error was encountered.

HRESULT FreeEvents(long nRegistrationID)

Parameters

nRegistrationID

A unique identifier for this event registration.

Description

Frees the windows event objects used by to signal data write and recording list changed events.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT ResetToDefaultsEx(LMDVRSink_APILEVEL ApiLevel)

Parameters

ApiLevel

The desired API Level for reset.

Value can be:
LMDVRSink_APILEVEL_1

Description

Resets the DVRSink interface object to the default settings for the API level specified.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT GetBufferInfo(long nBufferIndex, BSTR * pszFileName, double * pnUsefulSize, double * pnFileSize, long * pnPlayIndex, long * pnFlags)

Parameters

nBufferIndex | The index of the buffer file for which to get information.
pszFileName | A pointer to a string type that will receive the filename of the related buffer recording file.
pnUsefulSize | A pointer to a double type that will receive the used file size of this recording chunk file.
pnFileSize | A pointer to a double type that will receive the physical file size of this recording chunk file.
pnPlayIndex | A pointer to a long type that will receive the index in the play order (the first index might not be 0, but all files should have sequential and incrementing indexes after the first index value)
pnFlags | A pointer to a long type that will receive a DVRBufferFlagConstant setting. Value can be: DVRBuffer_Empty = 0x0001, DVRBuffer_Writing = 0x0002, DVRBuffer_Finished = 0x0004

Description

Gets the buffer information associated with the buffer file index specified.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_INVALIDARG = Buffer index supplied is outside the range of currently valid indexes.

LTMM_E_DVR_NO_RECORDINGS = No .LRC recording files exist.

E_OUTOFMEMORY = A memory allocation error occurred.

Either the number of files or file size specified is not valid.

HRESULT SetOffsetToReach(long nRegistrationID, double Offset)

Parameters

nRegistrationID | The identifier passed to CreateEvents2 when the offset reached event was created.
Offset | The offset to reach (in bytes). The offset reached event will be set when the DVR sink has written data past this offset. Must be > 0.

Description

Use this method to instruct the DVR sink object to set the offset reached event once it has written data past a certain offset. This method is used internally by the DVR source object.

For example, if an application wants to read N bytes from offset X, then it will do the following:

  1. Reset the offset reached event

  2. Call SetOffsetToReach(X + N)

  3. Use a windows waiting function and wait for the offset reached event to be set. (This of course, assumes the event was created through an earlier call to CreateEvents2.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_INVALIDARG = the registration identifier is invalid or the offset is invalid.

HRESULT StartChangingAttributes ()

Description

This method is used to change the DVRSink attributes.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT StopChangingAttributes(VARIANT_BOOL bCancelChanges)

Parameters

bCancelChanges

A BOOL value type specifying whether to cancel or apply the pending attribute changes.

Description

Sets the DVRSink attributes. Set to VARIANT_FALSE to set the attributes. Use VARIANT_TRUE to discard changes and reset the attributes to their previous settings.

Return

S_OK if successful, S_FALSE otherwise.

Enums

typedef enum
{
DVRStatus_Writing = 0,
DVRStatus_Paused = 1,
DVRStatus_Stopped = 2
} DVRStatusConstants;

typedef enum
{
LMDVRSink_APILEVEL_1 = 0,
} LMDVRSink_APILEVEL;


ILMDVRSource Interface

ILMDVRSource

Interface Properties:

Type | Name | Description
long | FolderCount | (Read only) Gets the number of buffer folder locations. Use this to determine the number of DVR buffer folder locations on the system.
BSTR | FolderName( long nFolderIndex) | (Read only) Gets the name of the fully qualified folder path for the specified buffer location. Use this to determine the full pathname of the specified DVR buffer folder location.

Interface Methods:

HRESULT GetAvailabilityInfo(double * pStartOffset, double * pEndOffset, double * pTotalSize)

Parameters

pStartOffset | A pointer to a double type that receives the first offset of available video.
pEndOffset | A pointer to a double type that receives the last offset of available video.
pTotalSize | Total size of all video data available.

Description

Gets the availability information for data for the current playback range.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Unexpected invalid file handle

LTMM_E_DVR_NO_RECORDINGS = No .LRC recording files exist.

LTMM_E_DVR_CORRUPT_STUB_FILE = Corrupted .LBL file.

HRESULT GetBufferTotalSize(long nFolderIndex, long uFlags, long * pnFiles, double * pnTotalFileSize)

Parameters

nFolderIndex | The index of the desired buffer location.
uFlags | Flag specifying how to calculate the total size. Values can be: DVRGetTotalSize_Actual = 0x0000 DVRGetTotalSize_Allowed = 0x0001
pnFiles | Total number of files included in the buffer size calculation.
pnTotalFileSize | The total calculated buffer file size.

Description

Sets the number of buffer (.LRC) files and the allowed size per buffer file for the specified buffer location.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Unexpected invalid file handle

DISP_E_BADINDEX = Index supplied is outside the range of currently valid indexes.

HRESULT CopyBufferToFile(BSTR pszTargetFile, double startOffset, double endOffset)

Parameters

pszTargetFile | Fully qualified pathname of destination file.
startOffset | Starting offset of data to copy.
endOffset | Ending offset of data to copy.

Description

Copies the buffered recording data to the specified fully qualified file pathname.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Starting offset not found.

DISP_E_BADINDEX = Index supplied is outside the range of currently valid indexes.

LTMM_E_DVR_NO_RECORDINGS = No .LRC recording files exist.

E_INVALIDARG = Either the number of files or file size specified is not valid.

HRESULT ReadData(double startOffset, long minSize, long maxSize, DWORD dwUserData, BYTE * pData, long * pSizeRead)

Parameters

startOffset | A double value indicating the starting offset for the read operation.
minSize | A long value specifying the minimum size to read.
maxSize | A long value specifying the maximum size to read.
dwUserData | Reserved.
pData | A pointer to a block of memory that will receive the read data.
pSizeRead | A pointer to a long type that will receive the size of the read data.

Description

Reads DVR data from the specified offset.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_UNEXPECTED = Unexpected invalid file handle

LTMM_E_DVR_DISCARDED_DATA = Data has been discarded due to a restart.

LTMM_E_DVR_CORRUPT_STUB_FILE = Corrupted .LBL file.

HRESULT ResetToDefaultsEx(LMDVRSink_APILEVEL ApiLevel)

Parameters

ApiLevel

The desired API Level for reset.

Value can be:
LMDVRSink_APILEVEL_1

Description

Resets the DVRSink interface object to the default settings for the API level specified.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT GetBufferInfo(long nBufferIndex, BSTR * pszFileName, double * pnUsefulSize, double * pnFileSize, long * pnPlayIndex, long * pnFlags, BSTR * pszStubFilePathName)

Parameters

nBufferIndex | The index of the buffer file for which to get information.
pszFileName | A pointer to a string type that will receive the filename of the related buffer recording file.
pnUsefulSize | A pointer to a double type that will receive the used file size of this recording chunk file.
pnFileSize | A pointer to a double type that will receive the physical file size of this recording chunk file.
pnPlayIndex | A pointer to a long type that will receive the index in the play order (the first index might not be 0, but all files should have sequential and incrementing indexes after the first index value)
pnFlags | A pointer to a long type that will receive a DVRBufferFlagConstant setting. Value can be: DVRBuffer_Empty = 0x0001, DVRBuffer_Writing = 0x0002, DVRBuffer_Finished = 0x0004
pszStubFilePathName | A pointer to a string type that will receive the fully qualified path name to the .LBL file.

Description

Gets the buffer information associated with the buffer file index specified.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

E_INVALIDARG = Buffer index supplied is outside the range of currently valid indexes.

LTMM_E_DVR_NO_RECORDINGS = No .LRC recording files exist.

E_OUTOFMEMORY = A memory allocation error occurred.

Either the number of files or file size specified is not valid.

Enums

typedef enum
{
LMDVRSource_APILEVEL_1 = 0,
} LMDVRSource_APILEVEL;


LEAD Windows Media Reader

LEAD Windows Media Reader

The LEAD Windows Media Reader is a DirectShowÒ source filter for parsing Windows Media Files. It is especially useful for playing Windows Media files under Vista from a URL.

This filter supports the standard IFileSourceFilter interface. Use the IFileSourceFilter::Load method to let the LEAD Windows Media Reader filter know where to read the data from. Please see the Microsoft documentation for this interface for more information.

The LEADTOOLS Multimedia toolkit will automatically use this filter (if it is available) to play Windows Media from a URL. This filter is required for playing Windows Media files from a URL under Vista because there is no alternate filter that would provide this functionality in Vista. There was a Windows Media Source filter provided by Microsoft with XP and earlier operating systems, but that filter has been discontinued starting with Vista.

Technical details for the filter are provided in the following table:

Filter Interfaces | ILMWMReader, IFileSourceFilter
Interface ID | IID_ILMWMReader, IID_IFileSourceFilter
Input Media Types | N/A
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12 MEDIASUBTYPE_YVYU MEDIASUBTYPE_NV12 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555 MEDIASUBTYPE_RGB8 Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_PCM
Filter CLSID | CLSID_LMWMReader
Property Page CLSID | N/A
Executable | LMWMReader.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | ILMWMReader.h

Platforms

Win32, x64


ILMWMReader Interface

ILMWMReader Interface

This is the interface for the LEAD Windows Media Reader filter.

Data types:

LMWMReader_APILEVEL:

typedef enum
{
LMWMReader_APILEVEL_1 = 0,
} LMWMReader_APILEVEL;

Constant | Description
LMWMReader_APILEVEL_1 | Use the defaults from the current version of the filter.

Properties:

Type | Name | Description
double | BufferingTime | The amount of data buffered before rendering (in seconds).

Interface Methods

HRESULT GetBufferingProgress(long *pPercent, double *pTimeLeft)

Parameters

pPercent | Pointer to a variable that will be updated with the amount of data buffered so far (as a percentage value between 0 and 100).
pTimeLeft | Pointer to a variable to be updated with the estimated number of seconds until the buffering is complete.

Description

Call this while buffering to get information on the buffering process. If you call this before buffering has started, the percentage reported might be 0. If you call this after buffering has finished, the percentage reported might be 100.

You should call this function only after your application received the EC_BUFFERING_DATA (0x11) event notification.

Returns

S_OK if succeeded, < 0 error code otherwise.

HRESULT StopBuffering()

Parameters

None.

Description

Stop buffering and start playback as soon as possible. Note that the behaviour depends on the Windows Media components. The playback might still not start right away.

Returns

S_OK if succeeded, < 0 error code otherwise.

HRESULT ResetToDefaultsEx (LMWMReader_APILEVEL ApiLevel)

Parameters

ApiLevel

Determines which default values to use.

Description

Resets the filter to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to LMWMReader_APILEVEL_1 = 0.

The Windows Media Reader might change in the future and have different properties or default behaviour. Calling this method ensure the filter will have the same default values as they were at the time you developed your application.

It is recommended you call ResetToDefaultsEx(LMWMReader_APILEVEL_1) before you start setting properties and start calling other methods for this interface.

Returns

S_OK if succeeded, < 0 error code otherwise.


A module that combines audio and video into one file.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-1 Multiplexer (2.0)

The LEAD MPEG-1 Multiplexer filter can be used to create MPEG-1 files. This filter requires compression compatible with MPEG-1 Audio and MPEG-1 Video compression. We recommend using the LEAD MPEG Audio Encoder and LEAD MPEG2 Video Encoder in conjunction with this filter.

This encoder is provided in an evaluation form. For more information, refer to Evaluation Versions of Multimedia Filters and Codecs.

Filter Interfaces

N/A

Interface ID

N/A

Input Media Types

Video
Type:
MEDIATYPE_Video
Subtypes:
MEDIATYPE_MPEG1Video
MEDIASUBTYPE_MPEG1Payload

Audio
Type:
MEDIATYPE_Audio
Subtypes:
MPEG1AudioPayload
MEDIASUBTYPE_MPEG1Audio
FORMAT_WaveFormatEx (WAVE_FORMAT_MPEGLAYER3 format)

Output Media Types

Type:
MEDIATYPE_Stream
Subtype:
MEDIATYPE_MPEG1System

Filter CLSID

CLSID_LMMpeg1Mux

Property Page CLSID

N/A

Executable

LMMpg1Mx2.dll, DSKernel2.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

N/A

Platforms

Win32, x64

This filter is included as part of the following modules:

LEADTOOLS DVD Module for API

LEADTOOLS DVD Module for COM

LEAD MPEG-2 Video Encoder Module

LEAD MPEG-2 Video Codec Module


A module that combines audio and video into one file.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The LEAD AC3 Audio Codec is a DirectShow filter that supports the encoding of audio streams using the AC3 standard. The LEAD AC3 encoder provides options to control the quality and the number of output channels. AC3 is a 5.1 format, which means that it provides five full bandwidth channels: front left, front right, center, surround left, and surround right. A low-frequency effect (LFE) channels is included for the sound needed for special effects and action sequences in movies. AC3 also has a downmixing feature that ensures compatibility with devices that do not support the 5.1 format.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-2 Multiplexer (2.0)

The LEAD MPEG-2 Multiplexer can be used to create MPEG-2 program files.

The compressions supported for video are:

  • MPEG-1 Video compression

  • MPEG-2 Video compression

  • MPEG-4 Video compression

  • H.264 Video compression

The compressions supported for audio are:

  • MPEG-1 Audio compression (Layer 2 or Layer 3)

  • AC3 Audio compression (preferred audio compression for DVD)

  • LPCM Audio format (uncompressed audio used for DVD)

  • AAC Audio compression (preferred audio compression for MP4 files)

There are two main reasons to create MPEG-2 program files:

  • To create MPEG-2 files for file interchange purposes. In this case, it is recommended to use the LEAD MPEG Audio Encoder and LEAD MPEG2 Video Encoder to compress the data.

  • To create MPEG-2 files for creating a DVD out of them. In this case, we recommend you to use the LEAD AC3 Audio Encoder and LEAD MPEG2 Video Encoder to compress the data.

This encoder is provided in an evaluation form. For more information, refer to Evaluation Versions of Multimedia Filters and Codecs .

Filter Interfaces

N/A

Interface ID

N/A

Input Media Types

Video
Type:
MEDIATYPE_Video
Subtypes:
MEDIATYPE_MPEG1Video
MEDIASUBTYPE_MPEG1Payload
MEDIASUBTYPE_MPEG2_VIDEO
MEDIASUBTYPE_mp4v
MEDIASUBTYPE_MP4V
MEDIASUBTYPE_h264
MEDIASUBTYPE_L264
MEDIASUBTYPE_avc1

Audio
Type:
MEDIATYPE_Audio
Subtypes:
MPEG1AudioPayload
MEDIASUBTYPE_MPEG1Audio
FORMAT_WaveFormatEx (WAVE_FORMAT_MPEGLAYER3 format)
MEDIASUBTYPE_MPEG2_AUDIO
MEDIASUBTYPE_DOLBY_AC3
MEDIASUBTYPE_DVD_LPCM_AUDIO
MEDIASUBTYPE_AAC

Output Media Types

Type:
MEDIATYPE_Stream
Subtype:
MEDIATYPE_MPEG2_PROGRAM

Filter CLSID

CLSID_LMMpg2Mx2

Property Page CLSID

N/A

Executable

LMMpg2Mx2.dll , DSKernel2.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

N/A

Platforms

Win32, x64

This filter is included as part of the following modules:

LEADTOOLS DVD Module

LEAD MPEG-2 Video Encoder Module

LEAD MPEG-2 Video Codec Module


LEAD MPEG2 Transport Multiplexer

LEAD MPEG2 Transport Multiplexer

The LEAD MPEG2 Multiplexer can be used to create MPEG-2 Transport content, as defined in ISO/IEC 13818-1. This data can be saved to files or it can be streamed using UDP or TCP streaming. MPEG2 transport streams may contain video, audio and metadata information.

The compressions supported for video are:

  • MPEG-1 Video compression

  • MPEG-2 Video compression

  • MPEG-4 Video compression

  • H.264 Video compression

The compressions supported for audio are:

  • MPEG-1 Audio compression (Layer 2 or Layer 3)

  • AC3 Audio compression (preferred audio compression for DVD)

  • LPCM Audio format (uncompressed audio used for DVD)

  • AAC Audio compression (preferred audio compression for MP4 files)

The multiplexer also supports metadata associated with the stream (usually in KLV form). The filter also provides the ILMKlvBuilder interface, which can be used to build KLV private data conforming to SMPTE 336M-2001.

To stream MPEG-2 content, you will need to use the LEAD MPEG2 Transport UDP Sink filter.

MPEG-2 Transport content is widely used for streaming video and audio from satellite TV and from remote cameras. Most cameras in Unmanned Aerial Vehicles (UAVs) stream video in MPEG-2 Transport format.

This multiplexer is provided in evaluation form. For more information, refer to Evaluation Versions of Multimedia Filters and Codecs.

Filter Interfaces

ILMMpg2MxT
ILMKlvBuilder

Interface ID

ILMMpg2MxT
ILMKlvBuilder

Input Media Types

Video
Type:
MEDIATYPE_Video
Subtypes:
MEDIATYPE_MPEG1Video
MEDIASUBTYPE_MPEG1Payload
MEDIASUBTYPE_MPEG2_VIDEO
MEDIASUBTYPE_mp4v
MEDIASUBTYPE_MP4V
MEDIASUBTYPE_h264
MEDIASUBTYPE_L264
MEDIASUBTYPE_avc1

Audio
Type:
MEDIATYPE_Audio
Subtypes:
MPEG1AudioPayload
MEDIASUBTYPE_MPEG1Audio
FORMAT_WaveFormatEx (WAVE_FORMAT_MPEGLAYER3 format)
MEDIASUBTYPE_MPEG2_AUDIO
MEDIASUBTYPE_DOLBY_AC3
MEDIASUBTYPE_DVD_LPCM_AUDIO
MEDIASUBTYPE_AAC

Output Media Types

Type:
MEDIATYPE_Stream
Subtype:
MEDIATYPE_MPEG2_TRANSPORT

Filter CLSID

CLSID_LMMpeg2TMux

Property Page CLSID

N/A

Executable

LMMpg2MxT.dll, DSKernel2.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

N/A

Platforms

Win32, x64


ILMKlvBuilder Interface

ILMKlvBuilder Interface

The ILMKlvBuilder interface is provided by the LEAD MPEG-2 Transport Multiplexer to simplify the task of parsing KLV data. It can be obtained from the multiplexer by reading the ILMMpg2MxT::KlvBuilder property.

Data types:

typedefenum Mpg2MxT_SearchKey
{
Mpg2MxT_SearchKey_Exact = 1, /* Find only the exact key. The key version number must match. */
Mpg2MxT_SearchKey_AnyVersion = 2, /* Ignore the version number when doing the search. */
Mpg2MxT_SearchKey_DesignatorOnly = 3, /* Find the key by the designator only. Ignore the key representation and version number */
} Mpg2MxT_SearchKey;

typedefenum Mpg2MxT_Errors
{
Mpg2MxT_E_KEY_NOT_FOUND = 0x80050010, /* The KLV data was not found */
Mpg2MxT_E_BAD_KEY = 0x80050011, /* The KLV key is bad */
} Mpg2MxT_Errors;

Interface Properties:

Type | Name | Description
long | Count | The number of complete top-level KLV keys contained in the internal interface buffer. An incomplete KLV key will not be included in the count.

Interface Methods:

HRESULT AddData(VARIANT Data, long lDataLengh);

Parameters

Data | Variant containing the private data.
DataLength | The size of data contained in Data.

Description

Use this method to begin building private data containing KLV packets. It is particularly useful from ILMMpgDmxCallback::DataAvailable when processing a source file containing KLV data. Build up the KLV data using this method and then edit the individual keys afterwards. This method appends the supplied data to the internal buffer. You should call the Clear method to restart the process. The Data parameter must contain a pointer to a byte array. The AddData method uses the smaller of the DataLength parameter and the actual array size.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_POINTER [0x80004003] Data is NULL

E_INVALIDARG [0x80070057] Data is not a byte array variant

HRESULT CreateSubBuilder(ILMKlvBuilder** ppBuilder);

Parameters

ppBuilder

A pointer to a location to store a new builder interface pointer.

Description

Creates an independent builder for constructing subkeys.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | [0x80004003] ppBuilder is NULL

HRESULT DeleteKey(long keyIndex);

Parameters

keyIndex

The index of the key to delete. The index is 0-based, so allowed values are 0..Count - 1.

Description

Deletes an existing key.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
DISP_E_BADINDEX | [0x8002000B] keyIndex is invalid.

HRESULT FindKey(VARIANT KeyToFind, long searchFlags, VARIANT *pKey, VARIANT *pKeyData, long *pDataSize);

Parameters

KeyToFind | Variant describing which key to look for.
searchFlags | One of the flags in the Mpg2MxT_SearchKey enumeration. These flags tell the parser how whether the match should be exact or not.
pKey | Pointer to a VARIANT that will be updated with a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in pKeyData.
pKeyData | Pointer to a VARIANT that will be updated key data. The key data will be a byte array variant regardless of the real format of the key data.
pDataSize | Pointer to a long variable that will be updated with the number of bytes stored in pKeyData. This is the same as the size of the pKeyData variant.

Description

Use searchFlags to specify whether you require an exact match for the key for which you are looking. Possible values for searchFlags are:

Mpg2MxT_SearchKey_Exact | An exact match is required. All 16 bytes of the key must match.
Mpg2MxT_SearchKey_AnyVersion | For a match to be acceptable, all key bytes must match, with the exception of the version key (the 7th byte).
Mpg2MxT_SearchKey_DesignatorOnly | For a match to be acceptable, the key designator component must match. The key designator is stored in the last 8 bytes of the key.

This function goes through the top keys in the buffer and compares them with the key passed in KeyToFind. If the key from the buffer matches exactly or partially (if permitted by searchFlags), then the key found is stored in pKey, the key data is stored in pKeyData and the key length is stored in pDataSize.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | [0x80004003] pKey, pKeyData or pDataSize is NULL.
Mpg2MxT_E_KEY_NOT_FOUND | [0x80050010] There is no key matching KeyToFind and searchFlags.
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the pKey or pKeyData variants.

HRESULT FindKeyStr(BSTR KeyToFind, long searchFlags, VARIANT *pKey, VARIANT *pKeyData, long *pDataSize);

Parameters

KeyToFind | String describing which key to look for.
searchFlags | One of the flags in the Mpg2MxT_SearchKey enumeration. These flags tell the parser whether the match should be exact or not.
pKey | Pointer to a VARIANT that will be updated with a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in pKeyData.
pKeyData | Pointer to a VARIANT that will be updated key data. The key data will be a byte array variant regardless of the real format of the key data.
pDataSize | Pointer to a long variable that will be updated with the number of bytes stored in pKeyData. This is the same as the size of the pKeyData variant.

Description

This method works exactly like FindKey, except that the key to search for is passed as a string, rather than a VARIANT.

KeyToFind is a string containing a hexadecimal representation of the bytes in the key. Each byte should be represented by two hexadecimal digits. Each digit can be:

  • '0'..'9' or

  • 'a'..'.f' or

  • 'A'..'F'

Space characters are ignored. For example, "06 0E 2B 34 01 0101 04 07 02 01 0101 05 00 00"; is equivalent to "060E2B34010101040702010101050000".

For more information on each parameter, see the description for FindKey.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | [0x80004003] pKey, pKeyData or pDataSize is NULL.
Mpg2MxT_E_KEY_NOT_FOUND | [0x80050010] There is no key matching KeyToFind and searchFlags.
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the pKey or pKeyData variants.
Mpg2MxT_E__BAD_KEY | [0x80050011] The key string is invalid: the key string should contain a hexadecimal representation of a 16-byte value, with 2 digits per byte (32 digits total).

HRESULT GetData(VARIANT* pData);

Parameters

Data

Pointer to a variant that is filled with a byte array copy of the current data.

Description

Creates a copy of the current data.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_POINTER [0x80004003] Data is NULL

E_OUTOFMEMORY [0x80070057] The array for the copy could not be allocated.

HRESULT GetKey(long keyIndex, VARIANT *pKey, VARIANT *pKeyData, long *pDataSize);

Parameters

keyIndex | The index of the key to retrieve. The index is 0-based, so allowed values are 0..Count - 1
pKey | Pointer to a VARIANT that will be updated with a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in pKeyData.
pKeyData | Pointer to a VARIANT that will be updated key data. The key data will be a byte array variant regardless of the real format of the key data.
pDataSize | Pointer to a long variable that will be updated with the number of bytes stored in pKeyData. This is the same as the size of the pKeyData variant.

Description

Use this method to enumerate all the keys contained in a private data sample. This method enumerates all the data passed to AddData.

The method allocates data for the pKey and pKeyData variants. You should make sure you free the memory allocated in these variants if your programming language does not do so automatically. For example, VB automatically frees this memory, but C/C++ does not. In C++, you free the variant memory by calling VariantClear. Please consult the documentation for your programming language for more information on how to free the variant data.

You should examine pKey to find out how to interpret the key data. The IKlvBuilder will not interpret the key data for you. There is not a single document describing all the KLV keys that you might find in a stream. You will find various documents describing certain lists of currently defined keys. But each company that generates MPEG-2 transport streams or files might write their own internal keys in a private data stream. At the time of writing this documentation, the following documents contained information on KLV keys and how to interpret their content:

  • UAV Datalink Local Metadata Set (EG 0601 12 Jan 2006)

  • Predator UAV Basic Universal Metadata Set (MISB EG 0104.4 25 August 2005)

Based on information on this and other documents that you might find, you should interpret the key data accordingly. For example:

Key: 06 0E 2B 34 01 0101 04 07 02 01 0101 05 00 00

Is a "User Defined Time Stamp (microseconds since 1970)" in msb bit order and that the key should be 8 bytes long. In this case, you should verify that *pDataSize is 8. If *pDataSize is 8, you should convert the 8-byte array into a 64-bit unsigned integer (or a double floating point if your programming language does not support 64-bit integers). You would then convert the 64-bit value into a date and time by counting the microseconds since 1970.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
DISP_E_BADINDEX | [0x8002000B] keyIndex is invalid (< 0).
E_POINTER | [0x80004003] pKey, pKeyData or pDataSize is NULL.
Mpg2MxT_E_KEY_NOT_FOUND | [0x80050010] The key was not found (keyIndex >= Count).
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the pKey or pKeyData variants.

HRESULT InsertKey(long keyIndex, VARIANT Key, VARIANT KeyData, long DataSize);

Parameters

keyIndex | The index of the keys insertion point. The index is 0-based, so allowed values are 0..Count - 1. However, a special value of -1 will append the key to the end of the current data.
Key | VARIANT a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in KeyData.
KeyData | VARIANT containing key data. The key data will be a byte array variant regardless of the real format of the key data.
DataSize | Long variable describing the number of bytes stored in KeyData. This is the same as the size of the KeyData variant.

Description

Inserts a new key.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
DISP_E_BADINDEX | [0x8002000B] keyIndex is invalid.
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the new data.

HRESULT SetKey(long keyIndex, VARIANT Key, VARIANT KeyData, long DataSize);

Parameters

keyIndex | The index of the key to replace. The index is 0-based, so allowed values are 0..Count - 1
Key | VARIANT a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in KeyData.
KeyData | VARIANT containing key data. The key data will be a byte array variant regardless of the real format of the key data.
DataSize | Long variable describing the number of bytes stored in KeyData. This is the same as the size of the KeyData variant.

Description

Replaces an existing key.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
DISP_E_BADINDEX | [0x8002000B] keyIndex is invalid.
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the new data.


ILMMpg2MxT Interface

ILMMpg2MxT Interface

Data types:

typedefenum Mpg2MxT_WriteFlag
{
Mpg2MxT_WriteFlag_PTSValid = 0x00000001, /* The PTS value is valid */
Mpg2MxT_WriteFlag_PTSInSeconds = 0x00000002, /* The PTS value is specified in seconds */
Mpg2MxT_WriteFlag_UseStreamPTS = 0x00000004, /* The current stream time should be used instead of the provided PTS */
Mpg2MxT_WriteFlag_SyncPoint = 0x00000008, /* The data is a synchronization point, and is seekable */
Mpg2MxT_WriteFlag_Discontinuity = 0x00000010, /* reserved */
} Mpg2MxT_WriteFlags;

Interface Properties:

Type | Name | Description
VARIANT_BOOL | AutoClosePrivateData | Set to VARIANT_TRUE to allow the multiplexer to close the application provided private data stream when the normal audio/video stream has reached its end. Otherwise, the multiplexer will wait until the user has called ClosePrivateData. This is typically set to VARIANT_TRUE in a live capture situation.
VARIANT_BOOL | EnablePrivateData | Set to VARIANT_TRUE to enable the use of application provided private data.
VARAINT_BOOL | IsEndOfStream | A read-only property that indicates whether the multiplexer is at the end of the audio/video streams.
ILMKlvBuilder * | KlvBuilder | A read-only property. Contains a pointer to the multiplexer's default KLVBuilder object. This object can be used to construct KLV-specific private data.
long | PrivateDataFormatID | The 32 bit Format ID used in the application-provided private data&rsquo;s registration descriptor. For example mmioFOURCC('K', 'L', 'V', 'A').
long | PrivateDataPID | The PID of the application-provided private data.
double | ResyncInterval | Specifies the time interval (in seconds) between header packets. This will effectively set the maximum time required for a demultiplexer to start decoding the stream at any given point.

Interface Methods:

HRESULT ClosePrivateData();

Description

Informs the multiplexer that the application will not be providing any more private data. This will allow the multiplexer to properly close the output stream. This method is not required if the AutoClosePrivateData property is set to VARIANT_TRUE.

Returns

S_OK if successful, < 0 if an error occurred.

HRESULT GetPrivateDataFormatInfo(VARIANT* pInfo);

Parameters

pInfo

Pointer to a location to be filled with a byte array containing the user-specified private format information.

Description

Retrieves the information set with SetPrivateFormatInfo.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_POINTER [0x80004003] pInfo is NULL

HRESULT SetPrivateDataFormatInfo(VARIANT Info, long InfoLength);

Parameters

pInfo | Variant containing a byte array with user-specified private format information
InfoLength | The size of the data to be written.

Description

Sets the user-specified private format information. It is used as the additional identification information in the registration descriptor. By default, no additional information is written.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_INVALIDARG [0x80070057] Info is not a byte array variant

HRESULT WritePrivateData(long Flags, double PTS, VARAINT Data, long DataLength);

Parameters

Flags | Long value containing combinations of the Mpg2MxT_WriteFlag constants.
PTS | A double value containing the presentation time stamp of the user-provided data.
Data | A variant containing a byte array of user-provided data.
DataLength | The length of the data to write.

Description

Writes the application-provided data to multiplexer output.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_INVALIDARG [0x80070057] Data is not a byte array variant


LEAD ISO Multiplexer

LEAD ISO Multiplexer

The LEAD ISO Multiplexer can be used to create files based on the ISO BThe LEAD ISO Multiplexer can be used to create files based on the ISO Base File Format described in ISO/IEC 14496-12. The ISO base file format should not be confused with the files used to store CD images or DVD images (which have the .ISO extension).

The ISO Base File Format is used for many common file formats. See the LEAD ISO Demultiplexer page for more details.

The LEAD ISO Multiplexer does not support every video and audio compression. The following compressions are supported:

  • MPEG-4 (MPEG-4 Part 2) video compression

  • H.264 (MPEG-4 Part 10) video compression

  • H.263 video compression

  • AAC audio compression

  • AMR audio compression

  • (PCM) uncompressed audio

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Video Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_mp4v MEDIASUBTYPE_MP4V MEDIASUBTYPE_avc1 MEDIATYPE_ISOBASE ISOMEDIATYPE_mp4v Audio Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_mp4a MEDIATYPE_ISOBASE ISOMEDIATYPE_mp4a
Output Media Types | Type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_LISO
Filter CLSID | CLSID_LMIsoMux
Property Page CLSID | N/A
Executable | LMISOMux.dll , DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | N/A

Platforms

Win32, x64

This filter is included as part of the following modules:

LEADTOOLS Video Streaming Module

LEAD H.264 Video Encoder Module

LEAD H.263 Video Codec Module

LEAD MPEG-4 Video Encoder Module


A module that combines audio and video into one file.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decoder, this is a module or algorithm to decompress data.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Ogg Multiplexer

The Ogg Multiplexer can be used to create Ogg files. This filter will accept any media type (any audio or video compressor). Ogg is a new file format, made popular by Vorbis audio compression .It supports both audio and video from streaming applications and can support almost all audio/video codecs.

Technical details for the filter are provided in the following table:

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Any
Output Media Types | Type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_Ogg
Filter CLSID | CLSID_LMOggMux
Property Page CLSID | CLSID_LMOggMuxPropPage
Executable | LMOggMux.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | N/A

Platforms

Win32, x64


LEAD FLV Multiplexer

Flash format.

A module that combines audio and video into one file.

Available in LEADTOOLS Multimedia toolkits.

LEAD FLV Multiplexer

The LEAD FLV Multiplexer can be used to create Flash Video (FLV) files. This file format is widely used to store video files on web sites. For example, YouTube uses this format.

The LEAD FLV Multiplexer does not support every video and audio compression. The following compressions are supported:

· Sorenson video compression (modified H263 compression)

· Mpeg1 Layer 3 (MP3) audio compression with one the following audio sampling rates: 22.05KHz, 44.1KHz.

· (PCM) uncompressed audio with one the following audio sampling rates: 5.5KHz, 11.025KHz, 22.05KHz, 44.1KHz

Filter Interfaces | None.
Interface ID | None.
Input Media Types | Video Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_S263 Audio Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_PCM MEDIASUBTYPE_MPEG1AudioPayload
Output Media Types | Type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_LFLV
Filter CLSID | CLSID_LMFLVMux
Property Page CLSID | None
Executable | LMFLVMux.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | None.

Platforms

Win32, x64


Programming with the MPEG-2 Transport Demultiplexer

Reduce the streaming start time

Reduce the playback latency

Background update of first and last stream positions

Improving reliability when playing corrupted or noisy H.264 video streams

Reduce the streaming start time

Before playback can start, the MPEG-2 Transport Demultiplexer needs to receive a Program Map packets describing the elementary streams present in the MPEG-2 stream. The MPEG-2 Transport Demultiplexer will then wait until it finds packets of all the streams that it deems to be important. The playback will not start until all the important streams are identified or until a certain amount of data has been received and no packets have been encountered for an elementary stream that has not been properly identified. This can cause undesired delays in starting playback caused by elementary streams which contain packets at rare intervals.

The Demux provides a mechanism through which you can override this default behavior and inform the Demux which streams you do not consider to be important enough to delay the playback for. You may make your application listen for the EC_LOADSTATUS (0x43) DirectShow event, which is sent by the Demux when it detects a Program Map packet containing the number and type of elementary streams. At this point, you can enumerate all the elementary streams using the StreamCount property and the GetStreamInfo method. GetStreamInfo gives you the StreamPID, the StreamType and the descriptors for each elementary stream. In general, stream types of 0x02 indicate an MPEG-2 compressed video stream, 0x10 indicate an MPEG-4 Part 2 compressed video stream and 0x1B indicate an MPEG-2 Part 10 (H.264) compressed video stream. But the video stream can be indicated by other StreamType values as well. Refer to the MPEG-2 documentation (ISO/IEC 13818-1) for a complete list of the possible StreamType values.

You can speed up the start of the playback by setting the StreamFlags property to 0 for all the streams you are not interested in. For example, to start the video playback as soon as possible, you can set the StreamFlags to 0 for all the streams that are not video. But, if you do this, then the streams that are deemed unimportant might not be rendered. For example, you might not get any audio if the demux does not receive any audio packets until the packets containing information about the video characteristics (width, height) are received and processed.

The EC_LOADSTATUS (0x43) event is sent to the graph with lParam1 set to AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED (0x100). EC_LOADSTATUS is a standard DirectShow event. If you do not have it defined in your headers, you can just define it as 0x43. There are two ways of detecting this event, depending on whether you use the API or COM interfaces:

  1. If you use the API interfaces, use IltmmPlay::SetNotifyWindow / IltmmConvert::SetNotifyWindow methods to select which window should receive notification messages. Process the notification event and look for wParam to be set to ltmmPlay_Notify_MediaEvent / ltmmConvert_Notify_MediaEvent. You should then cast lParam to a pointer to a ltmmMediaEvent structure. You have received this event if ltmmMediaEvent.lEventCode is set to EC_LOADSTATUS and ltmmMediaEvent.lParam1 is set to AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED.

  2. If you use the COM interface, then process the ltmmPlayCtrl_MediaEvent or ltmmConvertCtrl_MediaEvent. In this case, EventCode should be set to EC_LOADSTATUS and Param1 should be set to AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED.

C++ example:

#define WM_PLAYERNOTIFY (WM_USER + 1000)

/* Set the notification window and pick the message */

m_player->SetNotifyWindow((long) m_hWnd, WM_PLAYERNOTIFY);

/* Make OnPlayerNotify handle the notification message */

ON_MESSAGE(WM_PLAYERNOTIFY, OnPlayerNotify)

/* Wait for ltmmPlay_Notify_MediaEvent event and see if I have the right one */

LRESULT CMainFrame::OnPlayerNotify(WPARAM wParam, LPARAM lParam)

{

switch(wParam)

{

case ltmmPlay_Notify_MediaEvent:

{

ltmmMediaEvent *pEventParams = (ltmmMediaEvent *)lParam;

if(pEventParams && pEventParams->lEventCode == EC_LOADSTATUS && pEventParams->Param1 == AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED)

{

ILMMpgDmx *pMpgDmx = GetMPEG2DemuxInterface();

if(pMpgDmx)

{

MarkNonVideoStreamsUnimportant(pMpgDmx);

pMpgDmx->Release();

}

}

}

}

return 0;

}

HRESULT MarkNonVideoStreamsUnimportant(ILMMpgDmx *pMpgDmx)

{

HRESULT hr;

char s[200];

long nStreamCount;

hr = pMpgDmx->get_StreamCount(&nStreamCount);

if(SUCCEEDED(hr))

for(int i = 0; i < nStreamCount; i++)

{

long nStreamPID, nStreamType;

VARIANT descriptor;

hr = pMpgDmx->GetStreamInfo(i, &nStreamPID, &nStreamType, &descriptor);

if(SUCCEEDED(hr))

if(nStreamType != 0x02 && nStreamType != 0x10 && nStreamType != 0x1B)

{

/* mark this stream as unimportant, because I want to start streaming as soon as possible */

hr = pMpgDmx->put_StreamFlags(nStreamPID, 0);

}

}

return hr;

}

Reduce Playback Latency

If your application needs to be as close to Live as possible, set the AutoLive property to VARIANT_TRUE. Set the AutoLiveTolerance property to the maximum amount of time (in seconds) and you can be Live behind. But keep in mind that setting a low tolerance might cause jerky playback if the demux has to constantly jump ahead to keep up with the live stream. The comparison to Live is done at regular intervals set determined by the DurationCheckInterval property. See the discussion about background updating of first and last stream positions below.

Background update of the first and last stream position

When running in DVR mode, the demux is recalculating the first and last positions of the current stream using a background thread. The frequency of these checks is indicated by the DurationCheckInterval property. Every DurationCheckInterval seconds, the demux will read the first data in the stream and update the internal first stream position if necessary. After DurationCheckInterval more seconds, it will update the internal last stream position in. DurationCheckInterval seconds later, it will update the internal first stream position again, then the last position and so on. But keep in mind it updates only the internal first and last stream positions, not also the values of the FirstStreamTime/FirstStreamPTS/FirstStreamOffset properties. The values returned by those properties are updated from these internal values only when you call the RefreshPosition method. The reason for that is to make sure the all stream position properties are synchronized and are taken at the same point in time (when RefreshPosition is called). If you never call RefreshPosition, the stream position properties will have outdated values.

There is some penalty hit whenever this thread checks the first and last positions, so you do not want to set DurationCheckInterval to a value that is too low, otherwise the playback might become jerky. If you are not interested in these properties and want to disable this background thread, just set DurationCheckInterval to a really high value.

This background thread should run at regular intervals when you want the auto live feature to work. The auto live feature works by checking the last stream position every time it is updated by the background thread. But the check for the last position is expensive (it can take a long time), hence sometimes the demux gives up trying to update it. It may do that when it cannot find the last position in a certain amount of bytes and will try again next when it is time to update the last stream position. This is the reason why sometimes the last stream position may stay unchanged for a while and then jump ahead more than the usual. The jump in this situation is done to maintain optimal playback performance and to minimize any interference with the video playback.

Improving reliability when playing back corrupted or noisy H.264 video streams

By default, the H264 decoder is running in the optimal performance mode. Streams with excessive noise or corruption can cause various problems in this setting. If you have problems playing such bad files or streams, then you should update ILMH264Decoder::DecodingOptions to contain the H264DecodingFlag_DecodeCorruptedStream flag. Optionally, you can set the H264DecodingFlag_DisplayGrayOnError flag as well, or enable the H264 Decoder properties in the settings dialog box as shown in Figure 1.

Figure 1. LEAD H264 Decoder (3.0) settings dialog box

Other topics

Programming with LEADTOOLS DVR Module - API Help file

Programming with LEADTOOLS DVR Module - COM Help file

ILMMpgDmx Interface

ILMH264Decoder Interface


LEAD MPEG2 Transport Demultiplexer

LEAD MPEG2 Transport Demultiplexer

The LEAD MPEG2 Transport Demultiplexer is a DirectShow Ò filter that can parse the following types of streams:

1. MPEG-2 Transport specified in ISO/IEC 13818-1
2. MPEG-2 Program specified in ISO/IEC 13818-1
3. MPEG-1 System specified in ISO/IEC 11172-1
4. Elementary stream data (also know as raw video or raw audio data)

The first two formats are multiplexed formats, and they can contain video, audio and private data streams. The video compression can be MPEG1 (ISO/IEC 11172-2), MPEG2 (ISO/IEC 13818-1), MPEG4 (ISO/IEC 14496-2) or H.264 (ISO/IEC 14496-10). The audio compression can be MPEG1 (ISO/IEC 11172-3), AC3, LPCM or AAC.

The private data can be retrieved using the ILMMpgDmxCallback interface. The filter will create private data pins, but it is not necessary to render these pins in order to programmatically retrieve the private data packets. The filter also provides the ILMKlvParser interface, which can be used to parse KLV private data conforming to SMPTE 336M-2001.

The demultiplexer works in pull mode, so it will connect to source filters that expose the IAsyncReader interface.

Technical details for the demultiplexer are provided in the following table:

Filter Interfaces | ILMMpgDmx ILMKlvParser
Interface ID | IID_ILMMpgDmx IID_ILMKlvParser
Input Media Types | Type: MEDIATYPE_Stream Subtypes: MEDIASUBTYPE_NULL MEDIASUBTYPE_MPEG2_PROGRAM MEDIASUBTYPE_MPEG1Video MEDIASUBTYPE_MPEG1System MEDIASUBTYPE_UDPStream MEDIASUBTYPE_MPEG1Audio MEDIASUBTYPE_MPEG2_TRANSPORT
Output Media Types | Depends on the type of data being parsed. The most common output media types are: Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_MPEG2_VIDEO MEDIASUBTYPE_L264 Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_MPEG1AudioPayload MEDIASUBTYPE_MPEGLAYER3 MEDIASUBTYPE_DOLBY_AC3 MEDIASUBTYPE_DVD_LPCM_AUDIO MEDIASUBTYPE_AAC Type: MEDIATYPE_METADATA Subtypes: MEDIASUBTYPE_KLVA MEDIASUBTYPE_PrivateData
Filter CLSID | CLSID_LMMpgDmxT
Property Page CLSID | N/A
Executable | LMMpgDmxT.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | ILMMpgDmxT.h ILMMpgDmxCommon.h

Platforms

Win32, x64, Mobile


LEAD MPEG2 Program Demultiplexer

LEAD MPEG2 Program Demultiplexer

The LEAD MPEG2 Program Demultiplexer is a DirectShow Ò filter that can parse the following types of streams:

  1. MPEG-2 Program specified in ISO/IEC 13818-1

  2. MPEG-1 System specified in ISO/IEC 11172-1

  3. Elementary stream data (also known as raw video or raw audio data)

The first two formats are multiplexed formats, and they can contain video, audio and private data streams. The video compression can be MPEG1 (ISO/IEC 11172-2), MPEG2 (ISO/IEC 13818-2), MPEG4 (ISO/IEC 14496-2) or H.264 (ISO/IEC 14496-10). The audio compression can be MPEG1 (ISO/IEC 11172-3), AC3, LPCM or AAC.

This filter does NOT support MPEG-2 Transport streams defined in ISO/IEC 13818-1. Those streams are supported in the LEAD MPEG2 Transport Demultiplexer..

This filter does NOT support private data. For private data support, please use the LEAD MPEG2 Transport Demultiplexer .

The demultiplexer works in pull mode, so it will connect to source filters that expose the IAsyncReader interface. IAsyncReader is a standard Microsoft interface. Please consult the Microsoft documentation for more information on IAsyncReader.

Technical details for the demultiplexer are provided in the following table:

Filter Interfaces | ILMMpgDmx
Interface ID | IID_ILMMpgDmx
Input Media Types | Type MEDIATYPE_Stream Subtypes MEDIASUBTYPE_NULL MEDIASUBTYPE_MPEG2_PROGRAM MEDIASUBTYPE_MPEG1Video MEDIASUBTYPE_MPEG1System MEDIASUBTYPE_UDPStream MEDIASUBTYPE_MPEG1Audio
Output Media Types | Depends on the type of data being parsed. The most common output media types are: Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_MPEG2_VIDEO MEDIASUBTYPE_L264 Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_MPEG1AudioPayload MEDIASUBTYPE_MPEGLAYER3 MEDIASUBTYPE_DOLBY_AC3 MEDIASUBTYPE_DVD_LPCM_AUDIO MEDIASUBTYPE_AAC
Filter CLSID | CLSID_LMMpgDmxP
Property Page CLSID | N/A
Executable | LMMpgDmxP.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | ILMMpgDmxP.h ILMMpgDmxCommon.h

Platforms

Win32, x64, Mobile


ILMMpgDmx Interface

The main stream is the video stream (if the MPEG2 stream contains video), or the audio stream (if the MPEG2 stream has audio but not video) or the first stream (if the MPEG2 stream has neither audio or video). Most MPEG2 streams do contain video, so the main stream is usually the video stream.

The main stream is the video stream (if the MPEG2 stream contains video), or the audio stream (if the MPEG2 stream has audio but not video) or the first stream (if the MPEG2 stream has neither audio or video). Most MPEG2 streams do contain video, so the main stream is usually the video stream.

The main stream is the video stream (if the MPEG2 stream contains video), or the audio stream (if the MPEG2 stream has audio but not video) or the first stream (if the MPEG2 stream has neither audio or video). Most MPEG2 streams do contain video, so the main stream is usually the video stream.

Available in LEADTOOLS Multimedia toolkits.

ILMMpgDmx Interface

Data types:

typedef enum DemuxFlagConstants
{
DemuxFlag_IgnoreCorruptedPackets = 1, /* Ignore corrupted packets */
}
DemuxFlagConstants;

typedef enum StreamFlagConstants
{
StreamFlag_IsImportant = 0x1, /* This stream is important. The demux will not start streaming until samples from this stream are received */
}
StreamFlagConstants;

typedef enum LOADSTATUSConstant
{
AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED = 0x100, /* The demux will send the EC_LOADSTATUS (0x43) event to the DirectShow graph and set lParam1 to this value when it identifies the number and type of elementary streams present in the MPEG2 stream. */
} LOADSTATUSConstant;

Interface Properties:

Type

Name

Description

ILMMpgDmxCallback *

CallbackObj

The demultiplexer calls this user callback with event notifications and with the user data packets.

VARIANT_BOOL

CallInSameThread

Enables or disables the calling of the ILMMpgDmxCallback notifications in the same thread that set the CallbackObj property. The default value is VARIANT_TRUE. Possible values are:

Value

Meaning

VARIANT_TRUE

Call the notifications in the same thread that set the callback. This reduces the performance and requires the application to process messages, otherwise the callback will not get called. It is the default and is required for platforms that have problem with multithreading. VB 6.0 and dotnet applications should use this mode.

VARIANT_FALSE

Call the notifications in any thread of the process. Use this setting for best performance in platforms that can handle this. This is the recommended mode for C/C++ applications.

VARIANT_BOOL

IsStreaming

(Read-only) This property tells you whether you are streaming. Possible values are:

Value

Meaning

VARIANT_TRUE

VARIANT_FALSE

long

Flags

This property is a collection of flags that influence the demuxer's behavior. The default value is DemuxFlag_IgnoreCorruptedPackets. The following flags are defined:

Value

Meaning

DemuxFlag_IgnoreCorruptedPackets

double

StreamPosition

(Read-only) This property tells you the current stream position, in seconds. The current stream position is position of the video and audio playing on the screen (if the demux is in a play graph).

This property is designed to work together with the ConvertPTSToStreamPosition method. See the ConvertPTSToStreamPosition method for more details on how to use this method.

double

StartStreamOffset

(Read only) This property represents the start of the stream in bytes. It can change if the source filter uses circular buffer and the playback is stopped and restarted.

double

BaseStreamOffset

(Read only) This property represents the base stream offset in bytes. The base stream position is the position of the last seek operation.

double

CurrentStreamOffset

This property tells you the current offset in bytes for the main elementary stream. This property is the file offset for the most recently delivered media sample. You can get or set this property. Setting this property is equivalent to a seeking operation.

NOTE: When setting this property it is possible to use negative values to indicate a position relative to the live stream position. Ex: A value of -1024 will be interpreted as 1024 bytes behind the live stream.

double

FirstStreamOffset

(Read only) This property represents the offset of the first sample present in the circular buffer queue. Any samples before this position have been overwritten.

double

LastStreamOffset

(Read only) This property represents the offset of the last byte in the stream. It also represents the length of the stream.

double

CurrentStreamPTS

This property tells you the current stream position in PTS units for the main elementary stream. You can get or set this property. The current stream PTS is the current presentation timestamp that controls audio / video sample presentation. This property is the presentation time stamp for the most recently delivered media sample.

NOTE: When setting this property it is possible to use negative values to specify position relative to the LIVE stream. Ex: A value of -90,000 will be interpreted as last sample time stamp - 90,000, which would be 1 second behind the actual live stream time. See for more information on presentation time stamps.

double

BaseStreamPTS

(Read only) This property represents the base stream position in PTS units. The base stream position is the position after a seek operation. This property is also time adjusted to account for discontinuities in media samples.

double

FirstStreamPTS

(Read only) This property represents the first stream position in PTS units. It is the timestamp for the oldest sample present in the circular buffer queue. Any samples prior to the first stream PTS have been overwritten.

double

LastStreamPTS

(Read only) This property represents the last stream position in PTS units. The last stream PTS is the timestamp of the last sample available in the circular buffer queue.

double

StartStreamPTS

(Read only) This property represents the start stream position in PTS units. The start stream PTS is presentation timestamp of the first sample delivered at the start of streaming.

double

BaseStreamTime

(Read only) This property represents the base stream position in seconds. The base stream position is the position in seconds of the last seek operation.

double

CurrentStreamTime

This property tells you the current stream position in seconds for the main elementary stream. This property is the time stamp for the most recently delivered media sample. You can get or set this property. Setting this property is equivalent to a seeking operation.

NOTE: When setting this property it is possible to use negative values to indicate a position relative to the live stream position. Ex: A value of -0.5 will be interpreted as 0.5 seconds behind the live stream. See for more information on presentation time stamps.

double

FirstStreamTime

(Read only) This property represents the first stream position in seconds. It is the timestamp for the first sample present in the circular buffer queue. Any samples before this position have been overwritten.

double

LastStreamTime

(Read only) This property represents the last stream position in seconds. It is the time of the last sample available in the circular buffer queue.

double

DurationCheckInterval

Gets or sets the frequency (in seconds) with which the duration is updated. This property determines how often the internal first and last stream properties are updated. When a circular buffer is used, the internal FirstStreamXXX properties are updated after DurationCheckInterval seconds. Then the internal LastStreamXXX properties are updated DurationCheckInterval seconds later. After DurationCheckInterval seconds the first stream properties are recalculated and so on. The default value is 5 seconds.

See Programming With MPEG2 Demux for more information.

long

StreamCount

Gets the number of streams described in the last program map.

long

StreamFlags(StreamPID)

This property is a collection of flags that will determine how the stream is handled by the demultiplexor. This property takes StreamPID as the index parameter. You can use the GetStreamInfo method to get enumerate the streams and obtain the possible values for StreamPID. This is a write-only property. Use this property to reduce the amount of time to start playback if you are not interested in data containing from some streams. By default, StreamFlag_IsImportant is considered to be on, so the demux will wait until data from this stream arrives before starting the playback. This could cause undesired delays. If you wish to reduce the amount of time it takes to the smallest possible value, you can enumerate all the streams present in the MPEG2 stream and set the StreamFlags for all streams except the video stream to 0. But if you do this, you run the risk that some of the streams that you deemed as not important might not be detected. This is designed to work together with the (EC_LOADSTATUS, AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED) event notification. See Programming With MPEG2 Demux for more information.

The following flags are defined:

Value

Meaning

StreamFlag_IsImportant

VARIANT_BOOL

AutoLive

Indicates whether the demux should automatically show the live stream. If this property is set to VARIANT_TRUE (AutoLive is enabled), then the demux will automatically jump ahead to the live stream position when it detects it has fallen behind live by more than AutoLiveTolerance seconds. You should enable this feature only if you are streaming. Note that if you enable this property, it will override any seeking commands. If you wish to seek to a position other than live, you should set this property to VARIANT_FALSE and then perform the seeking operation. The default value is VARIANT_FALSE (AutoLive is disabled). The check of the latency to live is made whenever a new LastStream position is detected. This check occurs every 2 * DurationCheckInterval seconds. The following values are defined:

Value

Meaning

VARIANT_TRUE

VARIANT_FALSE

double

AutoLiveTolerance

When AutoLive is set to VARIANT_TRUE, this property indicates by how many seconds is the playback allowed to drift back compared to the live stream. If AutoLive is VARIANT_FALSE, this property is ignored. It is not recommended to set this property to a value that is too low, otherwise the playback might become too jerky due to constant playback adjustments. The default value is 0.5.

Interface Methods:

HRESULT GetKlvParser (long streamPID, ILMKlvParser **pVal);

Parameters

streamPID | The stream PID for which you want to receive the KLV parser interface.
pVal | A pointer to pointer to an ILMKlvParser interface. This pointer will be updated by the method if successful.

Description

Use this method to facilitate parsing of KLV data conforming to SMPTE 336M-2001. There might be more than one private data stream and you should use a different parser for each stream. You identify each stream by its PID (-Packet IDentifier-). The PID is usually the same as the streamPID passed to ILMMpgDmxCallback::DataAvailable , but you can pass any value as the streamPID.

The ILMKlvParser interface can be used to easily enumerate the KLV keys and for getting the KLV data. It keeps track of incomplete keys and enumerates them when you get sufficient data.

Returns

S_OK if successful

E _POINTER if ppszFilename is NULL.

E_OUTOFMEMORY if there is not enough memory to create the interface.

HRESULT ConvertPTSToStreamPosition(double PTS, double *pStreamPosition);

Parameters

PTS | The PTS you are trying to convert.
pStreamPosition | A pointer to a double value. This pointer gets updated by the method if successful.

Description

Use this method to convert a PTS for the current MPEG stream into a stream position (in seconds). The PTS must have come from the current stream; otherwise the conversion will be incorrect. In other words, you cannot use a mpeg demux instance to convert PTS timestamps coming from a stream inside another MPEG demux.

This method it is intended to be used to find the correct display time for extra data samples received through ILMMpgDmxCallback::DataAvailable as follows:
1) Call ConvertPTSToStreamPosition(PTS, &PTSStreamPosition) to fill PTSStreamPosition with the desired stream position.
2) Call get_StreamPosition(&currentStreamPosition) to find the current stream position. (Add the "get_" prefix as it is usually done in C++ programs)
3) Determine when to display the data:

a) if PTSStreamPosition >= currentStreamPosition, then the data is early (the usual case) and you need to wait for PTSStreamPosition - currentStreamPosition seconds before displaying it.
b) if PTSStreamPosition < currentStreamPosition, then the data is late and you should display it right away. This is usually an indication that the video and extra data streams are not multiplexed properly.

Returns

S_OK if successful

S_FALSE if it fails (in this case, *pCurrentPosition will be set to -1)

HRESULT RefreshPosition(long Flags);

Parameters

Flags

The flags for which bits to update.

Description

Updates the values of the position properties (CurrentStreamPTS, StartStreamPTS, FirstStreamPTS, LastStreamPTS)

This method is intended to be used to update all PTS, Time and Offset properties.

Important note: You MUST call this method, otherwise properties like CurrentStreamPTS, CurrentStreamTime and CurrentStreamOffset never get updated.

Returns

S_OK if successful

S_FALSE if it fails

HRESULT ConvertPTSToFrame(double PTS, double *pFrame);

Parameters

PTS | The PTS value to be converted.
pFrame | A pointer to a double variable that will hold the converted frame number result. This pointer gets updated by the method if successful.

Description

Converts a PTS value to a frame number.

Use this method to convert a PTS value for the current mpeg stream to a frame number. The PTS must have come from the current stream; otherwise the conversion will be incorrect. In other words, you cannot use a mpeg demux instance to convert PTS timestamps coming from a stream inside another MPEG demux.

Returns

S_OK if successful

S_FALSE if it fails

HRESULT ConvertFrameToPTS(double Frame, double *pPTS);

Parameters

Frame | A double value containing the frame number to convert.
pPTS | A pointer to the double variable that holds the converted PTS value result. This pointer gets updated by the method if successful.

Description

Converts a frame number value to a PTS value.

Use this method to convert a frame number for the current mpeg stream to a PTS value.

Returns

S_OK if successful

S_FALSE if it fails

HRESULT GetStreamInfo(long StreamIndex, long *pStreamPID, long *pStreamType, VARIANT *pStreamDescriptor);

Parameters

StreamIndex | A long value containing the stream index of the desired information. This value should be between 0 and StreamCount - 1.
pStreamID | A pointer to the long variable that will hold the stream Program identifier. The value pointed to gets updated by the method if successful.
pStreamType | A pointer to the long variable that will hold the stream type value (stream_type values can be found in Table 2-36 (page 63) of ISO/IEC 13818-1 spec). The value pointed to gets updated by the method if successful.
pStreamDescriptor | A pointer to a VARIANT type variable that will hold the stream descriptor block. The value pointed to gets updated by the method if successful.

Description

Gets information for a specific stream.

Use this method to get the stream's PID, type and descriptor. Use the StreamCount property to determine the number of available elementary streams in the MPEG-2 stream.

It is best to call this method after receiving the EC_LOADSTATUS notification event with the AM_LOADSTATUS_PROGRAM_PACKET_RECEIVED parameter. See the Programming with the MPEG-2 Transport Demultiplexer topic for more details.

Returns

S_OK if successful

S_FALSE if it fails

See also

Programming with the MPEG-2 Transport Demultiplexer


ILMMpgDmxCallback Interface

ILMMpgDmxCallback Interface

The ILMMpgDmxCallback interface is a user-defined interface. It must be registered by setting the ILMMpgDmx::CallbackObj property. Once you do this, the LEAD MPEG-2 demultiplexers will call its members.

Data types:

typedef enum FileTypeConstants
{
Mpeg2_Other_Stream, /* A stream other than MPEG-2 Program or Transport. This is most likely a Raw data stream */
Mpeg2_Program_Stream, /* MPEG-2 Program or MPEG-1 Systems stream */
Mpeg2_Transport_Stream, /* MPEG-2 Transport stream */
} FileTypeConstants;

typedef enum PTSTypeConstants
{
PTS_Invalid = 0, /* The PTS value is invalid because this sample does not have a PTS timestamp */
PTS_Calculated, /* The PTS value is an approximation calculated by the demux. This sample does not contain a PTS timestamp */
PTS_Valid /* The PTS value is correct and was obtained from the file */
} PTSTypeConstants;

typedef enum DataFlagConstants
{
DataFlag_BeginSample = 1, /* This packet is the beginning
 of a private data sample */
DataFlag_EndSample = 2, /* This packet is the end of
 a private data sample */
DataFlag_IsKLV = 4, /* The buffer seems to be KLV data
 */
DataFlag_IsAscii = 8, /* The buffer seems to be Ascii
 data */
DataFlag_IsBinary = 0x10, /* The buffer is binary data
 */
} DataFlagConstants;

typedef enum EventNotificationConstants
{
EVENTTYPE_REBUILDNEEDED = 1, /* The stream has changed (the number of streams and the compression might have changed). The graph needs to be rebuilt */
EVENTTYPE_CORRUPTEDPACKET = 2, /* A corrupted packet has been discarded */
} EventNotificationConstants;

Interface methods:

HRESULT DataAvailable(VARIANT *pData, long lDataSize, FileTypeConstants fileType, long streamPID, long streamType, PTSTypeConstants PTSType, double PTS, long flags);

Parameters

pData

Pointer to a variant containing the private data.

lDataSize

A value that represents the size of the data contained in pData.

fileType

An enumerated value describing the format of the multiplexed stream.

streamPID

A PID identifying the stream containing the private data. Use this value to distinguish between the different private data streams in the file.

streamType

The type of private data stream.

If the fileType is Mpeg2_Program_Stream, the streamType is one of the values in Table 2-19 of the ISO/IEC 13818-1 specification. Due to copyright restrictions, we cannot place this table here. Example: 0xBF is Private Stream 2.

If the fileType is Mpeg2_Transport_Stream, the streamType is one of the values in Table 2-36 of the ISO/IEC 13818-1 specification. Due to copyright restrictions, we cannot place this table here. Example: values 0x0A through 0x0D indicate streams of type KLVA through KLVD.

PTSType

Type of Presentation Time Stamp (PTS). Possible values: PTS_Invalid, PTS_Calculated, PTS_Valid

PTS

Presentation Time Stamp – indicates the time when this data was generated. The PTS should be ignored if PTSType is set to PTS_Invalid.

Flags

One or more DataFlagConstants enumeration values or-ed together.

Description

This method is called to enumerate the private data packets present in the file. There can be more than one private data stream in the file and you should use streamPID to distinguish between the various streams. This chunk might be a portion of a private data packet. Use the Flags value to determine whether this packet is:

  • a whole packet (DataFlag_BeginSample and DataFlag_EndSample are both set) or

  • the beginning (only DataFlag_BeginSample is set) or

  • the middle (neither DataFlag_BeginSample or DataFlag_EndSample is set)

  • the end (only DataFlag_EndSample is set)

If the private data stream is of KLV type (that is, if Flags has DataFlag_IsKLV set), then each packet contains a list of KLV keys and subkeys. In this case, we recommend you use ILMMpgDmx::GetKlvParser to obtain an ILMKlvParser interface. You can use the ILMKlvParser interface to enumerate all the KLV keys present in a packet. For more information on KLV keys and format, see SMPTE 336M-2001.

You can examine Flags to see if the data seems to be:

  • KLV (DataFlag_IsKLV is set)

  • Ascii (DataFlag_IsAscii is set)

  • Binary (DataFlag_IsBinary is set)

The demux estimates the type of data based on its contents. If you believe this estimation is wrong, you can interpret the data any way you want.

Returns

S_OK if successful.

< 0 if you want to indicate an error situation and abort the playback or conversion.

HRESULT EventNotification(EventNotificationConstants lEventType, double Param1, double Param2);

Parameters

lEventType | Type of event. Possible values are:
 | Value | Meaning
 | EVENTTYPE_REBUILDNEEDED | [0x0001] Indicates that the compression, video size or number of streams has changed and the graph needs to be rebuilt. Return S_OK if your program rebuilds the graph or S_FALSE if you want the demux to tell the MM toolkit to rebuild the graph. lParam1 and lParam2 are not used and should be ignored.
 | EVENTTYPE_CORRUPTEDPACKET | [0x0002] Indicates a corrupted packet has been discarded. lParam1 = PTS timestamp of the packet which was discarded. lParam2 is unused and should be ignored.
Param1 | First parameter. The value depends on the type of event. This is not used right now and is reserved for future events.
Param2 | Second parameter. The value depends on the type of event. This is not used right now and is reserved for future events.

Description

This method is called when certain events occur. The following events are currently defined:

EVENTTYPE_REBUILDNEEDED – the compression or the number or type of streams present have changed and that you need to rebuild the graph. This event is usually sent while you are streaming. If you are using LEADTOOLS Multimedia, you rebuild the graph by calling put_FileName with the same input URL. This event has no parameters (lParam1 and lParam2 should be ignored).

EVENTTYPE_CORRUPTEDPACKET – a corrupted packet has been discarded. lParam1 = PTS timestamp of the packet which was discarded. lParam2 = should be ignored

Returns

S_OK if successful.

S_FALSE if you want the demux to ask the multimedia toolkit to automatically rebuild the graph. This is valid only for the EVENTTYPE_REBUILDNEEDED event notification.

< 0 if you want to indicate an error situation and abort the playback or conversion.


KLV Key Information

KLV Key Information

The KLV keys are described in Data Encoding Protocol using Key-Length-Value (SMPTE 336M-2001). The following sections provide a quick overview of the key structure, but for complete information you should read the previously mentioned document.

Offset (0-based) | Description | Length (bytes) | Content/Format
0 | KLV header (this is the same for all keys). | 4 | Always 0x06 0x0E 0x2B
4 | Registry category designator: Identifies the category of registry described (dictionary, groups, wrappers, labels). | 1 | One of the RegistryCategoryConstants values
5 | Registry designator: identifies the specific registry in a category. | 1 | Depends on the value of Registry category designator.
6 | Structure designator: Designator of the structure variant within the given registry. | 1 |
7 | Version number. | 1 |
8 | Item designator: the identifier for the key. | 8 |

The KLV keys are identified by 16 bytes, which can be broken into 3 sections as follows:

  1. KLV header section (bytes 0..3), which are always 0x06 0x0E 0x2B 0x34. Right now, this is not important because the number of defined keys is less than 264.

  2. General section (bytes 4..7), which was originally meant to describe the format of the data. In reality, these bytes are almost the same for all versions of a key, except for the version number (byte at offset 7). The byte at offset 6 (structure designator) is almost always 0x01. The version number is quite important because the format of the data might change from one version to another. For example, key data for version 1 might be a 16-bit value, while the version 2 key might write 32-bit values.

  3. The key identifier (bytes 8..15). These bytes identify which data is associated with this key. This is the data that you should be searching for when you want to find out the meaning of a certain key.

LEAD has defined some common keys in ILMMpgDmxP.h. You will find them defined as KlvKey_XXX values. For example, look for KlvKey_UserDefinedTimeStamp and you will find the list of the keys that LEAD has defined.

LEAD has defined certain defines to help you access certain bytes in the key. Look below for more information.

Useful enumerations for examining the keys

Use the KlvOffsetConstants enumeration to find the offsets for important key components in the 16-byte key:

typedef enum KlvOffsetConstants
{
KLVOFFSET_REGISTRYCATEGORY = 4, /* Designator identifying the category of registry described (e.g.,dictionaries) */
KLVOFFSET_REGISTRYDESIGNATOR = 5, /* Designator identifying the specific registry in a category (e.g., metadata dictionary) */
KLVOFFSET_STRUCTUREDESIGNATOR = 6, /* Designator of the structure variant within the given registry */
KLVOFFSET_VERSIONNUMBER = 7, /* Version of the given registry which first defines the item specified by the item designator */
KLVOFFSET_ITEMDESIGNATOR = 8, /* Unique identification of the particular item within the context of the UL designator (Up to 8 bytes) */
} KlvOffsetConstants;

Use the RegistryCategoryConstants enumeration to determine possible values for the registry category designator (the byte at offset 4):

typedef enum RegistryCategoryConstants

{
REGISTRYCATEGORY_DICTIONARY = 1, /* Dictionaries: Next
 byte=KlvDictionaryConstants (01=Metadata, 02=Essence, 03=Control, 04=Types)
 */
REGISTRYCATEGORY_GROUPS = 2, /* Groups: Next byte=KlvGroupConstants
 (01=Universal, 02=Global, 03=Local, 04=Variable-length packs (default),
 05=Fixed-length packs) */
REGISTRYCATEGORY_WRAPPERS = 3, /* Wrappers and containers:
 Next byte=KlvWrapperConstants (01=Simple, 02=Complex) */
REGISTRYCATEGORY_LABELS = 4, /* Labels: Next byte=KlvLabelConstants
 (01=Labels dictionary) */
} RegistryCategoryConstants;

If the registry category value designator is REGISTRYCATEGORY_DICTIONARY, the registry designator (byte at offset 5) is one of the following values:

typedef enum KlvDictionaryConstants
{
KLVDICTIONARY_METADATA = 1, /* 01 = Metadata Dictionaries
 */
KLVDICTIONARY_ESSENCE = 2, /* 02 = Essence Dictionaries
 */
KLVDICTIONARY_CONTROL = 3, /* 03 = Control Dictionaries
 */
KLVDICTIONARY_TYPES = 4, /* 04 = Types Dictionaries */
} KlvDictionaryConstants;

If the registry category value designator is REGISTRYCATEGORY_GROUP, the registry designator (byte at offset 5) is one of the following values:

typedef enum KlvGroupConstants
{
KLVGROUPS_UNIVERSAL = 1, /* 01 = Universal Groups */
KLVGROUPS_GLOBAL = 2, /* 02 = Global Groups */
KLVGROUPS_LOCAL = 3, /* 03 = Local Groups */
KLVGROUPS_VARIABLEPACK = 4, /* 04 = Variable-length packs
 (default) */
KLVGROUPS_FIXEDPACK = 5, /* 05 = Fixed-length packs */
} KlvGroupConstants;

If the registry category value designator is REGISTRYCATEGORY_WRAPPER, the registry designator (byte at offset 5) is one of the following values:

typedef enum KlvWrapperConstants
{
KLVWRAPPERS_SIMPLE = 1, /* 01 = Simple wrappers */
KLVWRAPPERS_COMPLEX = 2, /* 02 = Complex wrappers */
} KlvWrapperConstants;

If the registry category value designator is REGISTRYCATEGORY_LABEL, the registry designator (byte at offset 5) is one of the following values:

typedef enum KlvLabelConstants
{
KLVLABELS_LABEL = 4, /* 01 = Labels dictionary */
} KlvLabelConstants;


ILMKlvParser Interface

ILMKlvParser Interface

The ILMKlvParser interface is provided by the LEAD MPEG-2 Transport Demultiplexer to simplify the task of parsing KLV data. It can be obtained from the demultiplexer by calling ILMMpgDmx::GetKlvParser.

Data types:

typedef enum SearchKeyConstants
{
SearchKey_Exact = 1, /* Find the exact key only. The key version number must match. */
SearchKey_AnyVersion = 2, /* Ignore the version number when doing the search. */
SearchKey_DesignatorOnly = 3, /* Find the key by the designator only. Ignore the key representation and version number */
} SearchKeyConstants;

typedef enum ErrorConstants
{
KLV_KEY_NOT_FOUND = 0x80050010, /* The KLV key was not found */
KLV_BAD_KEY = 0x80050011, /* The KLV key is bad */
} ErrorConstants;

Interface Properties:

Type | Name | Description
long | Count | The number of complete top-level KLV keys contained in the internal interface buffer. An incomplete KLV key will not be included in the count.

Interface Methods:

HRESULT AddData(VARIANT *pData, long lDataSize, long Flags);

Parameters

pData | Pointer to a variant containing the private data.
lDataSize | The size of data contained in pData.
Flags | The flags value describing the position of this data packet within the private data sample. See the DataFlagConstants enumeration for a list of possible flags.

Description

This method can be used to begin parsing private data containing KLV packets. After calling this function, you can parse the data by calling GetKey, FindKey and FindKeyStr.

This method is designed to be called in response to a call to ILMMpgDmxCallback::DataAvailable. You can call AddData with the corresponding parameters from ILMMpgDmxCallback::DataAvailable (pData, lData, Flags).

You should call this function ONLY if ILMMpgDmxCallback::DataAvailable is called and Flags has DataFlag_IsKLV set. Although you can call this function if the flag in question is not set, that will be pointless because the parsing function will most likely fail.

If you do not pass the data received from ILMMpgDmxCallback::DataAvailable and you want to pass as pData a variant that you create, follow the following rules:

  • pData must be a one-dimensional byte array variant

  • lDataSize must be <= size of pData variant

  • Set the Flags to their appropriate values. If you pass a complete KLV buffer, pass DataFlag_BeginSample | DataFlag_EndSample for Flags. It is not necessary to pass the DataFlag_IsKLV flag. That is for informational purposes. The ILMKlvParser interface pays attention only to the DataFlag_BeginSample and DataFlag_EndSample flags.

If Flag_BeginSample is set in Flags, AddData will clear the previous data from the buffer. If Flag_BeginSample is not set, the new data is appended to the data set by the previous AddData call.

Example:

AddData(var1, 2048, DataFlag_BeginSample); /* Now we have 2048 bytes worth of data */

AddData(var2, 2048, DataFlag_EndSample); /* Now we have 4096 bytes worth of data, made up of data contained in var1 and var2 */

AddData(var3, 2048, DataFlag_BeginSample); /* Now we have 2048 bytes worth of data, made up of data contained in var3. The previous 4096 bytes have been discarded because DataFlag_BeginSample was passed to AddData */

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

E_POINTER [0x80004003] pData is NULL

E_INVALIDARG [0x80070057] pData is not a byte array variant

HRESULT GetKey(long keyIndex, VARIANT *pKey, VARIANT *pKeyData, long *pDataSize);

Parameters

keyIndex | The index of the key to retrieve. The index is 0-based, so allowed values are 0..Count – 1
pKey | Pointer to a VARIANT that will be updated with a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in pKeyData.
pKeyData | Pointer to a VARIANT that will be updated key data. The key data will be a byte array variant regardless of the real format of the key data.
pDataSize | Pointer to a long variable that will be updated with the number of bytes stored in pKeyData. This is the same as the size of the pKeyData variant.

Description

Use this method to enumerate all the keys contained in a private data sample. This method will enumerate all the data passed to AddData since the last call that had the DataFlag_BeginSample flag set.

The method allocates data for the pKey and pKeyData variants. You should make sure you free the memory allocated in these variants if your programming language does not do so automatically. For example, VB automatically frees this memory, but C/C++ does not. In C++, you free the variant memory by calling VariantClear. Please consult the documentation for your programming language for more information on how to free the variant data.

You should examine pKey to find out how you are supposed to interpret the key data. The ILMKlvParser will not interpret the key data for you. There is not a single document describing all the KLV keys that you might find in a stream. You will find various documents describing certain lists of currently defined keys. But each company that generates MPEG-2 transport streams or files might write their own internal keys in a private data stream. At the time of writing this documentation, the following documents contained information on KLV keys and how to interpret their content:

    • UAV Datalink Local Metadata Set (EG 0601 12 Jan 2006)

    • Predator UAV Basic Universal Metadata Set (MISB EG 0104.4 25 August 2005)

Based on information on this and other documents that you might find, you should interpret the key data accordingly. For example:

Key: 06 0E 2B 34 01 01 01 04 07 02 01 01 01 05 00 00

Is a “User Defined Time Stamp (microseconds since 1970)” in msb bit order and that the key should be 8 bytes long. In this case, you should verify that *pDataSize is 8. If *pDataSize is 8, you should convert the 8-byte array into a 64-bit unsigned integer (or a double floating point if your programming language does not support 64-bit integers). You would then convert the 64-bit value into a date and time by counting the microseconds since 1970.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
DISP_E_BADINDEX | [0x8002000B] keyIndex is invalid (< 0).
E_POINTER | [0x80004003] pKey, pKeyData or pDataSize is NULL.
KLV_KEY_NOT_FOUND | [0x80050010] The key was not found (keyIndex >= Count).
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the pKey or pKeyData variants.

HRESULT FindKey(VARIANT *pKeyToFind, long searchFlags, VARIANT *pKey, VARIANT *pKeyData, long *pDataSize);

Parameters

pKeyToFind | Pointer to a variant describing which key to look for.
searchFlags | One of the flags in the SearchKeyConstants enumeration. These flags tell the parser how whether the match should be exact or not.
pKey | Pointer to a VARIANT that will be updated with a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in pKeyData.
pKeyData | Pointer to a VARIANT that will be updated key data. The key data will be a byte array variant regardless of the real format of the key data.
pDataSize | Pointer to a long variable that will be updated with the number of bytes stored in pKeyData. This is the same as the size of the pKeyData variant.

Description

Use searchFlags to whether you require an exact match or not for the key you are looking for. Possible values for searchFlags are:

SearchKey_Exact | An exact match is required. All 16 bytes of the key must match.
SearchKey_AnyVersion | For a match to be acceptable, all key bytes must match, with the exception of the version key (the 7th byte).
SearchKey_DesignatorOnly | For a match to be acceptable, the key designator component must match. The key designator is stored in the last 8 bytes of the key.

This function will go through the top keys in the buffer and compare them with the key passed in pKeyToFind. If the key from the buffer matches exactly or partially (if permitted by searchFlags), then the key found is stored in pKey, the key data is stored in pKeyData and the key length is stored in pDataSize.

To understand searchFlags better, read more information on KLV keys in the KLV Key information topic.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | [0x80004003] pKey, pKeyData or pDataSize is NULL.
KLV_KEY_NOT_FOUND | [0x80050010] There is no key matching pKeyToFind and searchFlags.
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the pKey or pKeyData variants.

HRESULT FindKeyStr(BSTR pKeyToFind, long searchFlags, VARIANT *pKey, VARIANT *pKeyData, long *pDataSize);

Parameters

pKeyToFind | Pointer to a string describing which key to look for.
searchFlags | One of the flags in the SearchKeyConstants enumeration. These flags tell the parser whether the match should be exact or not.
pKey | Pointer to a VARIANT that will be updated with a key describing the data. The key will be a 16-byte array describing the variant data. This key tells you how to interpret the key data contained in pKeyData.
pKeyData | Pointer to a VARIANT that will be updated key data. The key data will be a byte array variant regardless of the real format of the key data.
pDataSize | Pointer to a long variable that will be updated with the number of bytes stored in pKeyData. This is the same as the size of the pKeyData variant.

Description

This method works exactly like FindKey, except that the key to search for is passed as a string, rather than a VARIANT.

pKeyToFind is a string containing a hexadecimal representation of the bytes in the key. Each byte should be represented by two hexadecimal digits. Each digit can be:

  • ‘0’..’9’ or

  • ‘a’..’f’ or

  • ‘A’..’F’

Space characters are ignored. For example, “06 0E 2B 34 01 01 01 04 07 02 01 01 01 05 00 00” is equivalent to “060E2B34010101040702010101050000”.

For more information on each parameter, see the description for FindKey.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | [0x80004003] pKey, pKeyData or pDataSize is NULL.
KLV_KEY_NOT_FOUND | [0x80050010] There is no key matching pKeyToFind and searchFlags.
E_OUTOFMEMORY | [0x8007000E] Could not allocate memory for the pKey or pKeyData variants.
KLV_BAD_KEY | [0x80050011] The key string is invalid: the key string should contain a hexadecimal representation of a 16-byte value, with 2 digits per byte (32 digits total).


LEAD ISO Demultiplexer

The LEAD ISO Demultiplexer can be used to play files based on the ISO base file format described in ISO/IEC 14496-12. The ISO base file format should not be confused with the files used to store CD images or DVD images (which have the .ISO extension).

The following common file formats use the ISO base file format:

  • MP4 files used by Apple iPOD or Playstation Portable device (.MP4 extension)

  • Quicktime files (.MOV extension)

  • AAC audio files (.AAC extension)

  • 3GPP files used by 3G mobile phones (.3GP extension)

  • AVC files (.AVC extension)

  • Flash HD Format (.HDP extension)

The ISO demux can be used to parse the above file formats.

Filter Interfaces

None.

Interface ID

None.

Input Media Types

Type:
MEDIATYPE_Stream
Subtype:
MEDIASUBTYPE_LISO

Output Media Types

Depends on the file.

Filter CLSID

CLSID_LMIsoDmx

Property Page CLSID

None.

Executable

LMISODmx.dll, DSKernel2.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

None.

Platforms

Win32, x64, Mobile

This filter is included as part of the following modules:

LEAD H.263 Video Codec Module

LEAD H.264 Video Decoder Module

LEAD MPEG-4 Video Decoder Module


LEAD Ogg Splitter

The Ogg Splitter can be used to play Ogg files. Ogg is a new file format, made popular by Vorbis audio compression. It supports both audio and video from streaming applications and can support almost all audio/video codecs.

Technical details for the filter are provided in the following table:

Filter Interfaces

N/A

Interface ID

N/A

Input Media Types

Type:
MEDIATYPE_Stream
Subtype:
MEDIASUBTYPE_Ogg

Output Media Types

Any (depending on the file)

Filter CLSID

CLSID_LMOggSplitter

Property Page CLSID

CLSID_LMOggSplitterPropPage

Executable

LMOggSpl.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

N/A

Platforms

Win32, x64


LEAD FLV Demultiplexer

Flash format.

Available in LEADTOOLS Multimedia toolkits.

LEAD FLV Demultiplexer

The LEAD FLV Demultiplexer can be used to play Flash Video (FLV) files. This file format is widely used to store video files on web sites. For example, YouTube uses this format.

FLV files can use one of the following video compressions:

· Sorenson video compression.

· Screen capture compression. (Currently not supported by the demux)

· On2 Technologies' VP6 compression.

· H.264 compression.

FLV files can use one of the following audio compressions:

· Mpeg-1 Layer 3 (MP3)

· Uncompressed (PCM)

· ADPCM (Currently not supported by the demux)

· Nellymoser (Currently not supported by the demux)

· AAC

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Stream Subtypes: MEDIASUBTYPE_LFLV
Output Media Types | Depends on the type of data being parsed. The most common are: Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_S263 MEDIASUBTYPE_avc1 Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_MPEG1AudioPayload MEDIASUBTYPE_PCM MEDIASUBTYPE_mp4a
Filter CLSID | CLSID_LMFlvDmx
Property Page(s) CLSID | N/A
Executable | LMFLVDmx.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | N/A

Platforms

Win32, x64


ILMH264Encoder Interface (4.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

ILMH264Encoder Interface (4.0)

This is the interface for the LEAD H264 Encoder .

Interface Properties:

Type

Name

Description

VARIANT_BOOL

EnableRateControl

Indicates whether the H264 encoder uses Rate Driven compression or Quality Driven compression. It this property is TRUE, Rate Driven compression is used and the rate is set in the BitRate property. If this is FALSE, Quality Driven compression is used and the quality factor is set in the QualityFactor property.

long

BitRate

The bitrate, in bits per second, when the EnableRateControl value is TRUE.

long

QualityFactor

Contains the video quality factor. A quality factor of 1 gives the highest quality and the largest video file size. A quality factor of 49 gives the lowest quality and smallest file size. This property is valid only if the EnableRateControl property is FALSE.

eH264FRAMEINTERVALUNIT

IFrameIntervalUnit

Represents the unit of IFrameInterval property or how the IFrameInterval property is interpreted by the encoder. If IFrameIntervalUnit = H264INTERVALUNIT_PFRAME, then the IFrameInterval represents the I-frame interval in term of P frames. If IFrameIntervalUnit != H264INTERVALUNIT_FRAME, then I-frame Interval is in terms of P and B frames.

long

IFrameInterval

If IFrameIntervalUnit = H264INTERVALUNIT_PFRAME then this property specifies the number of P frames between two successive I frames plus one. A value of zero means there is only one I in the whole video and all the other frames are either P or B . If this value is one there will be NO P frame between any two I frames. If the value is 2 there will be ONE P frame between any two I frames and so on.

If IFrameIntervalUnit = H264INTERVALUNIT_FRAME then this property specifies the number of frames between two successive I-frames, in other words it specifies the "Group of Pictures (GOP)" length. A value of zero means there is only one I-frame in the whole video and all the other frames are either P or B. If this value is one there will no P or B frames between any I frames.

long

PFrameInterval

Specifies the number of B frames between two successive P frames. Note that all the frames between successive P frames are B frames.

eH264SYMBOLMODE

SymbolMode

Flag that indicates the type of entropy coding to be used. For a list of possible values, refer to eH264SYMBOLMODE.

VARIANT_BOOL

EnableSuperCompression

Flag that indicates whether super compression is enabled. If TRUE, then LEAD's improvement to the H264 compression is enabled. If FALSE, LEAD's improvement to the H264 compression is not used. This option produces very high compression and makes the encoding and decoding processes very fast. If high quality video is desired, it is recommended to disable this option.

This option is recommended for video conferencing and broadcast applications where speed and size are very important and moderate quality is ok.

This property is only available if the output is

H264FORMAT_AUTO, H264FORMAT_STANDARD_H264, H264FORMAT_STANDARD_AVC1,
H264FORMAT_BASELINE_RTP, H264FORMAT_MAIN_RTP, or H264FORMAT_LEAD.

float

FrameRate

Sets the playback frame rate, in frames per second, of the compressed video, regardless of the rate of the input stream frames. The LEAD H264 Encoder automatically adjusts the input video to match the desired frame rate. The rate is adjusted by dropping or duplicating input frames. If the selected frame rate is lower than the original framerate, the compression will be higher.

Use the value -1 if the output frame rate needs to be the same as the input frame rate.

eH264OUTPUTFORMAT

OutputFormat

Value that specifies the output format. For a list of possible values, refer to eH264OUTPUTFORMAT .

For Flash Encoding with H.264, use H264FORMAT_STANDARD_AVC1 or H264FORMAT_ BASELINE_AVC1. The first will give better compression results.

To generate an h.264 RTP stream, select either H264FORMAT_BASELINE_RTP or H264FORMAT_MAIN_RTP. Such values should be selected only for broadcasting or streaming. The encoded stream should not go to a file or multiplexer.

eH264ENCODINGTHREADS

EncodingThreads

The number of threads used during encoding. The maximum number of threads that can be used is 2. Using two threads with a dual core machine or 2 CPUs will increase the encoding speed significantly. Possible values are:

Auto: Have the LEAD H264 Encoder determine the appropriate number of threads.

1: Uses 1 thread during encoding

2: Uses 2 threads during encoding

X: Uses X threads during encoding and X slices per frame

eH264RESTRICTFORMATS

RestrictAvailableOutputFormats

Restricts the available output formats that LEAD H264 encoder offers on its output pin. If it is set to H264FRESTRICTFORMATS_NONE, all the available output formats will be listed. If it is set to H264RESTRICTFORMATS_AVC1, the encoder (and property page) will list only the AVC1 Main and Baseline profiles AVC1 formats, which means the encoder offers only the FLASH formats.

long

MaxRtpPacketLength

The encoder will process this property only when the selected OutputFormat is H264FORMAT_BASELINE_RTP or H264FORMAT_MAIN_RTP. This property specifies the max length of RTP packets in bytes. Each frame might consist of several RTP packets. The default length of RTP packets is 1250. The minimum value allowable is 142. Refer to RFC 3984 standard for further information.

long

RtpPayloadType

The encoder will process this property only when the selected OutputFormat is H264FORMAT_BASELINE_RTP or H264FORMAT_MAIN_RTP. This property specifies the payload type of the RTP packet. The default value is 97. Refer to RFC 3984 standard for further information.

eH264RTPSLICINGMETHOD

RtpSlicingMethod

The encoder will process this property only when the selected OutputFormat is H264FORMAT_BASELINE_RTP or H264FORMAT_MAIN_RTP.

This property specifies how the video frames are broken into slices by the h.264 encoder. Each slice will be wrapped by a Network Abstraction Layer (NAL) unit inside an RTP packet.

If H264RTPSLICINGMETHOD_MAXBUFFERLENGTH is selected, the encoder will ensure that the size of each slice including the wrapper info (NAL and RTP ), is no larger than MaxRtpPacketLength.

If H264RTPSLICINGMETHOD_MACROBLOCKROW is selected, the resultant output h.264 stream will be playable by TANDBERG Video Conferencing devices.

long

RtpSynchronizationSourceIdentifier

The encoder will process this property only when the selected OutputFormat is H264FORMAT_BASELINE_RTP or H264FORMAT_MAIN_RTP. This property specifies the Synchronization Source Identifier for the RTP packets. If zero or no value is specified the encoder will pick a random value for this field. Refer to RFC 3984 standard for further information.

Interface Methods:

HRESULT WriteToRegistry ()

Description

Writes the values of all of the properties listed above to the system registry, so that the encoder will remember these settings the next time it is used.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT SetNextFrameAsKey ()

Description

Force a key-frame during encoding or changing the type of the encoding frame to be Key frame / I frame. This method could be useful for streaming.

Return

S_OK if always

HRESULT ResetToDefaults (eH264APILEVEL ApiLevel)

Parameters

eH264APILEVEL ApiLevel

Description

Resets resizing to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to H264_APILEVEL_1 = 0.

The LEAD H264 Encoder might change in the future and have different properties or default behaviour. Calling this method ensures the filter will have the same default values as they were at the time you developed your application.

It is best to call ResetToDefaults(H264_APILEVEL_1) before you start setting properties and start calling other methods for this interface.

Returns

S_OK if connected, S_FALSE otherwise.

Data Types:

1. eH264SYMBOLMODE:

typedef enum
{
H264SYMBOL_CAVLC = 0,
H264SYMBOL_CABAC = 1
} eH264SYMBOLMODE;

Lists the possible values for the entropy coding mode, set in the SymbolMode property.

2. eH264OUTPUTFORMAT:

Lists the possible values for the output mode, set in the OutputFormat property.

typedef enum
{
H264FORMAT_AUTO = 0,
H264FORMAT_STANDARD_H264 = 1,// Uses h.264 Main profile
H264FORMAT_STANDARD_AVC1 = 2, // For Flash uses h.264
 Main Profile
H264FORMAT_LEAD = 3, //Uses h.264 Baseline Profile
H264FORMAT_IPOD = 4,
H264FORMAT_PSP = 5,
H264FORMAT_BASELINE_H264 = 6, // Uses h.264 Baseline
 Profile
H264FORMAT_BASELINE_AVC1 = 7, // For Flash uses h.264
 Baseline Profile
H264FORMAT_BASELINE_RTP = 8, // Uses h.264 Baseline Profile
H264FORMAT_MAIN_RTP = 9 // Uses h.264 Main Profile
} eH264OUTPUTFORMAT;

3. eH264ENCODINGTHREADS

typedef enum
{
H264THREAD_AUTO = 0,
H264THREAD_1 = 1,
H264THREAD_2 = 2,
H264THREAD_3 = 3,
H264THREAD_4 = 4,
H264THREAD_5 = 5,
H264THREAD_6 = 6,
H264THREAD_7 = 7,
H264THREAD_8 = 8
} eH264ENCODINGTHREADS;

Lists the possible values for the number of encoding threads, set in the EncodingThreads property.

4. eH264RESTRICTFORMATS

typedef enum
{
H264FRESTRICTFORMATS_NONE = 0,
H264RESTRICTFORMATS_AVC1 = 1,
} eH264RESTRICTFORMATS;

Lists the possible values for the available output formats, set in the RestrictAvailableOutputFormats property.

5. eH264RTPSLICINGMETHOD

typedef enum

{

H264RTPSLICINGMETHOD_MAXBUFFERLENGTH = 0,

H264RTPSLICINGMETHOD_MACROBLOCKROW = 1,

} eH264RTPSLICINGMETHOD;

Lists the possible values for the way a frame can be sliced (broken into slices), set in the RtpSlicingMethod property.

6. eH264APILEVEL

typedef enum
{
H264_APILEVEL_1 = 0
} eH264APILEVEL;


LEAD H263 Decoder (2.0)

Also known as a decompressor, this is a module or algorithm to decompress data.decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD H263 Decoder (2.0)

The LEAD H263 Decoder (2.0) is a DirectShow Ò decoder for decompressing video data compressed using the H.263 standard. For more information on H.263 compression, refer to LEAD H263 Encoder (2.0).

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_L263 MEDIASUBTYPE_LX63 MEDIASUBTYPE_h263 MEDIASUBTYPE_M263 MEDIASUBTYPE_s263 MEDIASUBTYPE_S263
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_YV12 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555 MEDIASUBTYPE_RGB8 (gray only)
Filter CLSID | CLSID_LMH263Decoder
Property Page(s) CLSID | N/A
Filter category | CLSID_LegacyAmFilterCategory
Executable | LCODC26D2.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64, Mobile

This filter is included as part of the following modules:

LEAD H.263 Video Codec Module


LEAD H263 Encoder (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD H263 Encoder (2.0)

The LEAD H263 Encoder (2.0) is a DirectShow Ò encoder for compressing video data using the H.263 standard. The H.263 video compression can be used in a wide range of applications such as desktop videoconferencing, internet video, surveillance and monitoring, transmission over a low bit-rate (down to 9600bps), radio links, and media storage. The compressed video data can be stored inside AVI, Ogg or 3GPP files (with or without audio).

The compression options for the LEAD H263 Encoder can be set manually through the encoder property page. They can also be set programmatically through the ILMH263Encoder interface.

Technical details for the filter are provided in the following table:

Filter Interface(s) | ILMH263Encoder
Interface ID | IID_ILMMPEG2Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12 MEDIASUBTYPE_I420 MEDIASUBTYPE_RGB8(gray only)
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_L263 MEDIASUBTYPE_S263
Filter CLSID | CLSID_LMH263Encoder
Property Page(s) CLSID | CLSID_LMH263EncoderProperty
Filter category | CLSID_VideoCompressorCategory
Executable | LCODC26D2.dll, DSKernel2.dll
Header | ILEncH263_2.h

Platforms

Win32, x64

LEAD H263 Encoder User Interface

This filter is included as part of the following modules:

LEAD H.263 Video Codec Module


LEAD H263 Encoder User Interface (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

LEAD H263 Encoder User Interface (2.0)

The compression options for the LEAD H.263 Encoder can be set manually through the encoder property page. They can also be set programmatically through the ILMH263Encoder interface (see ILMH263Codec Interface ).The following figure shows the encoder property page:

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control.

If you are using the encoder with a third-party software package, refer to your software’s documentation for information on how to access the encoder’s property page(s).

The following table shows the controls and their descriptions:

Control

Description

Bitrate Control group

Use the controls in this group to control the bitrate.

Variable Bitrate (VBR) radio button

Select the Variable Bitrate radio button when you want the file to be a certain quality.

Predefined Quality Factors radio button

Select the Predefined Quality Factors radio button when you want to use one of the predefined quality factors.

Predefined Quality Factors drop-down list box

A list of predefined quality factors. The default value is "Quality is more important than size". Possible values are:

Value

Meaning

Perfect quality

Quality Factor 4

Quality is more important than size

Quality Factor 5

Quality and size are equally important

Quality Factor 6

Size is more important than compression

Quality Factor 9

Highest compression

Quality Factor 31

Custom Quality Factor radio button

Select the Custom Quality Factor radio button to use a custom rate.

Custom Quality Factor drop-down list box

Possible values range from 1 through 31. Low values generate good quality and lower compression, while high values generate low quality and high compression. The default value is 6.

Constant Bitrate (CBR) radio button

Select the Constant Bitrate radio button when the generated file should use a specific bitrate.

Predefined Bitrate List radio button

Select the Predefined Bitrate List radio button when you want to use one of the predefined bitrates.

Predefined Bitrate drop-down list box

A list of predefined bitrates. Possible values are:

Value

Meaning

Modem

(56Kbps)

ISDN

(128Kbps)

ISDN

(256Kbps)

DSL

(384Kbps)

Cable

(768Kbps)

T1

(1500Kbps)

Wireless 802.11b

(11Mbps)

T3

(45Mbps)

Wireless 802.11g

(54Mbps)

LAN

(100Mbps)

LAN

(1Gbps)

Custom Bitrate (bits/sec) radio button

Select this radio button in order to enter a custom setting.

Custom Bitrate edit box

Enter the desired bitrate (in bits/second). Note that this is 8 times larger than a bitrate specified in bytes per second. For example, for a bitrate comparable with a 33kbps modem, you would enter 33000 as the bitrate.

Advanced/Speed settings group

Use the controls in this group to adjust options that affect compression.

Predefined Speed radio button

Select the Predefined Speed radio button when you want to use one of the predefined speeds.

Predefined Speed drop-down list box

A list of predefined speeds specifying the 5 most common combinations. The default value is "High quality". Possible values are:

Value

High quality

Quality is more important than speed

Quality and speed are equally important

Speed is more important than quality

High speed

Custom Speed radio button

Select this radio button to turn each option on or off.

Unrestricted MV check box

Select this check box to allow motion vectors (MV) to point outside the picture. The edge pixels are used as prediction for the "not existing" pixels. With this mode, a significant gain is achieved if there is movement across the edges of the picture, especially for the smaller movies. The default value is selected.

Deblocking Filter check box

Select this check box to reduce the blocky artifacts generated at higher compression by using an adaptive filter across block boundaries. Use this option to improve the video quality at low bit rate (high compression). The default value is selected.

Advanced Intra Coding check box

Select this check box to improve the compression efficiency for INTRA macroblock encoding by using spatial prediction for DCT (Discrete Cosine Transform) coefficient values. The default value is selected.

Advanced Prediction Mode check box

Select this check box to use Overlapped Block Motion Compensation (OBMC) for the luminance part of P-pictures. Four 8x8 vectors instead of one 16x16 vector are used for some of the macroblocks in the picture. The encoder has to decide which type of vectors to use. Four vectors use more bits, but give better prediction. The default value is selected.

Frame Rate Settings group

Use the controls in this group to adjust frame rate settings.

Input Frame Rate (fps) edit box

The Input Frame Rate (fps) edit box displays the frame rate of the input video. This is for informational purposes only.

Output Frame Rate (fps) drop-down list box

Use the Output Frame Rate drop-down list box to specify one of the predefined output frame rates. The default value is "Input Frame Rate". Possible Values are

Value

Meaning

Input Frame Rate

Select this item to keep the frame rate unchanged.

3.000

4.000

5.000

7.000

10.000

12.000

15.000

18.000

20.000

22.000

23.976

24.000

25.000

29.970

30.000

60.000

Other Options group

Use the controls in this group to adjust other options.

RTP check box

Select this check box to packet an H.263 video stream with Real-Time Transport Protocol (RTP) headers. This should be done when transmitting H.263 video streams over the Internet. If you are not using the codec inside a videoconferencing application, we do not recommend using this option. The default value is unselected.

Enable High Compression check box

Select this check box to enable the high compression mode, which is an non-standard extension introduced by LEAD Technologies, Inc. to the H.263 compression algorithm. This will generate smaller video, but only the LEAD H.263 Decoder can decode this video. The default value is unselected.

Output Sorenson Video (Flash) check box

Select this check box to generate Sorenson video, which is a modified version of H.263 compression used in Flash (FLV) files. Unselect this check box to generate regular H.263 video. The default value is unselected.

GOP settings group

Use the controls in this group to adjust the Group Of Pictures (GOP) settings.

Key Frame Interval Unit Seconds radio button

Select this radio button to specify the distance between key frames in seconds. The default value is Frames.

Key Frame Interval Unit Frames radio button

Select this radio button to specify the distance between key frames in frames.

Key Frame Interval edit box

Specifies the maximum distance between key frames. Note that the codec might still insert additional key frames if it detects that a new key frame is necessary. A new key frame is generated sooner if the backround changes too much and the current key frame is not suitable anymore for the frames being compressed. The default value is 30 frames.

No. of Bs between 2 Ps drop-down list box

Specifies how many B frames should be encoded between two Ps. Possible values range from 0 through 10. The default value is 10.

Compression Group

Use the Compression group controls to manage compression. The LEAD H.263 Encoder has two compression modes: Quality driven, using Variable Bitrate (VBR); and Rate driven, using Constant Bitrate (CBR).

Quality-Driven

Use a variable bitrate to create a file with a specific quality. In such cases, it is not possible to accurately predict the generated file size. However, the movie will have the same quality throughout its length. Also, videos of various sizes (width, height, frame rate) will have a consistent quality when they are compressed using the same quality factor. Of the predefined options, "Perfect quality" results in the best quality while "Highest compression" results in the worst quality. If none of these are suitable, select one of the custom quality factors. When using quality driven compression:

  • Low quality factor values will generate better quality videos and lower compression (larger file size)

  • High quality factor values will generate lower quality videos and higher compression (smaller file size)

  • Variable bitrate (VBR) compression can be controlled in two ways: by selecting one of the predefined compressions, or by selecting a custom quality factor.

Rate-Driven

Use a constant bitrate when the generated file should have a specific bitrate. Typically this is used when a file is put on a web site and the file is to be played by computers whose Internet connection matches a specific speed. Or, when a codec in a videoconferencing application uses a specific connection speed.

Remember that the bitrate is measured in bits per second (bps) not bytes per second! To convert bits/second to bytes/second, divide by 8. Files compressed with variable bitrates should have the same size, regardless of the video width and height. This means that when two videos of different width and height are converted to the same bitrate, the video with the larger size will have a poorer quality than the video with smaller size.

Constant Bitrate (CBR) compression can be controlled in two ways: by selecting one of the predefined bitrates, or by selecting a custom bitrate.

Advanced/Speed Settings group

Use the controls in the Advanced/Speed Settings group to manage four encoder options that affect the compression. The Predefined Speed options lists the 5 most common combinations. Use the Custom Speed options to turn specific options on or off. When using any of these options, be aware that the compression / decompression algorithm becomes more complex, hence the compression / decompression process becomes slower. However, each option improves the performance of the encoder (resulting in better compression and quality).

Frame Rate Settings

Use the controls in the Frame Rate group to modify the frame rate of the file being compressed. Usually, videos are 30fps (30 frames per second). At this frame rate, the human eye perceives moving objects as smooth. Reducing the frame rate greatly increases the compression. But, as the frame rate is reduced, the video becomes jerkier. At 15fps video will still look acceptably smooth. Below this, the jerkiness becomes noticeable.

Generally, decrease the video frame rate in order to achieve higher compression. You can also increase the frame rate, but that is not recommended, since the output file will be bigger and the quality will not be any better. For example, if the original video is 15fps and you compress it as 30fps, the compressed video will NOT be smoother than the original.

The Input Frame Rate box displays the frame rate of the input video. This is for informational purposes only.

Use the Output Frame Rate drop-down list box to select one of the predefined output frame rates. When the output frame rate to Input frame rate, then the H.263 Encoder will not change the video frame rate. Select one of the other options (3.000, 4.000, etc ) to use the specified frame rate for the output file. For example, selecting 15.000 will make the output video 15fps.

It is recommended to reduce the frame rate if you increase the quality factor to the point you start seeing compression artifacts and the compression is still not good enough. In that case, reduce the frame rate and reduce the quality factor and you might get better visual results.

Note: The Video For Windows (VFW) version of the codec cannot change the frame rate for the file. If you look at the properties for a file generated with the LEAD H.263 Codec (VFW), the frame rate will appear to be the same as the input file. But, if you play the file, you will notice that the frame rate is changed. Also, the VFW codec can only REDUCE the frame rate. If you convert a file that is 15fps and try to convert the file to 30fps, the generated file will still be 15fps.

Other Options group

Select the RTP check box to packet an H.263 video stream with Real-Time Transport Protocol (RTP) headers. This should be done when transmitting H.263 video streams over the Internet. If the codec is not being used inside a videoconferencing application, we do not recommend using this option.

Select the Enable High Compression check box to enable the high compression mode, which is a non-standard extension introduced by LEAD Technologies, Inc. to the H.263 compression algorithm. The result of such compression is a smaller video, but only the LEAD H.263 Decoder can decode this video.

Select the Output Sorenson Video (Flash) check box to enable Sorenson video, which is a non-standard extension introduced by Sorenson Media, Inc. to the H.263 compression algorithm. This format is used in Flash (FLV) files. Leave this check box unselected to generate regular H.263 video (including video for 3GPP format).

GOP settings (Group Of Pictures settings)

Use the controls in the GOP Settings group to specify the distance between key frames and the number of B frames encoded between two P frames. Key frames are frames compressed independently and they have the best quality in the video. In highly compressed video, you will notice that at regular intervals, the video starts looking good, then it degrades, then it fixes itself, it degrades again, etc. The encoding of a key frame causes the fix. So the more key frames you have, the better the video will look. There is a price for that: key frames are a lot larger then the non-key frames, so the more key frames you have the lower the compression will be.

Also, the more key frames are used the faster the seek operations. Seeks occur when you play a video file and you try to skip ahead in the movie. You will notice that the playback does not start immediately. Reduce the delay between the seek and when the playback starts by reducing the distance between key frames.

The distance between key frames to be can be specified either in Seconds or Frames. For example, to have a key frame to come every 3 seconds, set the unit to Seconds and the distance to 3. To have the key frame to come every 90 frames, set the unit to Frames and the distance to 90. Note that, for a 30fps video, 90 frames is equivalent to 3 seconds. For a 10fps video, 90 frames is equivalent to 9 seconds.

Use the Key Frame Interval Unit radio buttons to specify whether the distance between key frames is in Seconds or Frames. Use the Key frame interval to specify the maximum distance between key frames. Note that the codec might still insert additional key frames if it detects that a new key frame is necessary. A new key frame is generated sooner if the background changes too much and the current key frame is not suitable anymore for the frames being compressed.

I Frames and P Frames

A video stream is comprised of I Frames, B Frames and P Frames:

  • I: (Intraframe, or key frame) frames are the largest frames, with the best quality and can be used for seeking and resynchronization. They are compressed independently and do not depend on other frames.

  • P: (Predictive) frames are encoded using the previous I (or P) frame as reference. P frames are compressed more than I frames. P frames are smaller than I frames, with less quality but higher compression. They depend on the previous I or P frame.

  • B: (Bi-directional) frames are encoded using both previous and next I (or P) frames as reference and they are compressed more than both I, and P frames. B frames are smaller than I frames, with less quality but higher compression. They depend on the previous I or P and on the next I or P frames. They are usually smaller than P frames, but that is not guaranteed. They also take longer to compress than P frames.

Use more B and P frames (using the selections in the No. of Bs between 2 Ps drop-down list) to increase compression. The No. of Bs between 2 Ps: represents the number of B frames between 2 successive P frames. All the frames between successive P frames are B frames.

General notes

1) When the encoder is in Constant Bitrate mode (CBR), the generated bitrate will be close to, but not exactly the rate requested. If the rate is too low for the video dimensions (width x height) and the frame rate, the achieved bitrate might not be even close to what you requested. Also, if you generate AVI files, keep in mind that, by default, the generated AVI files will have padding with JUNK chunks. The padding is intended to speed up the playback by aligning the compressed chunks in the file to multiples of 512. This can distort the real achieved video bitrate and will make it seem like the compressor did not compress too much. To avoid this, you need to set the multiplexing mode in the AVI muxer properties to Full. Here is a screen shot of this setting as obtained with the M2Convert Pro application (see http://www.m2convert.com):

If you save AVI files using a different application, please consult the applications documentation to find out how you turn on the full multiplexing when creating AVI files. Or you can avoid all these problems by using Ogg files, which have a much lower overhead than AVI files.

Also, if you save video and audio, it will be harder to tell what the video bitrate is. The custom bitrate from the video compressor is the target bitrate for the video stream. The generated files bitrate will be higher, because it will contain video, audio and the overhead of the file format.

The generated bitrate (in bits/second) for a particular file is

Bitrate_bps = file_size_bytes * 8 / file_duration_seconds.

Generating a 3GPP H.263 Stream

It is possible to create a 3GPP H.263 stream that will play on mobile phones by using the LEAD H263 Encoder, the LEAD AMR Audio Encoder, and the LEAD ISO Mixer, along with the Resize Filter and Frame Rate Controller.

The following H.263 settings are suggested:

ILMH263Codec:: put_UseQuality(VARIANT_FALSE);

ILMH263Codec::put_UsePredefinedBitrate(VARIANT_FALSE);

ILMH263Codec::put_CustomBitrate(64000);

ILMH263Codec::put_UsePredefinedSpeed(VARIANT_FALSE);

ILMH263Codec::put_UseUnrestrictedMotionVector(VARIANT_FALSE);

ILMH263Codec::put_UsePBFrame(VARIANT_FALSE);

ILMH263Codec::put_UseDeblockingFilter(VARIANT_FALSE);

ILMH263Codec::put_UseAdvancedIntraCoding(VARIANT_FALSE);

ILMH263Codec::put_UseAdvancedPredictionMode(VARIANT_FALSE);

ILMH263Codec::put_OutputFrameRate(-1.0);

ILMH263Codec::put_UseRTP(VARIANT_FALSE);

ILMH263Codec::put_UseSuperCompression(VARIANT_FALSE);

ILMH263Codec::put_IDistanceUnit(UNIT_SECONDS);

ILMH263Codec::put_IDistance(60);

ILMH263Codec::put_PDistance(0);

ILMH263Codec::put_SorensonOutput(VARIANT_FALSE);

Please note the following about these settings:

  • The average video bitrate must not exceed 64000

  • Various I frame distances can be used, but keeping the P frame distance at 0 is recommended

  • The frame rate cannot exceed 14.985 fps.

  • The video dimensions have to be 128x96 or 176x144


LEAD H263 Encoder (VFW) (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD H263 Encoder (VFW) (2.0)

The LEAD H263 Encoder (VFW) is a VFW codec for compressing video data using the H.263 standard. For more information on H.263 compression, refer to LEAD H263 Encoder (2.0). New applications should use the LEAD H263 Encoder/Decoder filters. This VFW codec is provided for compatibility with older applications. This VFW codec is also used by Media Player to play WMV files using H.263 compression.

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB8(gray only)
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_L263 MEDIASUBTYPE_S263
Filter CLSID | N/A
FOURCC | L263
Property Page(s) CLSID | N/A
Filter category | N/A
Executable | LCODC26X2.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64

LEAD H263 Encoder User Interface

You need to unlock the LEAD H263 Encoder (VFW) (2.0) to use it in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decompressor, this is a module or algorithm to decompress data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Flash format.

Available in LEADTOOLS Multimedia toolkits.

ILMH263Encoder Interface

Documentation for the interface of the LEAD H263 Encoder is broken down into the following sections:.

Data types

Interface Properties

Interface Methods

ITU-T Recommendation H.263 and LEAD H.263 Encoder

Data types:

eQUALITY enumeration

Value | Description
PERFECTQUALITY | [0] Very good quality. Equivalent to a custom quality factor of 4.
QUALITYMOREIMPORTANTTHANSIZE | [1] Good quality, more compression than PERFECTQUALITY. Equivalent to a custom quality factor of 5.
QUALITYSIZEEQUALLYIMPORTANT | [2] Good quality, more compression than QUALITYMOREIMPORTANTTHANSIZE. Equivalent to a custom quality factor of 6.
SIZEMOREIMPORTANTTHANQUALITY | [3] Decent quality, more compression than QUALITYSIZEEQUALLYIMPORTANT. Equivalent to a custom quality factor of 9.
HIGHESTCOMPRESSION | [4] Highest compression (lowest quality). Equivalent to a custom quality factor of 31.

eBITRATE enumeration

Value | Description
MODEM_56K | [0] 56K modem. Equivalent to a bitrate of 56000.
ISDN_128K | [1] 128K ISDN line. Equivalent to a bitrate of 128000.
ISDN_256K | [2] 256K ISDN line. Equivalent to a bitrate of 256000.
DSL_384K | [3] 384K DSL line. Equivalent to a bitrate of 384000.
CABLE_768 | [4] 768K Cable line. Equivalent to a bitrate of 768000.
T1_1500K | [5] T1 line. Equivalent to a bitrate of 1500000.
WIRELESS_802_11B_11M | [6] Wireless 801.11b network card. Equivalent to a bitrate of 11000000.
T3_45M | [7] T3 line. Equivalent to a bitrate of 45000000.
WIRELESS_802_11G_54M | [8] Wireless 801.11g network card. Equivalent to a bitrate of 54000000.
LAN_100M | [9] 100Mbps network card. Equivalent to a bitrate of 100000000.
LAN_1G | [10] 1Gbps network card. Equivalent to a bitrate of 1000000000.

eSPEED enumeration

Value | Description
HIGHQUALITY | [0] High quality option. Turn on all settings.
QUALITYMOREIMPORTANTTHANSPEED | [1] Good quality. Turn on all options except the deblocking filter.
QUALITYSPEEDEQUALLYIMPORTANT | [2] Compromise between quality and speed. Only the Unrestricted MV and Advanced Prediction modes are turned on.
SPEEDMOREIMPORTANTTHANQUALITY | [3] Favor speed at the expense of quality. Only Unrestricted MV is on.
HIGHSPEED | [4] Highest speed. No optional mode is turned on.

eIDISTANCEUNIT enumeration

Value | Description
UNIT_FRAMES | [0] The unit for the IDistance property is frames.
UNIT_SECONDS | [1] The unit for the IDistance property is seconds.

Constants

Type | Value | Description
long | MINQUALITYFACTOR | [1] The minimum value for CustomQuality . This generates the highest quality video and the lowest compression.
long | MAXQUALITYFACTOR | [31] The maximum value for CustomQuality . This generates the lowest quality video and the highest compression.

eH263COMPATIBILITYMODE enumeration

Value | Description
H263COMPATIBILITY_DEFAULT | [0] Default mode: all encoder settings are enabled.
H263COMPATIBILITY_FLV | [1] Force the encoder to offer only Sorenson compression settings. Use this if you know you are creating FLV files.

eH263_APILEVEL enumeration

Value | Description
H263_APILEVEL_1 | [0] Use the defaults from the previous version of the codec. This APILEVEL's defaults include setting the IDistanceUnit property to UNIT_SECONDS and the IDistance property value to the default value of 60, yielding 1 key frame every 60 seconds.
H263_APILEVEL_2 | [1] Use the defaults from the current version of the codec. This APILEVEL's defaults have changed to use UNIT_FRAMES instead of UNIT_SECONDS for the IDistanceUnit property default. Also, the IDistance property is set to the default value of 30, yielding a key frame every 30 frames.

Interface Properties:

Type

Name

Description

VARIANT_BOOL

UseQuality

Set to TRUE to use quality-based compression (VBR = variable bitrate). In this case, the quality is given by the UsePredefinedQuality, PredefinedQuality and QualityFactor properties.

Set to FALSE to use bitrate-based compression (CBR = constant bitrate). In this case, the bitrate is given by the PredefinedBitrate and BitrateValue properties.

VARIANT_BOOL

UsePredefinedQuality

(Used only if UseQuality is TRUE). Set to TRUE to use a predefined quality through PredefinedQuality .

Set to FALSE to use a custom quality factor through CustomQuality .

eQUALITY

PredefinedQuality

(Used only if UseQuality is TRUE and UsePredefinedQuality is TRUE). Use this property to choose one of the predefined quality options. See the eQUALITY enumeration for possible values.

long

CustomQuality

(Used only if UseQuality is TRUE and UsePredefinedQuality is FALSE). Use a custom quality factor. The value ranges from 1 (best quality, lowest compression) to 31 (worst quality, highest compression).

VARIANT_BOOL

UsePredefinedBitrate

(Used only if UseQuality is FALSE). Set to TRUE to use a predefined bitrate through PredefinedBitrate .

Set to FALSE to use a custom bitrate through CustomBitrate .

eBITRATE

PredefinedBitrate

(Used only if UseQuality is FALSE and UsePredefinedBitrate is TRUE). Use this value to set the desired compressed video rate to one of the predefined bitrates. See the eBITRATE enumeration for possible values.

long

CustomBitRate

(Used only if UseQuality is FALSE and UsePredefinedBitrate is FALSE). Use this value to set the desired compressed video rate in bits per second.

VARIANT_BOOL

UsePredefinedSpeed

Set to TRUE to use a predefined speed through PredefinedSpeed .

Set to FALSE to control the speed using the UseUnrestrictedMotionVector , UseAdvancedIntraCoding , UseAdvancedPredictionMode , UseDeblockingFilter properties.

eSPEED

PredefinedSpeed

(Used only if UsePredefinedSpeed is TRUE). Use this property to set the speed to one of the predefined values. See the eBITRATE enumeration for possible values.

VARIANT_BOOL

UseUnrestrictedMotionVector

(Used only if UsePredefinedSpeed is FALSE). If TRUE, motion vectors are allowed to point outside the picture. The edge pixels are used as prediction for the "not existing" pixels. With this mode, a significant gain is achieved if there is movement across the edges of the picture, especially for the smaller movies. Implements (Annex D) Unrestricted Motion Vector mode of the ITU-T Recommendation H.263 and LEAD H.263 Encoder.

VARIANT_BOOL

UseDeblockingFilter

(Used only if UsePredefinedSpeed is FALSE). If TRUE, the blocky artifacts generated at higher compression are reduced by using an adaptive filter across block boundaries. Use this option to improve the video quality at low bit rate (high compression). Implements (Annex J) Deblocking Filter mode of the ITU-T Recommendation H.263 and LEAD H.263 Encoder.

VARIANT_BOOL

UseAdvancedIntraCoding

(Used only if UsePredefinedSpeed is FALSE). If TRUE, the compression efficiency for INTRA macroblock encoding is improved by using spatial prediction for DCT (Discrete Cosine Transform) coefficient values. Implements (Annex I) Advanced INTRA Coding mode of the ITU-T Recommendation H.263 and LEAD H.263 Encoder.

VARIANT_BOOL

UseAdvancedPredictionMode

(Used only if UsePredefinedSpeed is FALSE). If TRUE, Overlapped Block Motion Compensation (OBMC) is used for the luminance part of P-pictures. Four 8x8 vectors instead of one 16x16 vector are used for some of the macroblocks in the picture. The encoder has to decide which type of vectors to use. Four vectors use more bits, but give better prediction (compression). Implements (Annex T) Modified Quantization mode of the ITU-T Recommendation H.263 and LEAD H.263 Encoder. Implements (Annex F) Advanced Prediction mode of the ITU-T Recommendation H.263 and LEAD H.263 Encoder.

long

InputFrameRate

(Read-only). Use this property to obtain input frame rate in frame/sec, which can be used to determine how to set the OutputFrameRate property.

float

OutputFrameRate

Use this property to control the output frame rate. You can set the output frame rate to be the same as the input frame rate (-1) or you can set it to particular output frame rate (if > 0). Note that you should set the output frame rate to be less than the input frame rate (to get better compression). It is not very useful to set the output frame rate to the less than the input frame rate.

VARIANT_BOOL

UseRTP

If TRUE, the encoder packetizes an H.263 video stream with Real-Time Transport Protocol (RTP) headers. This option should be used when transmitting H.263 video streams over the Internet.

VARIANT_BOOL

UseSuperCompression

Set to TRUE, to enable the high compression mode, which is a non-standard extension introduced by LEAD Technologies, Inc. to the H.263 compression algorithm. This generates a smaller video, but only the LEAD H.263 Decoder can decode this video. The video generated in this mode has a small quality degradation (especially when there is text), but the compression gain is significant. This mode is very useful for achieving lower bitrates.

Set to FALSE to disable this mode. The default is FALSE.

eIDISTANCEUNIT

IDistanceUnit

If set to UNIT_FRAMES, the IDistance property sets the distance between I frames in frames.

If set to UNIT_SECONDS, the IDistance property sets the distance between I frames in seconds.

long

IDistance

Use this to set the interval for I frames. The IDistanceUnit property contains the unit for this property (seconds or frames). The distance between two consecutive I frames is sometimes referred to as the Key Frame interval. I (Intraframe) frames are encoded independently without any reference to a previous frame or forward frame. All the frames between I frames are P and B frames. P (Predictive) frames are encoded using the previous frame as reference. P frames are compressed more than I frames. B (Bi-directional) frames are encoded using both the previous and the next frames as reference and they are compressed better than I and P frames.

If the distance between I frames increases, the compression ratio increases. However, a large distance between I frames has its disadvantages:

  • If an I frame is lost before reaching the decoder (typically due to a noisy or an unreliable channel), the decoder has to wait a long time without displaying anything until the next I frame comes.

  • A large key frame interval makes seeking (searching through the video data) slower.

long

PDistance

Use this to set the number of B frames between two consecutive P frames. The unit for this property is always frames. If set to 0, the compressor generates only I and P frames.

VARIANT_BOOL

SorensonOutput

Set to TRUE, to generate Sorenson video used by Flash ( FLV ) files. This video is a modified form of H.263 compression. Set to FALSE to generate regular H.263 video. The default value is FALSE.

eH263COMPATIBILITYMODE

CompatibilityMode

Use this property to determine which settings will be available in the property page.
Set to H263COMPATIBILITY_DEFAULT to make all settings available.
Set to H263COMPATIBILITY_FLV to force the encoder to offer only settings compatible with the FLV format. This option forces the following settings:

  • SorensonOutput = VARIANT_TRUE
  • UseRTP = VARIANT_FALSE
  • UseSuperCompression = VARIANT_FALSE

Interface Methods:

HRESULT ResetToDefaultsEx(eH263_APILEVEL ApiLevel);

Parameters

eH263_APILEVEL ApiLevel

Which version of the codec to set the defaults to.

Description

Resets the encoder to default values. The ApiLevel determines which default values to use. Current applications should set the ApiLevel to H263_APILEVEL_2 = 1.

The encoder might change in the future and have different properties or default behavior. Calling this method ensures the encoder will have the same default values as they were at the time you developed your application.

It is best to call ResetToDefaultsEx(H263_APILEVEL_2) before beginning to set properties and to call other methods for this interface.

HRESULT StartChangingAttributes();

Parameters

None

Description

Start changing attributes, but don't use the new settings until StopChangingAttributes is called.

To change more than one encoder setting, it is best to call StartChangingAttributes before making the first change and StopChangingAttributes after making the last change. This way, the encoder does not make any checks on the validity of the settings until all the changes have been made. Also, some changes might require a reconnection of the output pin and making all the changes between a StartChangingAttributes and StopChangingAttributes pair ensures there is only one reconnection of the output pin.

HRESULT StopChangingAttributes(VARIANT_BOOL bCancelChanges);

Parameters

VARIANT_BOOL bCancelChanges

Determines whether the changes should be kept (VARIANT_FALSE) or cancelled (VARIANT_TRUE).

Description

Stop changing the attributes. Call this method after changes to the interface are complete.

Set bCancelChanges to VARIANT_FALSE to apply all the changes that have been made. Set bCancelChanges to VARIANT_TRUE to revert the encoder to the settings that were used prior to calling StartChangingAttributes.

ITU-T Recommendation H.263 and LEAD H.263 Encoder

Enable and disable h.263 options in terms of ITU-T Recommendation H.263 as follows:

-(Annex I) Advanced INTRA Coding mode

Implemented

To turn it on or off use the UseAdvanceIntraCoding property.

-(Annex J) Deblocking Filter mode

Implemented

To turn it on or off use the UseDeblockingFilter property.

-(Annex T) Modified Quantization mode

Implemented

To turn it on or off use the UseAdvancedPredictionMode method (it is associated with advanced Prediction Mode).

-( Annex D) Unrestricted Motion Vector

Implemented

To turn it on or off use the UseUnrestrictedMotionVector property.

-(Annex F) Advance Prediction mode

Implemented

To turn it on or off use the UseAdvancedPredictionMode method.

-(Annex S) Alternative Inter VLC mode

Not implemented in the encoder. But it is implemented in the decoder.

-(Annex K) Slice Structured mode

Not implemented.


LEAD H264 Encoder (4.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD H264 Encoder (4.0)

The LEAD H264 Encoder is a DirectShowÒ filter for compressing and decompressing video data using the H.264/AVC standard. The H.264 standard is the latest video standard developed jointly by ITU and MPEG. The H.264/AVC standard provides a far more efficient algorithm for compressing video. It typically outperforms all existing standards by a factor of three to four especially in comparison to MPEG-2.

H264 is a high quality video compression algorithm suited for all types of applications with different ranges of bit rates. The compressed video data can be stored inside AVI, OGG or ISO Base files with the option of saving the file with or without the audio data.

NOTE: If you are using the encoder with a third-party software package, refer to your softwares documentation for information on how to access the encoders property page(s). If you do not have an application for converting multimedia files, you can download M2Convert Pro from http://www.M2Convert.com.

The compression options for the Encoder can be set manually through the encoder property page. The compression options can also be set programmatically using the filter interface.

Filter Interface(s) | ILMH264Encoder
Interface ID | IID_ILMH264Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12 MEDIASUBTYPE_I420
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_L264 MEDIASUBTYPE_LX64 MEDIASUBTYPE_h264 ISOMEDIATYPE_avc1 MEDIASUBTYPE_avc1 Type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_h264
Filter CLSID | CLSID_LMH264Encoder
Property Page(s) CLSID | CLSID_LMH264EncoderProperty
Filter category | CLSID_VideoCompressorCategory
Executable | LENCH2644.dll, DSKernel2.dll
Header | ILEncH2644.h

Platforms

Win32, x64

LEAD H264 Encoder User Interface

This filter is included as part of the following modules:

LEAD H.264 Video Encoder Module


LEAD H264 Encoder (DMO) (4.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Available in LEADTOOLS Multimedia toolkits.

LEAD H.264 Encoder (DMO) (4.0)

The LEAD H264 Encoder (DMO) is a DirectX Media Object (DMO) filter for compressing video data using the H.264/AVC standard. The H.264 standard is the latest video standard developed jointly by ITU and MPEG. The H.264/AVC standard provides a far more efficient algorithm for compressing video. It typically outperforms all existing standards by a factor of three to four especially in comparison to MPEG-2.

H264 is a high quality video compression algorithm suited for all types of applications with different ranges of bit rates. The compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data.

The compression options for the Encoder can be set manually through the encoder property page. The compression options can also be set programmatically using the filter interface.

The encoding options for the LEAD H264 Encoder Filter (DMO) and LEAD H264 Encoder Filter Advanced (DMO) are the same as the encoding options for the LEAD H264 Encoder (a DirectShowï¿½ filter), except for the super compression option which is:

  • Always OFF for LEAD H264 Encoder Filter (DMO)

  • Always ON for LEAD H264 Encoder Filter Advanced (DMO)

These codecs are designed to work with the Microsoft Windows Media Encoder program. This is part of the Windows Media Server technology package, which was designed to stream video over the Internet. For more information on the Windows Media Encoder, you should refer to the Microsoft documentation on MSDN.

These DMO encoders should be used with the Quality VBR encoding mode since that is what the Windows Media Encoder uses. In addition, the following encoding options of the LEAD H264 Encoder Filter need to be adjusted for the Windows Media Encoder as follows:

  • Quality factor: The Microsoft Windows Media uses a quality factor that ranges from 1-100. These values are remapped since the LEAD range is from 1-50. Remapping is performed as follows:

Microsoft values 1-2 become a LEAD value of 1.

Microsoft values 3-4 become a LEAD value of 2.

Microsoft values 5-6 become a LEAD value of 3 .

Microsoft values 7-8 become a LEAD value of 4

.

.

.

Microsoft values 99-100 become a LEAD value of 50 .

  • Number of Ps between 2 Is: will be overridden by the Key frame interval. This will be adjusted taking into account the number of Bs between 2 Ps. I frames will occurs after the requested number of seconds.

NOTES:

For more information on the Windows Media Encoder, you should refer to the Microsoft documentation on MSDN.

It is recommended to use the DMO encoders only with Windows Media Encoder. Applications written with LEADTOOLS multimedia toolkit or applications that encode video using DirectShow should use the DirectShow version of the H264 codec (LEAD H264 Encoder Filter).

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_L264
Filter CLSID | N/A
Property Page(s) CLSID | N/A
Filter category | CLSID_VideoCompressorCategory
Executable | LENCH2644.dll,
Header | N/A
Profiles | See Lead H264 Codecs Profile Support

This filter is included as part of the following modules:

LEAD H264 Video Encoder Module

Platforms

Win32, x64


LEAD H264 Encoder Advanced (DMO) (4.0)

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD H264 Encoder Advanced (DMO) (4.0)

The LEAD H264 Encoder Advanced (DMO) is a DirectX Media Object (DMO) filter for compressing video data using the H.264/AVC standard. The H.264 standard is the latest video standard developed jointly by ITU and MPEG. The H.264/AVC standard provides a far more efficient algorithm for compressing video. It typically outperforms all existing standards by a factor of three to four especially in comparison to MPEG-2.

H264 is a high quality video compression algorithm suited for all types of applications with different ranges of bit rates. The compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data.

The compression options for the LEAD H264 Advanced Encoder Filter (DMO) can be set manually through the property page of the LEAD H264 Encoder ( a DirectShowï¿½ filter). This is necessary because the DMO architecture does not allow the use of property pages specific to the codec.

The encoding options for both these codecs are the same as the encoding options for the LEAD H264 Encoder (DirectShow filter), except for the super compression options, which are:

  • Always OFF for LEAD H264 Encoder Filter (DMO)

  • Always ON for LEAD H264 Encoder Filter Advanced (DMO)

These codecs are designed to work with Microsofts Media Encoder program. This is part of the Windows Media Server technology package, which is intended to stream video over the Internet. For more information on the Windows Media Encoder, you should refer to the Microsoft documentation on MSDN.

These DMO encoders should be used with the Quality VBR encoding mode since that is what the Windows Media Encoder uses. In addition, the following encoding options of the LEAD H264 Encoder Filter need to be adjusted for the Windows Media Encoder as follows:

  • Quality factor: The Microsoft Windows Media uses a quality factor that ranges from 1-100. These values are remapped since the LEAD range is from 1-50. Remapping is performed as follows:

Microsoft values 1-2 become a LEAD value of 1.

Microsoft values 3-4 become a LEAD value of 2.

Microsoft values 5-6 become a LEAD value of 3 .

Microsoft values 7-8 become a LEAD value of 4

.

.

.

Microsoft values 99-100 become a LEAD value of 50 .

  • Number of Ps between 2 Is: will be overridden by the Key frame interval. This will be adjusted taking into account the number of Bs between 2 Ps. I frames will occurs after the requested number of seconds.

NOTES:

It is recommended to use the DMO encoders only with the Windows Media Encoder. For more information on the Windows Media Encoder, you should refer to the Microsoft documentation on MSDN.

Applications written with LEADTOOLS multimedia toolkit or applications that encode video using DirectShow should use the DirectShow version of the H264 codec (LEAD H264 Professional Encoder Filter).

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_LX264
Filter CLSID | N/A
Property Page(s) CLSID | N/A
Filter category | CLSID_VideoCompressorCategory
Executable | LENCH2644.dll,
Header | N/A

This filter is included as part of the following modules:

LEAD H.264 Video Encoder Module

Platforms

Win32, x64


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

LEAD H264 Encoder User Interface (4.0)

The Encoder property page provides a user interface for changing the filter attributes.

Changes will be applied only when the filter’s state is stopped with the ability to set them permanently by selecting Apply or OK, or abandoning them by selecting Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in the figure below:

The following table shows the controls and their descriptions:

Control

Description

Quality Driven radio button

If this button is selected, a quality factor, set in the Quality Factor edit box, determines the video quality. A Quality Factor of 1 gives the highest quality and the largest video file size. A Quality Factor of 49 gives the smallest file size with low video quality. The default is 28.

Quality Factor edit box

Value that determines the video quality if the Quality Driven radio button is selected.

Rate Driven radio button

If this button is selected, the compression level is constant and the storage requirements can be easily predicted. However, the quality of more dynamic scenes or those with more picture detail may be affected. The associated bit rate describes the amount of data used/transferred within a time period. It is directly related to the compression level. The higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bit Rate edit box in Bits Per Sec.

Bit Rate edit box

Value that determines the bit rate if the Rate Driven radio button is selected.

CABAC (Arithmetic Coding) radio button

Sets the entropy coding mode to Context-based Adaptive Binary Arithmetic Coding (CABAC). CABAC gives better compression at the same quality but is a little bit slower than CAVLC.

CAVLC (Huffman) radio button

Sets the entropy coding mode to Context-Adaptive Variable-Length Coding (CAVLC). CABAC gives better compression at the same quality but is a little bit slower than CAVLC.

Output Format drop-down list box

Selects the output format. Possible values are as follows:

Value

Meaning

Auto

Prompts the LEAD H264 Encoder to determine the appropriate format.

Main Profile (h264)

Uses MEDIATYPE_Video and MEDIASUBTYPE_h264

Main Profile (avc1)/ Flash

Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

LEAD (L264)

Uses MEDIATYPE_Video and MEDIASUBTYPE_L264 or MEDIASUBTYPE_LX64

iPod (avc1)

Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

The LEAD H264 Encoder will use the appropriate setting to produce video files that can be played on iPod devices.

PSP (avc1)

Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1

The LEAD H264 Encoder will use the appropriate setting to produce video files that can be played on PSP devices.

Baseline Profile(h264)

Uses MEDIATYPE_Video and MEDIASUBTYPE_h264.

Baseline Profile(avc1)

Uses MEDIATYPE_Video and ISOMEDIATYPE_avc1 or MEDIASUBTYPE_avc1.

Main Profile(RTP Packetized)

Uses MEDIATYPE_Stream and MEDIASUBTYPE_h264.

Baseline Profile(RTP Packetized)

Uses MEDIATYPE_Stream and MEDIASUBTYPE_h264.

Super Compression check box

If this check box is selected, LEAD's improvement to the H264 compression is used. This option produces very high compression and makes the encoding and decoding processes very fast. If high quality video is desired it is recommended to disable this option.

This option is recommended for video conferencing and broadcast applications where speed and size are very important and moderate quality is ok.

This property is only available if the output is Auto,MainProifile (h264), Main Profile(avc1) / Flash, LEAD (L264), Main Profile(RTP Packetized) or Baseline Profile( RTP Packetized).

Output Frame Rate drop-down list box

Sets the playback frame rate, in frames per second, of the compressed video, regardless of the rate of the input stream frames. The LEAD H264 Encoder automatically adjusts the input video to match the desired frame rate. The rate is adjusted by dropping or duplicating input frames. If the selected frame rate is lower than the original frame rate, the compression will be higher.

If "input framerate" is selected, the output frame rate will be exactly the same as the input frame rate. Use this selection when you don't want to change the frame rate.

No. of Ps between 2 Is drop-down list box

If Enable Set GOP check box is cleared, then option shown is No. of Ps between 2 Is for the number of Ps between 2 successive I frames.

GOP Length drop-down list box

If Enable Set GOP check box is selected, then the I frame length value can be selected from the drop-down list box. For example: GOP Length = 4, and No of Bs between 2 Ps = 1, results in IPBP... for each I frame.

No. of Bs between 2 Ps drop-down list box

Sets the number of B frames between 2 successive P frames.

Enable Set GOP Length check box

Changes the units of measure of the distance between two I-frames.

Enable Set GOP Length check box is selected: drop-down list box unit changes to GOP Length

Enable Set GOP Length check box is cleared: drop-down list box unit changes to No. of Ps between 2 Is

Encoding Threads drop-down list box

The number of threads used during encoding. The maximum number of threads that can be used is 16. Using two threads with a dual core machine or 2 CPUs will increase the encoding speed significantly. Possible values are:

Value

Meaning

Auto

Prompts the LEAD H264 Encoder to determine the appropriate number of threads.

1

Uses 1 thread during encoding and 1 slice per frame.

2

Uses 2 threads during encoding and 2 slices per frame.

X

Uses X threads during encoding and X slices per frame.

I Frames and P Frames

To increase the compression performance, H264 uses Temporal Compression. Temporal compression is achieved by encoding only the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An H264 video stream comprises I Frames, B Frames and P Frames:

  • I: (Intraframe) frames. These are encoded without reference to another frame to allow for random access.

  • P: (Predictive) frames are encoded using the previous I (or P) frame as reference. P frames are compressed more than I frames.

  • B: (Bi-directional) frames are encoded using both previous and next I (or P) frames as reference and they are compressed more than both I, and P frames.

To increase the compression of H264, more B and P frames should be used. You do so using the "No. of Ps between 2 Is" and "No. of Bs between 2 Ps" options on the Encoder Property Page:

  • No. of Ps between 2 Is: represents the number of P frames between 2 successive I frames. All the frames between successive I frames are P or B frames.

  • No. of Bs between 2 Ps: represents the number of B frames between 2 successive P frames. All the frames between successive P frames are B frames.

For example if No. of Ps between 2 Is is 3, and No. of Bs between 2 Ps is 5, then the video stream looks like:

I B B B B B P B B B B B P B B B B B P &..

The distance between I frames must be a multiple of the distance between the P frames. The encoder will automatically adjust these values to preserve this relationship.


LEAD H264 Decoder (3.0)

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data. COmpressor combined with a DECompressor, or encoder and a decoder , which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD H264 Decoder (3.0)

The LEAD H264 Decoder is a DirectShow decoder that can decompress video compressed by any H264 codec. Note that there are two DirectShow encoders and only one DirectShow decoder because the DirectShow decoder can decode data encoded by any codec. The DirectShow decoder is preferred over the DirectX Media Object (DMO) decoder when playing H264 video from AVI, Ogg or any non-WMV format in both Media Player and other DirectShow-based players.

The DirectShow decoder is capable of playing H264 video from WMV files in players built with LEADTOOLS or DirectShow. Windows Media Player will NOT use a DirectShow decoder to play WMV files. It will insist on using DMO or VFW decoders to play WMV files. Media Player will, however, use DirectShow decoders to play AVI or Ogg files.

Technical details for the filter are provided in the following table:

Filter Interface(s) | ILMH264Decoder
Interface ID | IID_ILMH264Decoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_L264 MEDIASUBTYPE_LX64 MEDIASUBTYPE_h264 MEDIASUBTYPE_H264 ISOMEDIATYPE_avc1 MEDIASUBTYPE_avc1
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555
Filter CLSID | CLSID_ILMH264Decoder
Property Page(s) CLSID | CLSID_ILMH264DecoderAbout
Filter category | CLSID_LegacyAmFilterCategory
Executable | LDECH2643.dll, DSKernel2.dll
Header | ILDecH264.h
Profiles | See LEAD H264 Codecs Profile Support

Platforms

Win32, x64, Mobile

This filter is included as part of the following modules:

LEAD H.264 Video Decoder Module


LEAD H264 Decoder (DMO) (3.0)

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

LEAD H264 Decoder (DMO) (3.0)

The LEAD H264 Decoder (DMO) is a DirectX Media Object decoder that can decompress video compressed by any H264 codeccodec. Note that there are four DMO encoders and only one DMO decoder because the DMO decoder can decode data encoded by any codec. This DMO decoder is required to play Windows Media files (a.k.a. WMV files) containing H264 video in Windows Media Player.

Most other DirectShow-based players will play WMV files with H264 video using the DirectShow version of the H264 decoder (LEAD H264 Decoder Filter). Players built with LEADTOOLS Multimedia toolkit will play WMV files containing H264 video using the LEAD H264 Decoder Filter.

This decoder is typically used to play streaming video files created with LEADTOOLS Video on Demand solutions.

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_L264 MEDIASUBTYPE_LX64 MEDIASUBTYPE_h264 MEDIASUBTYPE_H264 ISOMEDIATYPE_avc1 MEDIASUBTYPE_avc1
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555
Filter CLSID | CLSID_LMH264DecoderDMO
Property Page(s) CLSID | N/A
Filter category | CLSID_LegacyAmFilterCategory
Executable | LDECH2643.dll, DSKernel2.dll
Header | N/A
Profiles | See LEAD H264 Codecs Profile Support

Platforms

Win32, x64

This filter is included as part of the following modules:

LEADTOOLS Video Streaming Module for API

LEADTOOLS Video Streaming Module for COM

LEAD H.264 Video Decoder Module


LEAD H264 Decoder User Interface (3.0)

The decoder property dialog box provides a user interface for changing the filter attributes. Changes will be applied only when the filter’s state is stopped with the ability to set them permanently by selecting OK. The property page is shown in Figure 1 below:

Figure 1. LEAD H264 Decoder (3.0) settings dialog box

The following table shows the controls and their descriptions:

Control | Description
Play Corrupted Streams | Enables the decoder to play corrupted streams or files. The decoder runs slower when this option is enabled due to stream verifications process. It is recommended to disable this option and use it only with bad files/streams.
Display Corrupted Data as Gray Region | Enables the decoder to display corrupted data as gray regions. Otherwise random a area from previous frames could be displayed.
Fill Frame Gaps with Previous Frame. | Enables the decoder to replace a missing frame from a previous frame in the stream. This option may provide jerky playback, and is not recommended
Delivered Frame Notification Interval / sec | The interval of Delivered Frame Notification in seconds. A value of Zero will disable notification sending. Values smaller than the frame rate will cause the decoder to send a notification for each frame.
Reset To Default Values | Resets decoder parameters to default values.


ILMH264Decoder Interface

ILMH264Decoder Interface

ILMH264Decoder Interface is the interface for LEAD H264 Decoder .

Properties:

Type

Name

Description

long

DecodingOptions

Accepts one or all values from eH264DecodingFlag.

H264DecodingFlag_DecodeCorruptedStream:

  • Enables the decoder to play corrupted streams. The decoder will run slower in this mode.

H264DecodingFlag_DisplayGrayOnError:

  • Enables the decoder to display the corrupted data as a gray region. Otherwise a random area from previous frames could be displayed.

H264DecodingFlag_FillFrameGaps:

  • Enables the decoder to replace a missing frame from a previous frame in the stream. This option may provide jerky playback, and is not recommended

H264DecodingFlag_UseOneThread:

  • By default the number of threads the decoder uses equal to the number of CPU/cores. So for a quad core machine the decoder will use four threads to decode the h.264 stream. if this flag set, then the decoder will use one thread only no matter how many CPUs or cores the machine has.

double

DeliveredFrameNotificationInterval

The interval of Delivered Frame Notification in seconds. A value of Zero will disable notification sending. Values smaller than the time per frame (= 1.0 / frame rate) will cause the decoder to send a notification for each frame. The Notification ID is ltmmEC_Sample_Delivered. Values less than zero will not be accepted. This parameter can be changed while the decoder is running.

Method:

Name

Parameters

Description

WriteToRegistry

None

This method writes all of the decoder settings to the system registry. The next time the decoder is loaded, it retrieves the settings from the registry and applies them.

ResetToDefaultsEx

eH264DecoderApiLevel

ApiLevel

Resets decoder to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to H264DecoderApiLevel_1 = 1.

The H264 decoder might change in the future and have different properties or default behaviour. Calling this method ensure the filter will have the same default values as they were at the time you developed your application.

It is recommended you call ResetToDefaultsEx(H264DecoderApiLevel_1) before you start setting properties and start calling other methods for this interface.

eH264DecodingFlag:

These are the possible values for H264 decoding flags. These flags can be set in the SymbolMode property.

typedef enum
{
H264DecodingFlag_DecodeCorruptedStream = 0x00000001,
H264DecodingFlag_FillFrameGaps = 0x00000002,
H264DecodingFlag_DisplayGrayOnError = 0x00000004,
H264DecodingFlag_UseOneThread = 0x00000008

} eH264DecodingFlag;

typedef enum
{
ltmmEC_Sample_Delivered = 0xA000,
} ltmmMediaEventCode_;

typedef enum
{
H264DecoderApiLevel_1 = 0
} eH264DecoderApiLevel;


LEAD H264 Codecs Profile Suppport

LEAD H.264 Codecs Profile Support

Technical details on supported profiles are provided in the following table:

Codecs | Supported Profiles | Help Topics
LEAD H.264 Encoder | Baseline Profile Main Profile | LEAD H264 Encoder (DMO) (4.0)
LEAD H.264 Decoder | Baseline Profile CAVLC 4:4:4 Intra Profile Constrained Baseline Profile Extended Profile High Profile High 10 Profile High 4:2:2 Profile High 4:4:4 Predictive Profile High 10 Intra Profile High 4:2:2 Intra Profile High 4:4:4 Intra Profile Main Profile | LEAD H264 Decoder (DMO) (3.0) LEAD H264 Decoder (3.0)


How to use the H.264 encoder with Windows Media Server for streaming (live or otherwise)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

How to use the H.264 encoder with Windows Media Server for streaming (live or otherwise)

There are two parts to media server. Each should be on a separate computer.

1) Encoder Station: The encoder station is where you use the LEADTOOLS H.264 DMO codec. You can either stream live video from a capture source such as a camera or you can encode a file to host on the Media Server. You can use the LEAD H.264 codec to stream live video, but you will have to turn off most of the compression options so the compressor can keep up. To get the highest compression, you can use the encoder station to encode a file and copy the file to the Media Server. You can find more information at http://www.microsoft.com/windows/windowsmedia/howto/articles/IntroEncoding.aspx .

2) Media Server: This is the server to which clients connect. You create publishing points on the server and the link to the media is MMS://MediaServerName/PublishingPointName/. Publishing points can be created from either a live stream that is being captured on the Encoding Station or a file previously encoded on the Encoding Station.

Basically, most of the work is done on the Encoding Station. Streams are pulled by the Media Server from the Encoding Station. Also, the encoding station is where you set all of the options for the codec.

Q: How do I set the LEAD H.264 encoder options for the DMO Encoder?

A: The encoder options are shared with the LEAD H.264 DirectShow encoder. That is, the LEAD H.264 Encoder (DMO) uses the settings for the LEAD H.264 Encoder and overwrites some of them based on settings in the Windows Media Encoder.

The settings that can be overwritten are:

  • “Number of Ps between 2Is” – this will be set according to the “Key Frame Interval”. See the image below:

In this case, the number of Ps between 2Is will be adjusted so the I frame comes every 2 seconds. The lower the key frame interval, the lower the time it takes for a client to see video after connecting to the web server. Also, this reduces the compression, so you do not want to set the key frame interval to too low of a value.

  • “Rate driven“ option (Professional only): this is reset to Quality Driven

  • “Quality Factor”: this is reset depending on the value for Video smoothness: a low smoothness will decrease the quality and increase the compression, while a high smoothness will increase the quality and decrease the compression. We recommend using a smoothness of 60 or less. We do not recommend using smoothness over 80, since there is very little quality gain above that value.

  • SuperCompression: The LEAD H.264 Encoder (DMO) will always set SuperCompression to FALSE, while the LEAD H.264 Encoder Advanced (DMO) will always set SuperCompression to TRUE.

Recommended values in the Windows Media Encoder:

Key frame Interval: 3

Smoothness: 60

Q: What is the difference between the “LEAD H.264 Encoder (DMO)” and the “LEAD H.264 Encoder Advanced (DMO)”?

A: In the LEAD H.264 Encoder (DMO), SuperCompression is forced to FALSE. In the LEAD H.264 Encoder Advanced (DMO), SuperCompression is set to TRUE.

Q: When should I use the “LEAD H.264 Encoder Advanced (DMO)”?

A: If your video does not have small text, we recommend you use the “LEAD H.264 Encoder Advanced (DMO)”. If you have small text, use the LEAD H.264 Encoder (DMO), because the Advanced DMO encoder will distort small text.

Q: Do you have a step-by-step tutorial on how to use the DMO Encoder with the Windows Media Server?

A: Here are the steps:

  1. Configure Windows Media Encoder program to use the LEAD DMO Encoders and start capturing. (Play EncoderStation.avi to see how to do this).

  2. Once you do that, make a publishing point on the Server station (make sure you do not forget the port number).

  3. Start the publishing point (let’s call it LEADH264)

  4. Go to another computer, open Media Player and play mms://servername/LEADH264 (make sure you include the correct server name and do not forget to use the prefix “mms” instead of “http”)

Q: What do I need to install on the client computer to view the streaming H.264 data?

A: Install the LEAD H.264 Decoder (DMO). The quickest way to do this is to go to www.leadcodecs.com and play one of the streaming H.264 videos. Once you do that, you can play streaming H.264 video from your media server. Of course, the correct way is to include the cab file in your web page.

Q: How do I include the H.264 CAB file in a web page so I avoid having to restart the computer to finish the installation?

A: Place the CAB file on a page before the video. This is due to update reasons. If the file in the cab file is newer than what is already on the user computer and you play the video and the cab on the same page, the video will start playing using the older version, the system will lock the codec files to play the video. All this will happen before the CAB file finishes downloading. When the updated cab file is downloaded and installed, Explorer will ask the user to reboot. The way around this is to place the cab file on a page before the video so the codec files are not locked and can be updated without rebooting.

To reference the cab file on a page add this HTML to the page. You will need to change the codebase parameter to match your site structure.

Additionally, the #Version=-1,-1,-1,-1 part of the codebase in the example below is optional and forces the CAB file to check for an update for every visit to the page.

<OBJECT

id='LeadAVDecoders'

classid='clsid:E2B7DC83-38C5-11D5-91F6-00104BDB8FF9'

codebase='/cabs/H264OGG.cab#Version=-1,-1,-1,-1'

width='0'

height='0'>

</OBJECT>

Q: How do I add the player to a web page?

A: Add this script in the head section of a web page:

<SCRIPT language="JavaScript" type="text/javascript">

function w(s) {

document.write(s+'\n');

}

function renderActiveX(vid, vidwidth, vidheight){

w('<OBJECT width="'+vidwidth+'" height="'+vidheight+'"');

w('classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"');

w('codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject"');

w('standby="Loading Microsoft Windows Media Player components..." id="mediaPlayer">');

w('<PARAM name="fileName" value="'+vid+'">');

w('<PARAM name="animationatStart" value="true">');

w('<PARAM name="transparentatStart" value="true">');

w('<PARAM name="autoStart" value="true">');

w('<PARAM name="showControls" value="false">');

w('<PARAM name="loop" value="true">');

w('</OBJECT>');

}

function renderPlugin(vid, vidwidth, vidheight){

w('<EMBED type="application/x-mplayer2"');

w('pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"');

w('id="mediaPlayer" displaysize="4" autosize="-1"');

w('bgcolor="darkblue" showcontrols="false" showtracker="-1"');

w('showdisplay="0" showstatusbar="-1" videoborder3d="-1" width="'+vidwidth+'" height="'+vidheight+'"');

w('src="'+vid+'" autostart="true" designtimesp="5311" loop="true"></EMBED>');

}

</SCRIPT>

Wherever you want to place Media Player on the page, add this script, changing video, width and height as needed:

<SCRIPT language="JavaScript" type="text/javascript">

var video='http://www.leadcodecs.com/streaming/h264/postmodern_540x360x332k.avi'; /* put your file here!! */

var width=540;

var height=360;

if (navigator.appName=="Microsoft Internet Explorer"){

renderActiveX(video, width, height);

}

else{

alert('This site is designed for Internet Explorer version 5 or greater.\nWhile the video may play in other browsers, we recommend\nthat you use Internet Explorer.');

renderPlugin(video, width, height);

}

</SCRIPT>


LEAD H264 Transcoder

Transcoder: A file format convertion process that is executed by data re-packetizing. Transcoding avoids decoding and re-compression thus providing speed gains over decoding-encoding methods used in traditional filters. Additionally, LEADTOOLS transcoders preserve data quality by avoiding re-compression of already compressed data.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD H264 Transcoder

The LEAD H264 Transcoder is a DirectShow filter. It is used to transcode h.264 video stream in NAL Unit (mpeg2) format to h.264 in ISO (mpeg4) format. Note that this conversion is only possible in one direction from MPEG2 format to ISO format. This filter changes h.264 packets format without performing re-compression of the video stream or the data packets. Converting with this filter is fast while the quality of the original stream is preserved. To convert an h.264 stream, inside an AVI, OGG or MPEG2 transport file to ISO format without re-compression, LEAD H264 Transcoder filter should be inserted between (AVI, OGG or mpeg2) demux and ISO multiplexer. LEAD Multimedia toolkit automatically inserts the filter in this manner.

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_H264 MEDIASUBTYPE_h264 MEDIASUBTYPE_L264
Output Media Types | Type: MEDIATYPE_Video Subtype: ISOMEDIATYPE_avc1
Filter CLSID | CLSID_LMH264Transcoder
Filter category | CLSID_VideoCompressorCategory
Executable | LTranscoderH264.dll, DSKernel2.dll

Platforms

Win32, x64

To illustrate the advantage of using transcoders, two setups are provided below for comparison. Observe (Figure 1) how the transcoders are positioned between LEAD MPEG Transport Demultiplexer and LEAD ISO Multiplexer. Now observe the next image (Figure 2) and how in between the same LEAD MPEG2 Transport Demultiplexer and LEAD ISO Multiplexer there is a need to use encoders and decoders. As a result of using decoding-encoding filters, the processing of data is slower than the speeds attained with data re-packetizing - a key feature of transcoders.

Figure 1. Re-packetizing of data using transcoders.

Figure 2. Decoding and encoding of data using filters.


LEAD MCMW Decoder (3.0)

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD MCMW Decoder (3.0)

The LEAD MCMW Decoder Filter is a DirectShowÒ decoder that can decompress video data compressed by the LEAD MCMW Encoder Filter.

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | IID_ILMCMW3Decoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LCMW
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_LGRY(12/16-bit grayscale) MEDIASUBTYPE_RGB8(gray only)
Filter CLSID | CLSID_LMCMW2Decoder
Property Page(s) CLSID | N/A
Filter category | CLSID_LegacyAmFilterCategory
Executable | LCODCCMW3.dll, LCMW3.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64

This filter is included as part of the following modules:

LEAD MCMW Video Codec Module


LEAD MCMW Encoder (3.0)

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD MCMW Encoder (3.0)

The LEAD MCMW Encoder Filter is a DirectShowÒ encoder that can compress video data using the state of the art wavelet based compression algorithm. This compression algorithm provides a superior compression performance in comparison to the old DCT based compression algorithm like Motion JPEG. At the same time, it can still do real time compression. Because it is an intra-frame compression (no inter-frame dependencies), the MCMW Encoder is an ideal candidate for video editing (quick random access to every frame for searching), video conferencing, remote monitoring and video storage. The compressed video data can be stored inside AVI or Ogg files (with or without Audio).

The compression options for the encoder can be set manually through the encoder property page. It can also be set programmatically through the interface.

Filter Interface(s) | ILMCM3Encoder
Interface ID | IID_ILMCMW3Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_LGRY(12/16-bit grayscale) MEDIASUBTYPE_RGB8(gray only)
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_LCMW
Filter CLSID | CLSID_LMCMW3Encoder
Property Page(s) CLSID | CLSID_LMCMW3EncoderProperty
Filter category | CLSID_VideoCompressorCategory
Executable | LCODCCMW3.dll, LCMW3.dll, DSKernel2.dll
Header | ILEncCMW3.h

Platforms

Win32, x64

LEAD MCMW Encoder User Interface

This filter is included as part of the following modules:

LEAD MCMW Video Codec Module


LEAD MCMW Encoder User Interface (3.0)

The LEAD MCMW Video Encoder is a DirectShow Ò encoder that can compress video data using a state-of-the-art, wavelet-based compression algorithm. This compression algorithm provides a superior compression performance in comparison to the old DCT-based compression algorithm such as Motion JPEG. At the same time, it can still do real time compression. Because it is an intra-frame compression (no inter-frame dependencies), the MCMW Encoder is an ideal candidate for video editing (quick random access to every frame for searching), video conferencing, remote monitoring and video storage. The compressed video data can be stored inside AVI or Ogg files (with or without Audio).

Options for the LEAD MCMW encoder can be set manually through the encoder property page, which is shown in the figure below:

.

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by selecting Apply or OK, or abandoning them by selecting Cancel. Positioning the mouse pointer over a control displays the general information for that control. The following table shows the controls and their descriptions:

Control

Description

Estimated Bit Rate drop-down list box

If the source video has been selected, the estimated bit rate is displayed in this box. Various units of measure are included for selection, including KB/sec, MB/sec, and Kbits/sec. The destination file size can be estimated from this value as follows:

Target File Size = Estimated Bit Rate X Input File Duration in Seconds

Quality drop-down list box and slider bar

The drop-down list box has several predefined qualities ranging from perfect quality (which produces an excellent video quality and big file size) to the highest compression (which produces the smallest file size and lower quality).

The Slider can also be used to select a compression ratio ranging in value from 1 (which gives the best quality - lossless) up to 500 (which gives the highest compression and smallest file size, but lower video quality).

Please note that the higher the compression ratio, the faster the encoder works, and the more quickly a video clip is compressed.

Value

Meaning

PerfectQuality_1

Compresses all colors of a 24-bit file and maintains the quality of the original image at a smaller file size. There is no visual loss of color at this setting. This results in a compression ratio of about 18:1.

PerfectQuality_2

This produces a smaller file size than PerfectQuality_1 while maintaining similar quality. This results in a compression ratio of about 24:1.

QualityFarMoreImportantThanSize

Removes colors not noticed by the human eye. Most viewers cannot tell the difference between an image compressed at this level and the original image. This results in a compression ratio of about 30:1.

QualityMoreImportantThanSize

Removes more colors than QualityFarMoreImportantThanSize, most of which are colors or shades close to one another. The compressed image appears very much such as the original image. Requires very close examination to see the difference. This results in a compression ratio of about 40:1.

QualityAndSizeAreEquallyImportant

Provides the highest compression while maintaining good image quality. Try this option first, and then move up or down the list accordingly to obtain acceptable compression size and image quality. This results in a compression ratio of about 55:1.

SizeMoreImportantThanQuality_1

Sharp. - Recommended for images that have sharp edges, such as an image with a text overlay or an image with many straight lines. While it creates a larger file than SizeMoreImportantThanQuality_2, it retains better edges. This results in a compression ratio of about 70:1.

SizeMoreImportantThanQuality_2

Less tiling. Produces less tiling in the image than the previous options. However, it may distort text or straight lines. It is a good option for image database applications. This results in a compression ratio of about 90:1.

HighCompressionKeepQuality

Provides maximum compression while maintaining the highest image quality possible. This results in a compression ratio of about 110:1.

HighCompression

Provides near-maximum compression. This results in a compression ratio of about 140:1.

HighcompressionFast

Provides near-maximum compression. This results in a compression ratio of about 180:1.

HypercompressionFast

Provides maximum compression. This results in a compression ratio of about 220:1.

Custom

Select this item in order to select a custom value by either using the slide bar or entering a value from 1 to 500 in the edit box.


ILMCM3Encoder Interface

ILMCM3Encoder Interface

This is the interface for the LEAD MCMW Encoder (3.0).

Interface Properties:

Type

Name

Description

CMWQUALITYFACTOR

QualityFactor

Contains a value that represents a predefined quality factor for video compression.

DWORD

CompressionRatio

Contains a value that represents a compression ratio. Possible values are from 1 to 500, where 1 represents the best quality and lowest compression and 500 represents the highest compression and lowest quality.

Data Types:

CMWQUALITYFACTOR

typedef enum
{
PerfectQuality_1 = 18,
PerfectQuality_2 = 24,
QualityFarMoreImportantThanSize = 30,
QualityMoreImportantThanSize = 40,
QualityAndSizeAreEquallyImportant = 55,
SizeMoreImportantThanQuality_1 = 70,
SizeMoreImportantThanQuality_2 = 90,
HighCompressionKeepQuality = 110,
HighCompression = 140,
HighcompressionFast = 180,
HypercompressionFast = 220,
Custom =
} CMWQUALITYFACTOR;

Describes the predefined quality factors for video compression.

Member | Description
PerfectQuality_1 | Compresses all colors of a 24-bit file and maintains the quality of the original image at a smaller file size. There is no visual loss of color at this setting. This results in a compression ratio of about 18:1.
PerfectQuality_2 | This produces a smaller file size than PerfectQuality_1 while maintaining similar quality. This results in a compression ratio of about 24:1.
QualityFarMoreImportantThanSize | Removes colors not noticed by the human eye. Most viewers cannot tell the difference between an image compressed at this level and the original image. This results in a compression ratio of about 30:1.
QualityMoreImportantThanSize | Removes more colors than QualityFarMoreImportantThanSize, most of which are colors or shades close to one another. The compressed image appears very much like the original image. Requires very close examination to see the difference. This results in a compression ratio of about 40:1.
QualityAndSizeAreEquallyImportant | Provides the highest compression while maintaining good image quality. Try this option first, and then move up or down the list accordingly to obtain acceptable compression size and image quality. This results in a compression ratio of about 55:1.
SizeMoreImportantThanQuality_1 | Sharp. - Recommended for images that have sharp edges, such as an image with a text overlay or an image with many straight lines. While it creates a larger file than SizeMoreImportantThanQuality_2, it retains better edges. This results in a compression ratio of about 70:1.
SizeMoreImportantThanQuality_2 | Less tiling. Produces less tiling in the image than the previous options. However, it may distort text or straight lines. It is a good option for image database applications. This results in a compression ratio of about 90:1.
HighCompressionKeepQuality | Provides maximum compression while maintaining the highest image quality possible. This results in a compression ratio of about 110:1.
HighCompression | Provides near-maximum compression. This results in a compression ratio of about 140:1.
HighcompressionFast | Provides near-maximum compression. This results in a compression ratio of about 180:1.
HypercompressionFast | Provides maximum compression. This results in a compression ratio of about 220:1.


LEAD MCMP/MJPEG Codec (2.0) (VFW)

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MCMP/MJPEG Codec (2.0) (VFW)

The LEAD MCMP/MJPEG Codec is a DirectShow Ò and Microsoft Video For WindowsÒ (VFW) filter for compressing video data using the LEAD CMP and JPEG compression algorithms. The compressed video data can be stored inside AVI files, with or without the audio data. MJPEG, which is also known as Motion JPEG, is a motion video adaptation of the JPEG standard for still photos. MJPEG treats a video stream as a series of still photos, compressing each frame individually, and uses no interframe compression.

MCMP, or Motion CMP, is a motion video adaptation of LEAD's proprietary CMP compression code. MCMP delivers smaller file sizes and can maintain better image quality than MJPEG, with the same or better image quality.

High-speed compression (intraframe only), quick random access to every frame when searching, and the ability to generate a lossless stream enable this codec to be used for wide range of applications such as real time video capturing, video conferencing, remote monitoring and medical imaging.

Filter Interface(s) | Encoder: IMCMPEncoderOption IAMVideoCompression
Interface ID | Encoder: IID_IMCMPEncoderOption IID_IAMVideoCompression
Input/Output Media Types | The major media type for both the encoder and the decoder is MEDIATYPE_Video. Subtypes: Encoder: Input: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_LGRY (12/16-bit grayscale) MEDIASUBTYPE_RGB8 (gray only) MEDIASUBTYPE_YUY2 (YUV 4:2:2) MEDIASUBTYPE_UYVY (YUV 4:2:2) Output: MEDIASUBTYPE_LEAD (MCMP format) MEDIASUBTYPE_Ljpg (Lossless jpeg) MEDIASUBTYPE_MJPG (Motion jpeg)
Filter CLSID | Encoder: CLSID_MCMPEncoder.
Property Page(s) CLSID | Encoder: CLSID_MCMPEncoderPropertyPage CLSID_MCMPAboutPropertyPage
Filter category | CLSID_VideoCompressorCategory
Executable | LCODCCMP2.dll, DSKernel2.dll
Header | IMCMPCodec2.h

Platforms

Win32, x64

LEAD MCMP/MJPEG Codec User Interface

This filter is included as part of the following modules:

LEAD MCMP-MJPEG Video Codec Module


LEAD MCMP/MJPEG Codec (2.0)

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MCMP/MJPEG Codec (2.0)

The LEAD MCMP/MJPEG Codec is a DirectShow Ò and Microsoft Video For WindowsÒ (VFW) filter for compressing video data using the LEAD CMP and JPEG compression algorithms. The compressed video data can be stored inside AVI files, with or without the audio data. MJPEG, which is also known as Motion JPEG, is a motion video adaptation of the JPEG standard for still photos. MJPEG treats a video stream as a series of still photos, compressing each frame individually, and uses no interframe compression.

MCMP, or Motion CMP, is a motion video adaptation of LEAD's proprietary CMP compression code. MCMP delivers smaller file sizes and can maintain better image quality than MJPEG, with the same or better image quality.

High-speed compression (intraframe only), quick random access to every frame when searching, and the ability to generate a lossless stream enable this codec to be used for wide range of applications such as real time video capturing, video conferencing, remote monitoring and medical imaging.

Filter Interface(s) | Encoder: IMCMPEncoderOption IAMVideoCompression
Interface ID | Encoder: IID_IMCMPEncoderOption IID_IAMVideoCompression
Input/Output Media Types | The major media type for both the encoder and the decoder is MEDIATYPE_Video. Subtypes: Encoder: Input: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_LGRY (12/16-bit grayscale) MEDIASUBTYPE_RGB8 (gray only) MEDIASUBTYPE_YUY2 (YUV 4:2:2) MEDIASUBTYPE_UYVY (YUV 4:2:2) Output: MEDIASUBTYPE_LEAD (MCMP format) MEDIASUBTYPE_Ljpg (Lossless jpeg) MEDIASUBTYPE_MJPG (Motion jpeg)
Filter CLSID | Encoder: CLSID_MCMPEncoder.
Property Page(s) CLSID | Encoder: CLSID_MCMPEncoderPropertyPage CLSID_MCMPAboutPropertyPage
Filter category | CLSID_VideoCompressorCategory
Executable | LCODCCMP2.dll, DSKernel2.dll
Header | IMCMPCodec2.h

Platforms

Win32, x64

LEAD MCMP/MJPEG Codec User Interface

This filter is included as part of the following modules:

LEAD MCMP-MJPEG Video Codec Module


LEAD MCMP/MJPEG Codec User Interface (2.0)

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder , which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder , which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder , which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder , which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Joint Photographic Experts Group- commonly used method of compression for photographic images

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MCMP/MJPEG Codec User Interface (2.0)

The LEAD MCMP/MJPEG Video Codec is a DirectShow Ò and Microsoft Video For WindowsÒ (VFW) filter for compressing and decompressing video data using the LEAD CMP and JPEG compression algorithms. The compressed video data can be stored inside AVI files, with or without the audio data. MJPEG, which is also known as Motion JPEG, is a motion video adaptation of the JPEG standard for still photos. MJPEG treats a video stream as a series of still photos, compressing each frame individually, and uses no interframe compression.

MCMP, or Motion CMP, is a motion video adaptation of LEAD's proprietary CMP compression code. MCMP delivers smaller file sizes and can maintain better image quality than MJPEG, with the same or better image quality.

High-speed compression (intraframe only), quick random access to every frame when searching, and the ability to generate a lossless stream enable this codec to be used for wide range of applications such as real time video capturing, video conferencing, remote monitoring and medical imaging. The property page is shown in the figure below:

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in the figure below:

Control | Description
Encoder Settings | This group of controls provides options for controlling encoder settings.
Enable check box | Enables or disables the encoder settings
Flip YUV check box | Indicates how YUV video data is handled. If this box is clear, then YUV video with a positive height value is handled as normal video, top side up. YUV video with a negative height value is handled as flipped video, bottom side up. If this box is selected, then YUV video with a positive height value is handled as flipped video, bottom side up, and YUV video with a negative height value is handled as normal, top side up.
Format drop-down list box | Sets the codec format. Possible values are:
 | Value |  |  | Meaning
 | LEAD Proprietary |  |  | LEAD’s MCMP format
 | Lossless JPEG |  |  | Lossless JPEG
 | JPEG 4:1:1 |  |  | MJPEG 4:1:1 subsampling. Has a higher compression ratio than 4:2:2 and 4:4:4.
 | JPEG 4:2:2 |  |  | MJPEG 4:2:2 subsampling. Lower compression ratio than 4:1:1, higher compression than 4:4:4.
 | JPEG 4:4:4 |  |  | MJPEG 4:4:4 subsampling
Quality drop-down list box and slider bar | Sets the quality factor for compression. A QFactor of 2 has the highest quality and lowest compression ratio. As the QFactor increases, the quality decreases and the compression ratio increases. A QFactor of 255 has the lowest quality and highest compression ratio. Possible values for each format are:
 | Format | Possible values
 | LEAD Proprietary | -9...-1 and 2...255 where negative values represent:
 |  | Perfect quality option 1
 |  | Perfect quality option 2
 |  | Quality far more important than size
 |  | Quality more important than size
 |  | Quality and size are equally important
 |  | Size more important than quality - Sharp
 |  | Size more important than quality - Less Tiling
 |  | Max Compression, keeping quality as good as possible
 |  | Max compression
 | Lossless JPEG | QFactor is ignored for lossless JPEG.
 | JPEG 4:1:1 | 2...255
 | JPEG 4:2:2 | 2...255
 | JPEG 4:4:4 | 2...255
 | There is also a Custom selection. When this item is selected, the value can be selected by moving the slider bar or by entering a value in the edit box.
Interleave drop-down list box | Sets the interleave options.
 | Value |  | Meaning
 | Never |  | Save images non-interleaved
 | When image height greater than or equal to 288 (default) |  | Interleave images with height >= 288
 | Always |  | Save interlaced MJPG files
Decoder Settings | This group of controls provides options for controlling decoder settings.
Enable check box | Enables or disables the decoder settings


LEAD MCMP/MJPEG Decoder (2.0)

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD MCMP/MJPEG Decoder (2.0)

The LEAD MCMP/MJPEG Decoder Filter is a DirectShowÒ decoder that can decompress video data compressed by the LEAD MCMP/MJPEG Encoder Filter or by any other MJPEG encoder.

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_dmb1 MEDIASUBTYPE_MJPG MEDIASUBTYPE_JPEG MEDIASUBTYPE_jpeg MEDIASUBTYPE_LJPG MEDIASUBTYPE_mjpa MEDIASUBTYPE_mjpb MEDIASUBTYPE_AVRn
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555 MEDIASUBTYPE_LGRY(12/16-bit grayscale) MEDIASUBTYPE_RGB8(gray only)
Filter CLSID | CLSID_MCMPDecoder
Property Page(s) CLSID | N/A
Filter category | CLSID_LegacyAmFilterCategory
Executable | LCodcCmp2.dll, DSKernel2.dll
Header | IMCMPCodec2.h

Platforms

Win32, x64, Mobile

This filter is included as part of the following modules:

LEAD MCMP/MJPEG Video Codec Module

LEADTOOLS Medical Multimedia Module

LEADTOOLS MPEG-2 Transport Module


Joint Photographic Experts Group- commonly used method of compression for photographic images

The portion of thThe portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEAD MCMP/MJPEG Decoder User Interface (2.0)

The LEAD MCMP/MJPEG Video Codec is a DirectShow Ò and Microsoft Video For WindowsÒ (VFW) filter for decompressing video data using the LEAD CMP and JPEG compression algorithms. The compressed video data can be stored inside AVI files, with or without the audio data. MJPEG, which is also known as Motion JPEG, is a motion video adaptation of the JPEG standard for still photos. MJPEG treats a video stream as a series of still photos, compressing each frame individually, and uses no interframe compression.

MCMP, or Motion CMP, is a motion video adaptation of LEAD's proprietary CMP compression code. MCMP delivers smaller file sizes and can maintain better image quality than MJPEG, with the same or better image quality.

High-speed compression (intraframe only), quick random access to every frame when searching, and the ability to generate a lossless stream enable this compression to be used for wide range of applications such as real time video capturing, video conferencing, remote monitoring and medical imaging. The property page is shown in the following figure:

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by clicking Apply or OK, or abandon them by clicking Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in the following figure:

Control | Description
Decoder Settings | This group of controls provides options for controlling decoder settings.
Enable check box | Enables or disables the decoder

Note that if you disable the decoder, you will have to re-enable it by going to the Control Panel and bringing up the settings dialog for LEAD MCMP/MJPEG Codec (2.0) (VFW) codec.


IMCMPEncoderOption Interface

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

IMCMPEncoderOption Interface

Interface Properties:

Type

Name

Description

long

Format

Gets or sets a value that represents the codec format. Possible values are:

FORMAT_MCMP: [5] MCMP format
FORMAT_LOSSLESSJPEG: [-1] Lossless JPEG
FORMAT_MJPEG_411: [21] MJPEG 4:1:1 subsampling. Has a higher compression ratio than 4:2:2 and 4:4:4.
FORMAT_MJPEG_422: [23] MJPEG 4:2:2 subsampling. Lower compression ratio than 4:1:1, higher compression than 4:4:4.
FORMAT_MJPEG_444: [10] MJPEG 4:4:4 subsampling.

long

Quality

Gets or sets the quality factor for compression. A QFactor of 2 has the highest quality and lowest compression ratio. As the QFactor increases, the quality decreases and the compression ratio increases. A QFactor of 255 has the lowest quality and highest compression ratio. Possible values for each format are:

FORMAT_MCMP: -9...-1 and 2...255 where negative values represent:

QFACTOR_PQ1: (-1) Perfect quality option 1.

QFACTOR_PQ2: (-2) Perfect quality option 2.

QFACTOR_QFS: (-3) Quality far more important than size.

QFACTOR_QMS: (-4) Quality more important than size.

QFACTOR_QS: (-5) Quality and size are equally important.

QFACTOR_SQS: (-6) Size more important than quality - Sharp.

QFACTOR_SQT: (-7) Size more important than quality - Less Tilling.

QFACTOR_MCQ (-8) Max Compression, keeping quality as good as possible.

QFACTOR_MC: (-9) Max compression

FORMAT_LOSSLESSJPEG: QFactor is ignored for lossless JPEG.

FORMAT_MJPEG_411: 2...255

FORMAT_MJPEG_422: 2...255

FORMAT_MJPEG_444: 2...255

long

Flags

Gets or sets the compression flags. These flags can be OR-ed together, except for the FLAGS_INTERLEAVE_XXX flags. Only one of the interleave flags can be set. Setting FLAGS_INTERLEAVE_NEVER is equal to setting no interleave flags at all,. Possible values are:

FLAGS_DISABLE_COMPRESSION: [0x0001] Disable compression.

FLAGS_DISABLE_DECOMPRESSION: [0x0002] Enable compression.

FLAGS_INTERLEAVE_NEVER: [0x0000] Save images non-interleaved.

FLAGS_INTERLEAVE_288: [0x0004] Interleave images with height >= 288.

FLAGS_INTERLEAVE_ALWAYS: [0x0008] Set this to save interlaced MJPG files.

FLAGS_FLIP_YUV: [0x0010] Indicates how YUV video data is handled. If this flag is not set, then YUV video with a positive height value (BITMAPINFOHEADER.biHeight) is handled as normal video, top side up. YUV video with a negative height value is handled as flipped video, bottom side up. If this flag is set, then YUV video with a positive height value is handled as flipped video, bottom side up, and YUV video with a negative height value is handled as normal, top side up.

FLAGS_OVERRIDE_DEFAULTS: [0x0020] If this flag is set, then the defaults are overridden.

FLAGS_NO_REGISTRY_SAVE: [0x0040] Do not save these settings in the registry. Set this flag if the compression is temporarily disabled because the input does not permit compression.

long

FilterState

(Read only) Gets a value that represents the state of the filter. Possible values are:

FilterState_Stopped: [0] The filter is stopped.
FilterState_Paused: [1] The filter is paused.
FilterState_Running: [2] The filter is running.

IAMVideoCompression Interface

This is a standard DirectShow interface. For full documentation, please refer to DirectShow documentation.

This interface allows you to select only the quality factor for the codec. For full control over the codec settings, use the IMCMPEncoderOption interface.

Interface Properties:

Type

Name

Description

long

Quality

Gets or sets the quality factor for compression. Possible values are:

0.0...1.0: Same meaning as in DirectShow. 1.0 is the best quality/lowest compression and 0 is lowest quality/highest compression.

Over 1.0: Lossless compression. Setting the quality factor to this value will automatically set the format to Lossless JPEG.

-9...-1: Predefined quality factor. For more information on these values, refer to IMCMPEncoderOption::QFactor. Setting the quality value to one of these values will automatically set the format to MCMP.

< -9: Undefined. Do not use.


LEAD MJ2K Decoder (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

LEAD MJ2K Decoder (2.0)

The LEAD MJ2K Decoder is a DirectShow Ò decoder that can decompress motion JPEG-2000 video data compressed by the LEAD MJ2K Encoder Filter.

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LJ2K
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_LGRY(12/16-bit grayscale) MEDIASUBTYPE_RGB8(gray only)
Filter CLSID | CLSID_LMJ2KDecoder
Property Page(s) CLSID | N/A
Filter category | CLSID_LegacyAmFilterCategory
Executable | LCODCJ2K2.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64

This filter is included as part of the following modules:

LEAD MJPEG2000 Video Codec Module


LEAD MJ2K Encoder (2.0)

LEAD MJ2K Encoder (2.0)

The LEAD MJ2K Encoder (Motion JPEG-2000) is a DirectShow Ò filter for compressing and decompressing video data using the JPEG-2000 compression standard. The JPEG-2000 format is the official successor to the popular JPEG image compression format. The JPEG-2000 standard is more complex and has more functionality than JPEG. The key advantage of Motion JPEG-2000 over Motion-JPEG is that it is able to offer high quality, better compression and a very wide range of compression ratios that cannot be reached by Motion JPEG. JPEG-2000 also supports lossless compression.

Besides its superior compression performance, JPEG2000 can perform real time compression unlike other standards like MPEG-1, MPEG-2 or MPEG-4. This makes the LEAD MJ2K Encoder Filter a good candidate for video editing, Medical imaging, video conferencing, remote monitoring and video storage. The compressed video data can be stored inside AVI or Ogg files, with or without Audio.

The compression options for the encoder can be set manually through the encoder property page. It can also be set programmatically through the interface.

Filter Interface(s) | ILMJ2KEncoder
Interface ID | IID_ILMJ2KEncoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_LGRY(12/16-bit grayscale) MEDIASUBTYPE_RGB8(gray only)
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_LJ2K
Filter CLSID | CLSID_LMJ2KEncoder
Property Page(s) CLSID | CLSID_LMJ2KEncoderPropertyPage
Filter category | CLSID_VideoCompressorCategory
Executable | LCODCJ2K2.dll, DSKernel2.dll
Header | ILEncMJ2k.h

Platforms

Win32, x64

LEAD MJ2K Encoder User Interface

This filter is included as part of the following modules:

LEAD MJPEG2000 Video Codec Module


LEAD MJ2K Encoder User Interface (2.0)

The MJ2K Video Encoder (Motion JPEG-2000) is a DirectShow Ò filter for compressing and decompressing video data using the JPEG-2000 compression standard. The JPEG-2000 format is the official successor to the popular JPEG image compression format. The JPEG-2000 standard is more complex and has more functionality than JPEG. The key advantage of Motion JPEG-2000 over Motion-JPEG is that it is able to offer high quality, better compression and a very wide range of compression ratios that cannot be reached by Motion JPEG. JPEG-2000 also supports lossless compression.

Besides its superior compression performance, JPEG2000 can perform real time compression unlike other standards such as MPEG1, MPEG2 or MPEG4. This makes the MJ2K Codec a good candidate for video editing, Medical imaging, video conferencing, remote monitoring and video storage. The compressed video data can be stored inside AVI or Ogg files, with or without Audio.

The compression options for the LEAD MJ2K encoder can be set manually through the encoder property page. It can also be set programmatically through the J2K Encoder property page.

Use the property page, shown in the figure below, to change option settings:

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by selecting Apply or OK, or abandon them by selecting Cancel. Positioning the mouse pointer over a control displays the general information for that control. The following table shows the controls and their descriptions:

Control

Description

Estimated Bit Rate box

If the source video has been selected, the estimated bit rate is displayed in this box. Various units of measure are included for selection, including KB/sec, MB/sec, and Kbits/sec. The destination file size can be estimated from this value as follows:

Target File Size = Estimated Bit Rate X Input File Duration in Seconds

Quality drop-down list box and slider

The compression ratio can be adjusted using either the Quality combo box or the slider.

The drop-down list box has several predefined qualities ranging from perfect quality (which produces an excellent video quality and big file size) to the highest compression (which produces the smallest file size and lower quality).

The Slider can also be used to select a compression ratio ranging in value from 1 (which gives the best quality - lossless) up to 250 (which gives the highest compression and smallest file size, but lower video quality).

Please note that the higher the compression ratio, the faster the encoder works, and the more quickly a video clip is compressed.


ILMJ2KEncoder Interface

ILMJ2KEncoder Interface

This is the interface for the LEAD MJ2K Encoder.

Interface Properties:

Type

Name

Description

J2KQUALITYFACTOR

QualityFactor

Contains a value that represents a predefined quality factor for video compression.

DWORD

CompressionRatio

Contains a value that represents a compression ratio. Possible values are from 1 to 500, where 1 represents the best quality and lowest compression and 500 represents the highest compression and lowest quality.

Data Types:

J2KQUALITYFACTOR

typedef enum
{
Lossless = 1,
PerfectQuality_1 = 18,
PerfectQuality_2 = 24,
QualityFarMoreImportantThanSize = 30,
QualityMoreImportantThanSize = 40,
QualityAndSizeAreEquallyImportant = 55,
SizeMoreImportantThanQuality_1 = 70,
SizeMoreImportantThanQuality_2 = 90,
HighCompressionKeepQuality = 110,
HighCompression = 140,
HighcompressionFast = 180,
HypercompressionFast = 220,
Custom =
} J2KQUALITYFACTOR;

Describes the predefined quality factors for video compression.

Member | Description
Lossless | Lossless compression, the data is encoded without changing any pixel values. The decoded data will be an exact duplicate of the original input data. The compression ratio is about 3:1.
PerfectQuality_1 | Compresses all colors of a 24-bit file and maintains the quality of the original image at a smaller file size. There is no visual loss of color at this setting. This results in a compression ratio of about 18:1.
PerfectQuality_2 | This produces a smaller file size than PerfectQuality_1 while maintaining similar quality. This results in a compression ratio of about 24:1.
QualityFarMoreImportantThanSize | Removes colors not noticed by the human eye. Most viewers cannot tell the difference between an image compressed at this level and the original image. This results in a compression ratio of about 30:1.
QualityMoreImportantThanSize | Removes more colors than QualityFarMoreImportantThanSize, most of which are colors or shades close to one another. The compressed image appears very much like the original image. Requires very close examination to see the difference. This results in a compression ratio of about 40:1.
QualityAndSizeAreEquallyImportant | Provides the highest compression while maintaining good image quality. Try this option first, and then move up or down the list accordingly to obtain acceptable compression size and image quality. This results in a compression ratio of about 55:1.
SizeMoreImportantThanQuality_1 | Sharp. - Recommended for images that have sharp edges, such as an image with a text overlay or an image with many straight lines. While it creates a larger file than SizeMoreImportantThanQuality_2, it retains better edges. This results in a compression ratio of about 70:1.
SizeMoreImportantThanQuality_2 | Less tiling. Produces less tiling in the image than the previous options. However, it may distort text or straight lines. It is a good option for image database applications. This results in a compression ratio of about 90:1.
HighCompressionKeepQuality | Provides maximum compression while maintaining the highest image quality possible. This results in a compression ratio of about 110:1.
HighCompression | Provides near-maximum compression. This results in a compression ratio of about 140:1.
HighcompressionFast | Provides near-maximum compression. This results in a compression ratio of about 180:1.
HypercompressionFast | Provides maximum compression. This results in a compression ratio of about 220:1.


LEAD MPEG-2 Decoder (2.0)

LEAD MPEG-2 Decoder (2.0)

The LEAD MPEG-2 Decoder Filter is a DirectShow Ò filter for decompressing video data that was compressed using the MPEG-2 (ISO/IEC 13818-2) or MPEG-1 (ISO 11172-2) standard. For more information on the MPEG-2 compression algorithm, refer to LEAD MPEG-2 Encoder Filter.

The LEAD MPEG-2 Decoder is capable of decoding all profiles, including High Profile with the 4:2:2 Chroma format.

Technical details for the filter are provided in the following table:

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_MPEG2_VIDEO MEDIASUBTYPE_LMPG2
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_YV12 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555
Filter CLSID | CLSID_LMMPEG2Decoder
Property Page CLSID | N/A
Executable | LDECMPG2.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | N/A

Platforms

Win32, x64, Mobile

This filter is included as part of the following modules:

LEAD MPEG-2 Video Decoder Module

LEAD MPEG-2 Video Encoder Module

LEAD MPEG-2 Video Codec Module


LEAD MPEG-2 Encoder (3.0)

Also known as a decompressor, this is a module or algorithm to decompress data.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-2 Encoder (3.0)

The LEAD MPEG-2 Encoder Filter is a DirectShow filter for compressing video data using the MPEG-2 (ISO/IEC 13818-2) or MPEG-1 (ISO 11172-2) standard. The LEAD MPEG-2 Decoder is a DirectShow filter for decompressing MPEG-2 video data.

MPEG-1 is the older standard and achieves higher compression than MPEG-2 (but at lower quality). MPEG-1 compression is used in VCD (video on CD).

MPEG-2 is the newer standard and has lower compression than MPEG-1 but the quality is much better than MPEG-1. MPEG-2 is a high quality video compression algorithm and is best suited for applications with higher bit rates or high-bandwidth usage. The most common applications include DVD-Videos, SVCD and digital TVs. The compressed video data can be stored inside MPEG, AVI, DICOM or Ogg files with the option of saving the file with or without the audio data.

The DICOM files can store MPEG-2 SD or HD video. See "Supplement 42: MPEG2 Transfer Syntax" and "Supplement 137: MPEG2 MP@HL Transfer Syntax" of the DICOM specification for more information on requirements of the MPEG-2 SD or HD video.

The compression options for the LEAD MPEG-2 Encoder can be set manually through the encoder property page. The compression options can also be set programmatically using the ILMMPG2Encoder interface.

Filter Interfaces | ILMMPG2Encoder , ILMMCommon
Interface ID | IID_ILMMPG2Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_YV12 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_MPEG2_VIDEO MEDIASUBTYPE_LMPG2
Filter CLSID | CLSID_LMMPEG2Encoder
Property Page CLSID | CLSID_LMMPEG2EncoderProperty
Executable | LENCMPG23.dll, DSKernel2.dll
Filter category | CLSID_VideoCompressorCategory
Header | ILEncMPEG2_3.h

Platforms

Win32, x64

Levels and Profiles

A MPEG-2 encoder capable of handling all resolutions, bit rates and frame rates up to HDTV would be too expensive for many simpler applications or hardware implementations. Therefore, the MPEG-2 standard was subdivided into levels and profiles. The MPEG-2 standard allows for four source formats, or Levels, to be coded; ranging from Limited Definition (todays VCR quality), to full HDTV, each with a range of bit rates. In addition to this flexibility in source formats, MPEG-2 allows for different Profiles. Each profile offers a collection of compression tools that together make up the coding system. A different profile means that a different set of compression tools is available. The four levels, including frame size and maximum bit rate, are defined in the following table:

Level | Maximum Frame size (PAL/NTSC | Maximum Bitrate | Significance
Low | 352x288 352x240 | 4 Mb/s | CIF, consumer tape equiv.
Main | 720x576 720x480 | 15 Mb/s | ITU-R 601, Studio TV
High 1440 | 1440x1152 1440x1080 | 60 Mb/s | 4x 601, consumer HDTV
High | 1920x1152 1920x1080 | 80 Mb/s | PROD. SMPTE

Most of today's work is done at the Main Level, which is designated for standard video. Within this level, the Main profile is used for many applications. The MPEG-2 encoder will automatically adjust the level if the video being encoded is bigger than the maximum size for the current level.

I Frames and P Frames

To increase the compression performance, MPEG-2 uses Temporal Compression. Temporal compression is achieved by encoding only the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An MPEG-2 video stream is comprised of I Frames, B Frames and P Frames:

  • I: (Intraframe) frames. These are encoded without reference to another frame to allow for random access.
  • P: (Predictive) frames are encoded using the previous I (or P) frame as reference. P frames are compressed more than I frames.
  • B: (Bi-directional) frames are encoded using both previous and next I (or P) frames as reference and they are compressed more than both I, and P frames.

To increase the compression of MPEG-2, more B and P frames should be used. You do so by adjusting the "I Frame" and "P Frame" options on the Encoder property page:

  • I Frame: represents the distance between I frames. All the frames between successive I frames are P or B frames.
  • P Frame: represents the distance between P frames. All the frames between successive frames are B frames.

For example if I frame is 12, and P Frame is 3, then video stream looks like the following:

I B B P B B P B B P B B I B B P B B P B B P B B ..

The distance between I frames must be a multiple of the distance between the P frames. The LEAD MPEG-2 Encoder will automatically adjust these values to preserve this relationship.

LEAD MPEG-2 Encoder User Interface

This filter is included as part of the following modules:

LEAD MPEG-2 Video Codec Module


LEAD MPEG-2 Encoder User Interface (3.0)

The Encoder property page provides a user interface for changing the filter's attributes.

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by clicking Apply or OK, or abandoning them by clicking Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in Figure 1.

Figure 1. LEAD MPEG Encoder dialog box

Control

Description

Constant Bitrate radio button

(Fixed output rate): If this radio button is selected, the compression level is constant and the storage requirements are easily predicted. This may affect the video quality of more dynamic scenes and pictures with lots of detail. The bit rate describes the amount of data used or transferred per second. It is directly related to the compression level. For example, a DV video (approximately 1:5 compression) would need 25 Mbit (3.12MB) per second. Using MPEG-2 compression at bit rate = 6 Mbit/sec, the compression level will be 1:27. Therefore, the higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bitrate edit box. For both Variable Bitrate and Fixed Bitrate, the video quality also depends on the MPEG-2 profile used (4:2:2 or 4:2:0) and the distance between I frames and P frames.

Bitrate edit box

(Constant bitrate only) If the Constant Bitrate radio button is selected, this edit box can be used to set the bitrate in Kbits/sec.

Use Default Bitrate check box

(Constant bit rate only) If this is checked, the bitrate will be set to a default value in kbits/sec. Each output type (Custom MPEG-1, VCD, Custom MPEG-2, SVCD, DVD and DICOM) has its own default bitrate. This is useful for correcting a bitrate that was changed accidentally.

Constant Quality radio button

(Variable bit rate and Fixed video quality). If this radio button is selected the compression rate varies with scene content. For more dynamic scenes a high bit rate (low compression) is used to maintain consistent video quality. Setting a quality value in the Quality drop down box can further control the quality.

Quality Factor drop-down list box

(Constant quality only) Sets the quality value for the encoded video when the Constant Quality radio button is selected. A value of 1 gives the best quality and the largest video size. A value of 31 gives the smallest file size with the lowest video quality. The default is 4.

Variable Bitrate radio button

If this radio button is selected, the compression rate varies with scene content. The Minimum Quality Factor, Maximum Quality Factor, Average Bitrate and Maximum Bitrate will control the video quality. The video quality will vary between the Minimum and Maximum quality factors, and the rate will not exceed the Maximum Bitrate. This option should be used when good video quality is required at a certain bit rate. (A common use for this is DVD creation). You achieve the best compression-quality performance when you use this option.

For this option, the compressor increases or decreases the quality factor automatically to maintain the highest quality at the desired bit rate, specified in the Average Bitrate and the Maximum Bitrate edit boxes. However, the quality factor will not go below the Minimum Quality factor or exceed the Maximum Quality factor.

Avg Bitrate edit box

(Variable bit rate only) Contains the average bit rate. The bitrate for the duration of the file will be equal (or very close to) the average bit rate. Simple scenes with little movement and few changes will be compressed with a lower bit rate (higher compression). Complex scenes with more movement or changes will be compressed with a higher bit rate. The highest bit rate will not exceed the maximum bitrate. If in doubt about what values to enter in these edit boxes, leave them unchanged.

Min Quality Factor drop-down list box

(Variable bitrate only) Sets the minimum quality value the MPEG-2 encoder should use. A value of 1 gives the best quality and the biggest video size. A value of 31 gives the smallest file size with low video quality. This quality factor will be the starting quality factor for the MPEG-2 compressor. This value should be always smaller than Maximum Quality Factor.

Max Quality Factor drop-down list box

(Variable bitrate only) Sets the maximum quality value the MPEG-2 encoder should use. A value of 1 gives the best quality and the biggest video size. A value of 31 gives the smallest file size with low video quality. This value should be always larger than Minimum Quality Factor.

Output Video Type radio buttons

The encoder is capable of generating MPEG-1 or MPEG-2 video.

  • When the MPEG-1 radio button is checked, MPEG-1 compression is used. In this case, only Custom MPEG-1 or VCD MPEG-1 options are available.

    • Custom MPEG-1 lets you control all the MPEG-1 compression options. A custom MPEG-1 file may or may not be compatible with VCD.

    • VCD (Video on CD) lets you create VCD-compatible files. VCD-compatible files use MPEG-1 compression, but have certain restrictions on compression options, the video size (must be 352x240 for NTSC or 352x288 for PAL) and frame rate. The encoder will automatically resize the video if VCD output type is selected and the size of the video being compressed is not correct.

  • When the MPEG-2 radio button is checked, MPEG-2 compression is used. In this case, only Custom MPEG-2, SVCD, DVD 1 and DVD 2 are available.

    • Custom MPEG-2 lets you control all the MPEG-2 compression options. A custom MPEG-2 file may or may not be compatible with SVCD or DVD.

    • SVCD (Super Video CD) lets you create SVCD-compatible files. SVCD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 480x480 for NTSC or 480x576 for PAL), aspect ratio (4:3 or 16:9) and frame rate (29.97fps for NTSC, 25fps for PAL). The encoder will automatically resize the video if SVCD output type is selected and the size of the video being compressed is not correct.

    • DVD lets you create DVD-compatible files that can be put on a 1-hour DVD. DVD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 720x480 for NTSC or 720x576 for PAL), aspect ratio (16:9 or 4:3) and frame rate. The encoder will automatically resize the video if DVD output type is selected and the size of the video being compressed is not correct.

    • DICOM lets you create Digital Imaging and Communications in Medicine (DICOM), compatible mpeg2 file. The mpeg2 encoder setting is based on DICOM Part 5: Data Structures and Encoding (PS 3.5-2004), Supplement 42: MPEG2 Transfer Syntax and "Supplement 137: MPEG2 MP@HL Transfer Syntax".

      • For SD, the video size must be less than 720x480 (NTSC) or 720x576 (PAL).

      • For HD, the video size must be 1920x1080 or 1280x720. The bitrate is typically between 15 to 40 Mbit/s and it must not exceed 80MBit/s.

      The encoder will automatically resize the video if DICOM output type is selected and the size of the video being compress is not correct.

Set Default Values

Brings back the default settings of the selected Output VideoType.

Playback Frame Rate drop down box

Contains the allowable playback frame rates. The input video will be adjusted so it matches the selected frame rate.

Profile drop-down box

Contains a set of predefined profiles, or collections of compression tools used to make up the coding system.

Level drop-down box

Contains a set of predefined levels or source formats.

Aspect Ratio drop-down box

Indicates the desired aspect ratio during playback. The video will be adjusted if it does not match this desired aspect ratio, unless the Ignore Input Aspect Ratio check box is selected.

Video Format drop-down box

Specifies the TV system on which the MPEG file will be played (NTCS, PAL). Use this option when producing a file to be played on TV, such as a DVD or VCD.

Ignore Input Aspect Ratio

If checked: The input aspect ratio is assumed to be the same as the output aspect ratio. In this case, the encoder will not add black bars and the video might be distorted.

If unchecked: The input aspect ratio is assumed to be correct and the encoder will preserve the input aspect ratio when resizing or adjusting the video. Black horizontal or vertical bars might be added if the input aspect ratio does not match the output aspect ratio.

Display Scan

This option should be set to -Interlaced- if the mpeg2 file needs to be played on an interlaced device, like a TV set. Otherwise set this option to "Progressive" if the mpeg2 file needs to be played on a progressive display device like a Computer Monitor.

Coding type

Frame: each video frame is encoded one frame (both even and odd rows are encoded together).

Field: the even rows are encoded as one field and the odd rows are encoded as another field. This option might increase compression for interlaced videos.

Threads

If Auto: the encoder will pick the best number of threads for your computer.

If 'X' Encoding thread(s): the encoder will use 'X' encoding threads, where x is from 1 to 4.

This property allows you to tweak the speed of the compression depending on the number of processors in your system. The encoding will be faster on multiprocessor computers if you use more than one thread.

I Frame drop-down box

Contains the number of frames between I frames. This value must be a multiple of the number of frames between P frames, set in the P Frame drop down box.

P Frame drop-down box

Contains the number of frames between P frames.

Table 1. LEAD MPEG Encoder dialog box controls description

Notes:

The MPEG2 video streams have certain restrictions for video size, aspect ratio or frame rate. The encoder will automatically resize the video if it does not satisfy these requirements. The resizing might add horizontal or vertical black bars to ensure the output has a correct size and aspect ratio. The resize is performed using the Bresenham resizing option.

The aspect ratio specified for MPEG2 video is the display output aspect ratio, not the aspect ratio of each individual aspect ratio. Good MPEG2 decoders will pay attention to the aspect ratio and resize the video size does not match the required aspect ratio. This should be set depending on whether the video will be played on widescreen displays (16:9) or older 4:3 displays.

Examples:

A video that is 480x480 and has a 4:3 aspect ratio should be displayed as 640x480.

A video that is 480x480 and has a 16:9 aspect ratio should be displayed as 853x480.

A video that is 480x480 and has a "Square pixel" aspect ratio should be displayed as 480x480.

For more resizing options, you can use the LEAD Video Resize Filter.

Video Size, Aspect Ratio and Frame Rate Requirements

Output Type | Acceptable Video Size | Acceptable Aspect Ratio | Acceptable Frame Rate
DVD(NTSC) | 720 x 480 704 x 480 352 x 480 352 x 240 | 16 : 9 4 : 3 | 29.97 fps 23.976 fps
DVD(NTSC) | 720 x 576 704 x 576 352 x 576 352 x 288 | 16 : 9 4 : 3 | 25 fps 24 fps
SVCD (NTSC) | 480 x 480 | 4 : 3 16 : 9 | 29.97 fps
SVCD (PAL) | 480 x 576 | 4 : 3 16 : 9 | 25 fps
VCD (NTSC) | 352x240 | Any supported by MPEG1 | 29.97 fps
VCD (PAL) | 352 x 288 | Any supported by MPEG1 | 25 fps
DICOM (NTSC) | 720 x 480 or less | 4:3 (recommended) 16:9 | 29.97 fps
DICOM (PAL) | 720 x 576 or less | 4:3 (recommended) 16:9 | 25 fps
DICOM HDTV 720 | 1280 x 720 | 16:9 | 25 fps 29.97 fps 30 fps 50 fps 59.94 fps 60 fps
DICOM HDTV 1080 | 1920 x 1280 | 16:9 | 25 fps 29.97 fps 30 fps 50 fps 59.94 fps 60 fps
Custom MPEG2 (NTSC) | 1920 x 1152 or less | Square Pixel 4 : 3 16 : 9 2.21 : 1 | 29.97 fps 30 fps 23.976 fps
Custom MPEG2 (PAL) | 1920 x 1152 or less | Square Pixel 4 : 3 16 : 9 2.21 : 1 | 25 fps 24 fps

Table 2. Video Size, Aspect Ratio and Frame Rate Requirements


ILMMPEG2Encoder Interface

ILMMPEG2Encoder Interface
This is the interface for the LEAD MPEG-2 Encoder .

Interface Properties:

Type

Name

Description

eMPEG2VIDEOTYPE

VideoType

This option offers encoding parameters for VCD, SVCD, DVD and DICOM (if you select these, you cannot change most other options). If you choose MPEG1 or MPEG2, you can create a custom video stream by changing other options described below. Possible values are:

MPEG2Type_MPEG1 = 0,
MPEG2Type_VCD = 1,
MPEG2Type_MPEG2 = 2,
MPEG2Type_SVCD = 3,
MPEG2Type_DVD = 4,
MPEG2Type_DICOM = 5,

The encoder is capable of generating MPEG-1 or MPEG-2 video.

  • When the MPEG-1 radio button is checked, MPEG-1 compression is used. In this case, only Custom MPEG-1 or VCD MPEG-1 options are available.

    • Custom MPEG-1 lets you control all the MPEG-1 compression options. A custom MPEG-1 file may or may not be compatible with VCD.

    • VCD (Video on CD) lets you create VCD-compatible files. VCD-compatible files use MPEG-1 compression, but have certain restrictions on compression options, the video size (must be 352x240 for NTSC or 352x288 for PAL) and frame rate. The encoder will automatically resize the video if VCD output type is selected and the size of the video being compressed is not correct.

  • When the MPEG-2 radio button is checked, MPEG-2 compression is used. In this case, only Custom MPEG-2, SVCD, DVD 1 and DVD 2 are available.

    • Custom MPEG-2 lets you control all the MPEG-2 compression options. A custom MPEG-2 file may or may not be compatible with SVCD or DVD.

    • SVCD (Super Video CD) lets you create SVCD-compatible files. SVCD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 480x480 for NTSC or 480x576 for PAL), aspect ratio (4:3 or 16:9) and frame rate (29.97fps for NTSC, 25fps for PAL). The encoder will automatically resize the video if SVCD output type is selected and the size of the video being compressed is not correct.

    • DVD lets you create DVD-compatible files that can be put on a 1-hour DVD. DVD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 720x480 for NTSC or 720x576 for PAL), aspect ratio (16:9 or 4:3) and frame rate. The encoder will automatically resize the video if DVD output type is selected and the size of the video being compressed is not correct.

    • DICOM lets you create Digital Imaging and Communications in Medicine (DICOM), compatible mpeg2 file (SD or HD). The mpeg2 encoder setting is based on DICOM Part 5: Data Structures and Encoding (PS 3.5-2004), "Supplement 42: MPEG2 Transfer Syntax" and "Supplement 137: MPEG2 MP@HL Transfer Syntax".

      • For SD, the video size must be less than 720x480 (NTSC) or 720x576 (PAL). The encoder will automatically resize the video if DICOM output type is selected and the size of the video being compressed is not correct.

      • For HD, the video size must be 1920x1080 or 1280x720. The encoder will automatically resize the input video is not the right size. For 1920x1080, the frame rate can be 25, 29.97 or 30fps. For 1280x720, the frame rate can be 25, 29.97, 30, 50, 59.94 or 60fps. The aspect ratio is always 16:9.

eMPEG2FRAMERATE

FrameRate

This option sets the playback frame rates of the compressed video no matter what the input stream rate is. LEAD MPEG-2 Encoder Encoder will automatically adjust the input video to match the desired frame rate. The adjustment is done through dropping or duplicating input frames. Possible values are:

FRAMERATE_23_98 = 0,
FRAMERATE_24_00 = 0,
FRAMERATE_25_00 = 0,
FRAMERATE_29_97 = 0,
FRAMERATE_30_00 = 0,
FRAMERATE_50_00 = 0,
FRAMERATE_59_94 = 0,
FRAMERATE_60_00 = 0,

eMPEG2PROFILE

Profile

Use this option to Set MPEG2 profile *.

Possible values are:

MPEG2Profile_Simple = 0,
MPEG2Profile_Main = 1,
MPEG2Profile_High = 2,

Default value is MPEG2Profile_Main.

All MPEG2 Profiles listed above are generated using the 4:2:0 Chroma Format.

The LEADTOOLS MPEG2 Encoder MPEG2Profile_High does not support the 4:2:2 Chroma format.

eMPEG2LEVEL

Level

Use this option to set MPEG2 level *.

Possible values are:

MPEG2Level_Low = 1,
MPEG2Level_Main = 2,
MPEG2Level_High1440 = 3,
MPEG2Level_High = 4,

Default value is MPEG2Level_Main

eRATECONTROL

RateControlMethod

Three control methods can be selected with this property:

MPEG2_CONSTANT_BITRATE (Fixed output rate): If this is selected, the compression level is constant and the storage requirements are easily predicted. This may affect the video quality of more dynamic scenes and pictures with lots of detail. The bit rate describes the amount of data used or transferred per second. It is directly related to the compression level. For example, a DV video (approximately 1:5 compression) would need 25 Mbit (3.12MB) per second. Using MPEG-2 compression at bit rate = 6 Mbit/sec, the compression level will be 1:27. Therefore, the higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bitrate edit box. For both Variable Bitrate and Fixed Bitrate, the video quality also depends on the MPEG-2 profile used (4:2:2 or 4:2:0) and the distance between I frames and P frames.

MPEG2_CONSTANT_QUALITY (Variable bit rate and Fixed video quality). If this selected the compression rate varies with scene content. For more dynamic scenes a high bit rate (low compression) is used to maintain consistent video quality. Setting a quality value in the Quality drop down box can further control the quality.

MPEG2_VARIABLE_BITRATE If this is selected, the compression rate varies with scene content. The MinQuantizerValue, MaxQuantizerValue, Bitrate will control the video quality. The video quality will vary between the Minimum and Maximum quality factors, and the rate will not exceed the Maximum Bitrate. This option should be used when good video quality is required at a certain bit rate. (A common use for this is DVD creation). You achieve the best compression-quality performance when you use this option.

For this option, the compressor increases or decreases the quality factor automatically to maintain the highest quality at the desired bit rate, specified in the Average Bitrate and the Maximum Bitrate edit boxes. However, the quality factor will not go below the Minimum Quality factor or exceed the Maximum Quality factor.

long

QuantizerValue

This option is active only when RateControlMethod equal to MPEG2_CONSTANT_QUALITY

Use this option to set the video quality. A QuantizerValue of 1 gives the best quality and the biggest video size, while a QuantizerValue of 31 gives the smallest file size with low video quality. A QuantizerValue of 4 has been chosen as the default value.

long

MinQuantizerValue

This option is active only when RateControlMethod equal to MPEG2_VARIABLE_BITRATE.

For variable bitrates, the encoder will not use a quantizer below this value. This value range is 1 - 31.

long

MaxQuantizerValue

This option is active only when RateControlMethod equal to MPEG2_VARIABLE_BITRATE.

For variable bitrates, the encoder will not use a quantizer above this value. This value range is 1 - 31.

long

Bitrate

Set the bitrate for mpeg2 encoder in bits per second units. use this when RateControlMethod is set to MPEG2_CONSTANT_BITRATE or MPEG2_VARIABLE_BITRATE. For MPEG2_VARIABLE_BITRATE this value will represent the average bitrate.

long

I_FrameDistance

This option set the distance between I frames or how many frames between each I frames. Note that all frames between I frames are P or B frames ***. It is preferable to update P_FrameDistance before I_FrameDistance since updating one might change the other. Also notice that I_FrameDistance always should be multiple of P_FrameDistance .

long

P_FrameDistance

This option set the distance between P frames or how many frames between each P frames. Note that all frames between P frames are B frames ***. It is preferable to update P_FrameDistance before I_FrameDistance since updating one might change the other. Also notice that I_FrameDistance always should be multiple of P_FrameDistance .

VARIANT_BOOL

ShowWarningMessage

This property is now obsolete. It is now ignored by the encoder and will be removed in future versions of the encoder.

eMPEG2VIDEOFORMAT

VideoFormat

Specifies the TV system on which the MPEG file will be played (NTCS, PAL). Use this property when producing a file to be played on TV, such as a DVD or VCD. For information about HDTV resolution, please see http://en.wikipedia.org/wiki/High-definition_television. Also see "Supplement 137: MPEG2 MP@HL Transfer Syntax" of the DICOM specification for more information on the restrictions for the HDTV video that can be stored inside DICOM files.

eMPEGASPECTRATIO

AspectRatio

Sets the desired aspect ratio during playback. The video will be adjusted if it does not match this desired aspect ratio, unless the IgnoreInputAspectRatio property is set to VARIANT_TRUE.

eMPEG2DISPLAYSCAN

DisplayScan

This option should be set to -Interlaced- if the mpeg2 file needs to be played on an interlaced device, like a TV set. Otherwise set this option to "Progressive" if the mpeg2 file needs to be played on a progressive display device like a Computer Monitor.

VARIANT_BOOL

IgnoreInputAspectRatio

If VARIANT_TRUE: the input aspect ratio is assumed to be the same as the output aspect ratio. In this case, the encoder will not add black bars and the output video might be distorted.

If VARIANT_FALSE: the input aspect ratio is assumed to be correct and the encoder will preserve the input aspect ratio when resizing or adjusting the video. Black horizontal or vertical bars might be added if the input aspect ratio does not match the output aspect ratio.

HRESULT ResetToDefaultsEx ( eMpeg2ApiLevel ApiLevel)

Parameters

ApiLevel

Description

Resets encoder to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to MPEG2_APILEVEL_2 = 1.

The encoder might change in the future and have different properties or default behaviour. Calling this method ensure the filter will have the same default values as they were at the time you developed your application.

It is recommended you call ResetToDefaultsEx(MPEG2_APILEVEL_2) before you start setting properties for this interface.

Returns

S_OK

eMPEG2VIDEOTYPE

typedef enum
{
   MPEG2Type_MPEG1 = 0,
   MPEG2Type_VCD = 1,
   MPEG2Type_MPEG2 = 2,
   MPEG2Type_SVCD = 3,
   MPEG2Type_DVD = 4
} eMPEG2VIDEOTYPE;

eMPEG2FRAMERATE

typedef enum
{
   FRAMERATE_23_98 = 0,
   FRAMERATE_24_00 = 1,
   FRAMERATE_25_00 = 2,
   FRAMERATE_29_97 = 3,
   FRAMERATE_30_00 = 4,
   FRAMERATE_50_00 = 5,
   FRAMERATE_59_94 = 6,
   FRAMERATE_60_00 = 7
} eMPEG2FRAMERATE;

eMPEG2PROFILE

typedef enum
{
   MPEG2Profile_Simple = 0,
   MPEG2Profile_Main = 1,
   MPEG2Profile_High = 2
} eMPEG2PROFILE;

eMPEG2LEVEL

typedef enum
{
   MPEG2Level_Low = 1,
   MPEG2Level_Main = 2,
   MPEG2Level_High1440 = 3,
   MPEG2Level_High = 4
} eMPEG2LEVEL;

eMPEG2DEFAULTMODE

typedef enum
{
   MPEG2MODE_GENERAL = 1,
   MPEG2MODE_DVD = 2,
   MPEG2MODE_DICOM = 3,
   MPEG2MODE_MPEG1 = 4,
   MPEG2MODE_VCD = 5,
   MPEG2MODE_MPEG2 = 6,
   MPEG2MODE_SVCD = 7
} eMPEG2DEFAULTMODE;

eMPEG2DISPLAYSCAN

typedef enum
{
   MPEG2_DS_PROGRESSIVE = 0,
   MPEG2_DS_INTERLACED = 1
} eMPEG2DISPLAYSCAN;

eMPEG2VIDEOFORMAT

typedef enum

{
   MPEG2_VF_PAL = 1,
   MPEG2_VF_NTSC = 2,
   MPEG2_VF_HDTV_720 = 3,
   MPEG2_VF_HDTV_1080 = 4
} eMPEG2VIDEOFORMAT;

eRATECONTROL

typedef enum
{
   MPEG2_VARIABLE_BITRATE,
   MPEG2_CONSTANT_QUALITY,
   MPEG2_CONSTANT_BITRATE,
} eRATECONTROL;

eMPEGASPECTRATIO

typedef enum
{
   MPEG1_AR_1_0000,
   MPEG1_AR_0_6735,
   MPEG1_AR_0_7031,
   MPEG1_AR_0_7615,
   MPEG1_AR_0_8055,
   MPEG1_AR_0_8437,
   MPEG1_AR_0_8935,
   MPEG1_AR_0_9375,
   MPEG1_AR_0_9815,
   MPEG1_AR_1_0255,
   MPEG1_AR_1_0695,
   MPEG1_AR_1_1250,
   MPEG1_AR_1_1575,
   MPEG1_AR_1_2015,
   MPEG2_AR_1_0000,
   MPEG2_AR_4_3,
   MPEG2_AR_16_9,
   MPEG2_AR_2_21_1
} eMPEGASPECTRATIO;

eMpeg2ApiLevel

typedef enum
{
   MPEG2_APILEVEL_1 = 0,
   MPEG2_APILEVEL_2 = 1
} eMpeg2ApiLevel;


LEAD MPEG-4 Decoder

LEAD MPEG-4 Decoder

The LEAD MPEG-4 Decoder is a DirectShow filter for decompressing Video data using the MPEG-4 standard (ISO/IEC 14496-2). MPEG-4 is suitable for a wide range of bandwidths from low bandwidth to broadband. In addition to MP4 files, MPEG4 compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data.

Technical details for the filter are provided in the following table:

Filter Interfaces | None.
Interface ID | None.
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LMP4 MEDIASUBTYPE_mp4v
Output Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LMP4 MEDIASUBTYPE_mp4v
Filter CLSID | CLSID_LMMP4Decoder {E2B7DD6A-38C5-11D5-91F6-00104BDB8FF9}
Property Page CLSID | None.
Executable | LDecMPG42.dll , DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory ("DirectShow Filters").
Header | None.

Note: Media types and CLSIDs are defined in LGUIDs.h header file.

Platforms

Win32, x64, Mobile

This filter is included as part of the following modules:

LEADTOOLS Video Streaming Module for API

LEADTOOLS Video Streaming Module for COM

LEAD MPEG-4 Video Decoder Module


LEAD MPEG-4 Encoder

LEAD MPEG-4 is a DirectShow filter for compressing/decompressing video data usingthe MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths, from low bandwidth to broadband.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-4Encoder

The LEAD MPEG-4 Encoder is a DirectShow Ò filter for compressing video data using the MPEG-4 standard (ISO/IEC 14496-2). MPEG-4 is suitable for a wide range of bandwidths from low bandwidth to broadband. In addition to MP4 files, MPEG4 compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data. The LEAD MPEG-4 Video Encoder is easily configurable through both a programming interface and a user interface and provides the ability to deliver a video that is most suitable for the intended application.

Technical details for the filter are provided in the following table:

Filter Interfaces | ILMMP4Encoder, ILMMCommon
Interface ID | IID_ILMMP4Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_I420 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12
Output Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LMP4 MEDIASUBTYPE_mp4v MEDIASUBTYPE_XVID
Filter CLSID | CLSID_LMMP4Encoder
Property Page CLSID | CLSID_LMMP4EncoderPropertiy
Executable | LEncMPG4.dll and LEncMPG4Krn.dll, DSKernel2.dll
Filter category | CLSID_VideoCompressorCategory
Header | ILEncMPEG4.h

Note: Media types are defined in lGUIDs.h header file.

Platforms

Win32, x64

LEAD MPEG4 Encoder User Interface

This filter is included as part of the following modules:

LEADTOOLS Video Streaming Module

LEAD MPEG-4 Video Encoder Module


LEAD MPEG-4 Encoder (2.0)

LEAD MPEG-4 Encoder (2.0)

The LEAD MPEG-4 Encoder is a DirectShow Ò filter for compressing video data using the MPEG-4 standard (ISO/IEC 14496-2). MPEG-4 is suitable for a wide range of bandwidths from low bandwidth to broadband. In addition to MP4 files, MPEG4 compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data. The LEAD MPEG-4 Video Encoder is easily configurable through both a programming interface and a user interface and provides the ability to deliver a video that is most suitable for the intended application.

Technical details for the filter are provided in the following table:

Filter Interfaces | ILMMP42Encoder, ILMMCommon
Interface ID | IID_ILMMP42Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_I420 MEDIASUBTYPE_UYVY MEDIASUBTYPE_YV12
Output Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LMP4 MEDIASUBTYPE_mp4v MEDIASUBTYPE_XVID
Filter CLSID | CLSID_LMMP4Encoder
Property Page CLSID | CLSID_LMMP4EncoderPropertiy
Executable | LEncMPG42.dll, DSKernel2.dll
Filter category | CLSID_VideoCompressorCategory
Header | ILEncMPEG4_2.h

Note: Media types are defined in lGUIDs.h header file.

Platforms

Win32, x64

LEAD MPEG4 Encoder User Interface

This filter is included as part of the following modules:

LEADTOOLS Video Streaming Module

LEAD MPEG-4 Video Encoder Module


LEAD MPEG-4 is a DirectShow filter for compressing/decompressing video data usingthe MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths, from low bandwidth to broadband.DirectShow filter for compressing/decompressing video data usingthe MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths, from low bandwidth to broadband.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-4 Encoder User Interface

The LEAD MPEG-4 Encoder is a DirectShow Ò filter for compressing video data using the MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths from low bandwidth to broadband. In addition to MP4 files, MPEG4 compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data.

Key Features:

  • Supports frame rate adjustment.

  • Supports linear and nonlinear quantization.

  • Delivers 3 output formats: mp4v (standard), LMP4 and XVID. LMP4 is LEAD’s proprietary MPEG4 video. With LMP4, a super compression option can be used to achieve higher compression.

  • Supports configurable motion estimation.

LEAD's MPEG-4 video codec is a multimedia compressor / decompressor that registers into the Windows® collection of multimedia drivers and integrates with any application using DirectShow . Existing video software, such as Windows® Media Player® and Ulead Media Studio®, can utilize this codec to play, create and edit industry standard (ISO/IEC 14496-2) MPEG-4 streams.

Options for the LEAD MPEG-4 Encoder can be set manually through the encoder property page, which is shown in the figure below:

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control.

If you are using the encoder with a third-party software package, refer to your software’s documentation for information on how to access the encoder’s property page(s).

The following table shows the controls and their descriptions:

Control

Description

Compression Group

Quality Factor drop-down list box

The desired quality factor. The lower the quality factor, the better the quality. Possible values range from 1 (best) to 31 (worst).

Quantization type drop-down list box

The type of quantization to be used. Possible values are:

Value

Meaning

Linear

Use H.263 quantization.

Non-linear

Use MPEG quantization.

Output group

Frame rate drop-down list box

The desired output frame rate, in frames per second. Possible values are:

Value

Meaning

Input Frame Rate

Make the output frame rate the same as the input frame rate.

A value from 1.0 to 30.0

Use the specified output frame rate in frames per second.

Format drop-down list box

The encoder output type. Selecting the LEAD proprietary subtype, LMP4, enables the usage of super compression. Possible values are:

Value

Meaning

mp4v

Make the encoder output type the Standard MPEG4 video media subtype.

LMP4

Make the encoder output type the LEAD proprietary MPEG4 video subtype. This allows super compression to be used.

XVID

Make the encoder output type the XVID MPEG4 video subtype.

Super Compression check box

Enables/disables super compression. This is valid only with the LMP4 output type (format). When super compression is used, compressed video size is reduced noticeably with almost the same quality, and the encoding and decoding speed is enhanced.

Files generated using this option will not be MPEG4 compliant: they can be decoded only by the LEAD MPEG4 Video Decoder.

Group Of Pictures group

No. of Ps between 2 Is drop-down list box

The number of P frames between two successive I frames [1].

No. of Bs between 2 Ps drop-down list box

The number of B frames between two successive P frames[1], [2].

Group Of Picture size static text

The expected output GOP size.

Motion Estimation group

Search option drop-down list box

Predefined values for the dimensions of the search block used when determining if motion is occurring. Selecting “Custom” enables the Search Width and Search Height spin edit boxes and is selected by default. Possible values are:

Value

Meaning

Fast

(8x8)

Normal

(16x16)

Slow

(24x24)

Very Slow

(32x32)

Custom

width 16 height 16

Search width spin box

The search block width and height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream width, in pixels.

Search height spin box

The search block width and height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream height, in pixels.

Motion algorithm drop-down list box

The algorithm to be used when determining if motion is occurring. Possible values are:

Value

Meaning

Full Search

Use the full motion search algorithm (testing all possibilities). This option slows down the encoding process considerably.

Fast Search

Use fast motion search.

Four vector motion check box

If selected, the encoder will use four vectors in the motion estimation algorithm. Otherwise, one motion vector is used. When 4 vectors are used the quality is better, but the encoding is slower.

Half pixel motion check box

If selected, the encoder will use Half-Pixel accuracy (faster encoding); Full-Pixel accuracy is used otherwise.

[1] To increase compression performance, MPEG4 uses Temporal Compression. Temporal compression is achieved by only encoding the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed using prediction from a previous picture. An MPEG-4 video stream is comprised of I Frames, B Frames and P Frames, which are described as follows:

  • I: (Intraframe) frames, also called Key Frames, are encoded without reference to other frames and can be decoded independent of any other frame, and hence they allow random access. I frames are the largest frames in size and the least compressed.

  • P: (Predictive) frames are encoded using the previous I/P frame as reference and can only be decoded correctly if the previous I/P is available. P frames are smaller and more compressed than I frames.

  • B: (Bi-directional) frames are encoded using information from both the previous I/P frame and the next I/P frame and can only be decoded correctly if the previous I/P frame and the next I/P frame are available. B frames are smaller than both P and I frames and they are the most compressed frames.

  • So, to increase the compression of MPEG-4, more B and P frames should be used by adjusting the "No. of Ps between 2 Is" and the "No. of Bs between 2 Ps".

[2] To generate files that work with the QuickTime player, set this value to 0. Currently the QuickTime player does not support playing files with B frames. LEAD MPEG4 Decoder plays files that have B frames.


A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

LEAD MPEG-4 Encoder User Interface (2.0)

The LEAD MPEG-4 Encoder is a DirectShow© filter for compressing video data using the MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths from low bandwidth to broadband. In addition to MP4 files, MPEG4 compressed video data can be stored inside AVI or OGG files with the option of saving the file with or without the audio data.

Key Features:

  • Supports frame rate adjustment.

  • Supports linear and nonlinear quantization.

  • Delivers 4 output formats: mp4v (standard), LMP4, XVID, and iPod. LMP4 is LEADs proprietary MPEG4 video. With LMP4, a super compression option can be used to achieve higher compression.

  • Supports configurable motion estimation.

LEAD's MPEG-4 video codec is a multimedia compressor / decompressor that registers into the Windows® collection of multimedia drivers and integrates with any application using DirectShow. Existing video software, such as Windows® Media Player® and Ulead Media Studio®, can utilize this codec to play, create and edit industry standard (ISO/IEC 14496-2) MPEG-4 streams.

Options for the LEAD MPEG-4 Encoder can be set manually through the encoder property page, which is shown in the figure below:

Changes will be applied only when filters state is stopped with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control.

If you are using the encoder with a third-party software package, refer to your softwares documentation for information on how to access the encoders property page(s).

The following table shows the controls and their descriptions:

Control

Description

Compression Group

Constant Quality radio button

If this button is selected, a quality factor, set in the Quality Factor drop-down list box , determines the video quality. The lower the quality factor, the better the quality. Possible values range from 1 (best) to 31 (worst).

Quality Factor drop-down list box

Value that determines the video quality if the Constant Quality radio button is selected.

Variable Bitrate radio button

If this button is selected, the compression level is varied to achieve the desired average bitrate and the storage requirements can be easily predicted. The associated bit rate describes the amount of data used/transferred within the entire conversion. The higher the average bit rate, the lower the compression and the better the quality. The average bit rate can be adjusted using the Bit Rate edit box in Kilobits Per Sec.

Constant Bitrate radio button

If this button is selected, the compression level is constant and the storage requirements can be easily predicted. However, the quality of more dynamic scenes or those with more picture detail may be affected. The associated bit rate describes the amount of data used/transferred within a time period. The higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bit Rate edit box in Kilobits Per Sec.

Bit Rate edit box

Value that determines the bit rate if the Variable Bitrate or Constant Bitrate radio buttons are selected.

Scene Change Threshold slider

The threshold that determines a scene change point in a video clip. The encoder calculates this value for every inter-frame being encoded. If the calculated value is greater than threshold then it is a scene-change point and the frame will be encoded as an I-frame. The default value is 50, (values between 30-50 gives the best compression result). To turn off this feature Scene Change Detection, should be set to 100.

Encoding Threads drop-down list box

The number of threads used during encoding. The maximum number of threads that can be used is 2. Using two threads with a dual core machine or 2 CPUs will increase the encoding speed significantly. Possible values are:

Auto

Have the LEAD MPEG4 Encoder determine the appropriate number of threads.

1

Use 1 thread during encoding

2

Use 2 threads during encoding

Quantization type drop-down list box

The type of quantization to be used. Possible values are:

Value

Meaning

Linear

Use H.263 quantization.

Non-linear

Use MPEG quantization.

Output group

Frame rate drop-down list box

The desired output frame rate, in frames per second. Possible values are:

Value

Meaning

Input Frame Rate

Make the output frame rate the same as the input frame rate.

A value from 1.0 to 30.0

Use the specified output frame rate in frames per second.

Format drop-down list box

The encoder output type. Selecting the LEAD proprietary subtype, LMP4, enables the usage of super compression. Possible values are:

Value

Meaning

mp4v

Make the encoder output type the Standard MPEG4 video media subtype.

LMP4

Make the encoder output type the LEAD proprietary MPEG4 video subtype. This allows super compression to be used.

XVID

Make the encoder output type the XVID MPEG4 video subtype.

iPod

Make the encoder output compatible with iPod devices.

Super Compression check box

Enables/disables super compression. This is valid only with the LMP4 output type (format). When super compression is used, compressed video size is reduced noticeably with almost the same quality, and the encoding and decoding speed is enhanced.

Files generated using this option will not be MPEG4 compliant: they can be decoded only by the LEAD MPEG4 Video Decoder.

Interlacing check box

Enable to encode the video as interlaced fields. Otherwise, the video is encoded as frames. The default is disabled.

Group Of Pictures group

No. of Ps between 2 Is drop-down list box

The number of P frames between two successive I frames*.

No. of Bs between 2 Ps drop-down list box

The number of B frames between two successive P frames*.

Group Of Picture size static text

The expected output GOP size.

Motion Estimation group

Search option drop-down list box

Predefined values for the dimensions of the search block used when determining if motion is occurring. Selecting Custom enables the Search Width and Search Height spin edit boxes and is selected by default. Possible values are:

Value

Meaning

Fast

(8x8)

Normal

(16x16)

Slow

(24x24)

Very Slow

(32x32)

Custom

width 16 height 16

Search width spin box

The search block width and height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream width, in pixels.

Search height spin box

The search block width and height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream height, in pixels.

Motion algorithm drop-down list box

The algorithm to be used when determining if motion is occurring. Possible values are:

Value

Meaning

Full Search

Use the full motion search algorithm (testing all possibilities). This option slows down the encoding process considerably.

Fast Search

Use fast motion search.

Four vector motion check box

If selected, the encoder will use four vectors in the motion estimation algorithm. Otherwise, one motion vector is used. When 4 vectors are used the quality is better, but the encoding is slower.

Half pixel motion check box

If selected, the encoder will use Half-Pixel accuracy (faster encoding); Full-Pixel accuracy is used otherwise.

* To increase compression performance, MPEG4 uses Temporal Compression. Temporal compression is achieved by only encoding the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An MPEG-4 video stream is comprised of I Frames, B Frames and P Frames, which are described as follows:

I: (Intraframe) frames, also called Key Frames, are encoded without reference to other frames and can be decoded independent of any other frame, and hence they allow random access. I frames are the largest frames in size and the least compressed.

P: (Predictive) frames are encoded using the previous I/P frame as reference and can only be decoded correctly if the previous I/P is available. P frames are smaller and more compressed than I frames.

B: (Bi-directional) frames are encoded using information from both the previous I/P frame and the next I/P frame and can only be decoded correctly if the previous I/P frame and the next I/P frame are available. B frames are smaller than both P and I frames and they are the most compressed frames.

So, to increase the compression of MPEG-4, more B and P frames should be used by adjusting the "No. of Ps between 2 Is" and the "No. of Bs between 2 Ps".


ILMMPEG4Encoder Interface

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILMMPEG4Encoder Interface

This is the interface for the LEAD MPEG-4 Encoder.

Interface Properties:

Type

Name

Description

long

QFactor

The quality factor used in compressing the video stream; the lower the quality factor, the better the quality. Possible values range from 1 (best) to 31 (worst).

eQuantType

QuantType

The quantization method applied. Possible values are (members of the eQuantType enumeration):

LMP4_QUANTTYPE_Linear: Use H.263 quantization.

LMP4_QUANTTYPE_NonLinear: Use MPEG quantization.

double

OutputFrameRate

The desired output frame rate, in frames per second. Possible values range from 1.0 to 30.0. Pass -1 to make the output frame rate the same as the input frame rate.

eOutputFormat

OutputFormat

The encoder output type. Possible values are (members of the eOutputFormat enumeration):

LMP4_OUTPUTFORMAT_mp4v: Make the encoder output type the Standard MPEG4 video media subtype.

LMP4_OUTPUTFORMAT_LMP4: Make the encoder output type the LEAD proprietary MPEG4 video subtype. This allows super compression to be used.

LMP4_OUTPUTFORMAT_XVID: Make the encoder output type the XVID video subtype.

VARIANT_BOOL

SuperCompression

Enables/disables super compression, LEAD’s improvement to the MPEG4 video compression. When super compression is used, compressed video size is reduced noticeably with almost the same quality, and the encoding and decoding speed is enhanced.

Files generated using this option, will not be MPEG4 compliant: they can be decoded only by the LEAD MPEG4 Video Decoder.

Possible values are:

VARIANT_TRUE: Enable super compression. This is allowed only if the output format is set to LMP4_OutputFormat_LMP4.

VARIANT_FALSE: Disable super compression.

long

PFrames

Specifies the number of P frames between two successive I frames *.

long

BFrames

Specifies the number of B frames between two successive P frames *.

long

SearchWidth

The search block width used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream width, in pixels.

long

SearchHeight

The search block height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream height, in pixels.

eMotionAlgorithm

MotionAlgorithm

The algorithm to be used when determining if motion is occurring. Possible values are (members of the eMotionAlgorithm enumeration):

LMP4_MOTIONALGORITHM_FullSearch: Use the full motion search algorithm (testing all possibilities). This option slows down the encoding process considerably.

LMP4_MOTIONALGORITHM_FastSearch: Use fast motion search.

eMotionAccuracy

MotionAccuracy

Motion estimation accuracy. Possible values are (members of the eMotionAccuracy enumeration):

LMP4_MOTIONACCURACY_FullPixel: One pixel accuracy.

LMP4_MOTIONACCURACY_HalfPixel: Half pixel accuracy (faster).

eMotionVectorPerMacroblock

MotionVectorPerMacroblock

Specifies how many motion vectors are used in the motion estimation algorithm. Possible values are (members of the eMotionVectorPerMacroblock enumeration):

LMP4_MOTIONVECTOR_OnePerMacroblock: Use one motion vector (fast).

LMP4_MOTIONVECTOR_FourPerMacroblock: Use four motion vectors (better quality, slower encoding).

Methods:

Name | Parameters | Description
WriteToRegistry | None | This method writes all of the encoder settings to the system registry. The next time the encoder is loaded, it retrieves the settings from the registry and applies them.

* To increase compression performance, MPEG4 uses Temporal Compression. Temporal compression is achieved by only encoding the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An MPEG-4 video stream is comprised of I Frames, B Frames and P Frames:

  • I: (Intraframe) frames. These frames are also called Key Frames, they are encoded without reference to other frames and can be decoded independent of any other frame, and hence they allow random access. I frames are the largest frames in size and least compressed.

  • P: (Predictive) frames are encoded using the previous I/P frame as reference and can only be decoded correctly if the previous I/P is available. P frames are smaller and more compressed than I frames.

  • B: (Bi-directional) frames are encoded using information frame the previous I/P frame and the next I/P frame and can only be decoded correctly if the previous I/P frame and the next I/P frame are available. B frames are smaller than both P and I frames and they are the most compressed frames.

So to increase the compression of MPEG-4 more B and P frames should be used by adjusting PFrames and BFrames properties.


ILMMP42Encoder Interface

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILMMP42Encoder Interface

This is the interface for the LEAD MPEG-4 Encoder.

Interface Properties:

Type

Name

Description

long

QFactor

The quality factor used in compressing the video stream; the lower the quality factor, the better the quality. Possible values range from 1 (best) to 31 (worst).

eQuantType

QuantType

The quantization method applied. Possible values are (members of the eQuantType enumeration):

LMP4_QUANTTYPE_Linear: Use H.263 quantization.
LMP4_QUANTTYPE_NonLinear: Use MPEG quantization.

double

OutputFrameRate

The desired output frame rate, in frames per second. Possible values range from 1.0 to 30.0. Pass -1 to make the output frame rate the same as the input frame rate.

eOutputFormat

OutputFormat

The encoder output type. Possible values are (members of the eOutputFormat enumeration):

LMP4_OUTPUTFORMAT_mp4v: Make the encoder output type the Standard MPEG4 video media subtype.

LMP4_OUTPUTFORMAT_LMP4: Make the encoder output type the LEAD proprietary MPEG4 video subtype. This allows super compression to be used.

LMP4_OUTPUTFORMAT_XVID: Make the encoder output type the XVID video subtype.

VARIANT_BOOL

SuperCompression

Enables/disables super compression, LEAD’s improvement to the MPEG4 video compression. When super compression is used, compressed video size is reduced noticeably with almost the same quality, and the encoding and decoding speed is enhanced.

Files generated using this option, will not be MPEG4 compliant: they can be decoded only by the LEAD MPEG4 Video Decoder.

Possible values are:

VARIANT_TRUE: Enable super compression. This is allowed only if the output format is set to LMP4_OutputFormat_LMP4.

VARIANT_FALSE: Disable super compression.

long

PFrames

Specifies the number of P frames between two successive I frames *.

long

BFrames

Specifies the number of B frames between two successive P frames *.

long

SearchWidth

The search block width used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream width, in pixels.

long

SearchHeight

The search block height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream height, in pixels.

eMotionAlgorithm

MotionAlgorithm

The algorithm to be used when determining if motion is occurring. Possible values are (members of the eMotionAlgorithm enumeration):

LMP4_MOTIONALGORITHM_FullSearch: Use the full motion search algorithm (testing all possibilities). This option slows down the encoding process considerably.

LMP4_MOTIONALGORITHM_FastSearch: Use fast motion search.

eMotionAccuracy

MotionAccuracy

Motion estimation accuracy. Possible values are (members of the eMotionAccuracy enumeration):

LMP4_MOTIONACCURACY_FullPixel: One pixel accuracy.

LMP4_MOTIONACCURACY_HalfPixel: Half pixel accuracy (faster).

eMotionVectorPerMacroblock

MotionVectorPerMacroblock

Specifies how many motion vectors are used in the motion estimation algorithm. Possible values are (members of the eMotionVectorPerMacroblock enumeration):

LMP4_MOTIONVECTOR_OnePerMacroblock: Use one motion vector (fast).

LMP4_MOTIONVECTOR_FourPerMacroblock: Use four motion vectors (better quality, slower encoding).

eEncodingThreads

EncodingThreads

The number of threads used during encoding. The maximum number of threads that can be used is 2. Using two threads with a dual core machine or 2 CPUs will increase the encoding speed significantly. Possible values are:

LMP4_THREAD_AUTO: Have the LEAD MPEG4 Encoder determine the appropriate number of threads.

LMP4_THREAD_1: Use 1 thread during encoding

LMP4_THREAD_2: Use 2 threads during encoding

VARIANT_BOOL

InsertVOL

Set to VARIANT_TRUE to insert a mpeg4 header before each I-frame. This is useful in a video broadcasting where the mpeg4 decoder might start decoding from the middle of the stream.

VARIANT_BOOL

InsertGOV

Set to VARIANT_TRUE to insert an optional header before I frames that indicates to the decoder the timestamp of the I frame and whether it is open/closed GOV. This helps the stream to be randomly seeked in some decoders. However, the LEAD MPEG4 decoder does not require it.

eCompressionMode

CompressionMode

Sets the compression mode. Possible values are:

LMP4_COMPRESSIONMODE_ConstantQuality: Uses the QFactor property value to regulate the image quality.

LMP4_COMPRESSIONMODE_VariableBitrate: Varies the quality over short durations. However, it will achieve an average rate matching the BitRate property value.

LMP4_COMPRESSIONMODE_ConstantBitrate: Strictly adheres to the rate specified in the BitRate property.

long

BitRate

This is the average or constant bitrate used when the CompressionMode is set to LMP4_COMPRESSIONMODE_VariableBitrate or LMP4_COMPRESSIONMODE_ConstantBitrate. The value is in bits per second.

Methods:

Name | Parameters | Description
WriteToRegistry | None | This method writes all of the encoder settings to the system registry. The next time the encoder is loaded, it retrieves the settings from the registry and applies them.

* To increase compression performance, MPEG4 uses Temporal Compression. Temporal compression is achieved by only encoding the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An MPEG-4 video stream is comprised of I Frames, B Frames and P Frames:

  • I: (Intraframe) frames. These frames are also called Key Frames, they are encoded without reference to other frames and can be decoded independent of any other frame, and hence they allow random access. I frames are the largest frames in size and least compressed.

  • P: (Predictive) frames are encoded using the previous I/P frame as reference and can only be decoded correctly if the previous I/P is available. P frames are smaller and more compressed than I frames.

  • B: (Bi-directional) frames are encoded using information frame the previous I/P frame and the next I/P frame and can only be decoded correctly if the previous I/P frame and the next I/P frame are available. B frames are smaller than both P and I frames and they are the most compressed frames.

So to increase the compression of MPEG-4 more B and P frames should be used by adjusting PFrames and BFrames properties.


LEAD Screen Capture Codec Filter (VFW)

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Screen Capture Codec Filter (VFW)

LEAD's Screen Capture Codec Filter (VFW) is a VFW codec for compressing video data using LEAD's proprietary screen capture standard. For more information on LEAD's screen capture compression, refer to LEAD Screen Capture Encoder.

New applications should use the LEAD Screen Capture Encoder/Decoder filters. This codec is provided for compatibility with older applications. This VFW codec is also used by Media Player to play WMV files using LEAD SCR compression.

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video. Subtype: MEDIASUBTYPE_RGB24.
Output Media Types | Type: MEDIATYPE_Video. Subtype: MEDIASUBTYPE_LSCR.
Filter CLSID | N/A
Property Page(s) CLSID | N/A
Filter category | N/A
Executable | LCODCSCR.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64

You need to unlock the LEAD Screen Capture Codec Filter (VFW) to use the above filter in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Screen Capture Decoder

Also known as a decompressor, this is a module or algorithm to decompress data.decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Screen Capture Decoder

LEAD's Screen Capture Decoder is a DirectShow Ò decoder for decompressing video data compressed using LEAD's proprietary screen capture standard. For more information on LEAD's screen capture compression, refer to LEAD Screen Capture Encoder.

Filter Interface(s) | ILMMCommon
Interface ID | IID_ILMMCommon
Input/Output Media Types | The major media type is MEDIATYPE_Video. Subtypes: Decoder: Input: MEDIASUBTYPE_LSCR. Output: MEDIASUBTYPE_RGB24.
Filter CLSID | CLSID_LMScrCapDecoder
Property Page(s) CLSID | The decoder has no property page.
Filter category | CLSID_LegacyAmFilterCategory
Executable | LDECSCR.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64

You need to unlock the LEAD Screen Capture Decoder to use the above filter in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview.


LEAD Screen Capture Encoder (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Screen Capture Encoder (2.0)

LEAD's Screen Capture Video Encoder is a DirectShow Ò encoder for compressing video data using LEAD's proprietary screen capture standard.

The encoder registers into the Windows® collection of multimedia drivers (under the DirectShow Video Compressors category) and integrates with any application using DirectShow.

Existing video software, such as Windows® Media Player® and Ulead Media Studio®, can utilize this encoder to create, and edit industry standard LEAD's proprietary LSCR files. This encoder is designed and most suited for screen-captured streams, best for presentations and applications tutoring. LSCR delivers much smaller file sizes, yet uses a lossless compression technique.

Filter Interface(s) | ILMScrCapEncoder ILMMCommon
Interface ID | IID_ILMScrCapEncoder IID_ILMMCommon
Input/Output Media Types | The major media type is MEDIATYPE_Video. Subtypes: Input: MEDIASUBTYPE_RGB24. Output: MEDIASUBTYPE_LSCR.
Filter CLSID | CLSID_LMScrCapEncoder
Property Page(s) CLSID | CLSID_LMScrCapEncoderPropertyPage
Filter category | CLSID_VideoCompressorCategory
Executable | LENCSCR2.dll, DSKernel2.dll
Header | ILENCSCR2.h

Platforms

Win32, x64

LEAD Screen Capture Encoder Filter User Interface

You need to unlock the LEAD Screen Capture Encoder (2.0) to use the filter in RELEASE mode.

For more information, refer to:

Evaluation Mechanism Overview. .


LEAD Screen Capture Encoder User Interface (2.0)

LEAD Screen Capture Encoder User Interface (2.0)

This is the main interface for the screen capture encoder filter. It contains properties to adjust the key frame spacing and the quality factor, and a method to force a key frame. The property page is shown in the following figure:

The Screen capture encoder property page provides a user interface for changing the filter's attributes. Changes will be applied when the Apply or OK is clicked. Positioning the mouse pointer over a control displays general information for that control.

The following table shows the controls and their descriptions:

Control | Description
Key frame spacing edit box | Specifies the number of frames between key frames.
Force key frame button | Forces the current frame to be compressed as a key frame.
Qfactor slider bar | Specifies the quality factor for compression

LEAD Screen Capture Codec Filter (VFW)

LEAD Screen Capture Decoder

LEAD Screen Capture Encoder

ILMScrCapEncoder Interface

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.


ILMScrCapEncoder Interface

ILMScrCapEncoder Interface

This is the interface for the LEAD Screen Capture Encoder.

Interface Properties:

Type | Name | Description
long | KeyFrameSpace | Gets or sets the number of frames between key frames (key frame spacing). For example, if the rate is 5, then a key frame is taken every 5 frames. If the value is 0, then the first frame is the only key frame in the video.
BYTE | QFactor | Gets or sets the quality factor for compression. The value range is between 1 and 9. Use 1 for fast compression and 9 for high compression.

Interface methods:

HRESULT ForceKeyFrame(long FrameNumber)

Parameters

FrameNumber

The zero based number (position) of the frame to compress as a key frame. Use -1 to make the next passing frame a key frame. Valid values range between -1 and the total number of frames in the stream less one. Note that the filter do not know the total number of frames in the stream; so a number greater than the total number of frames in the stream will be accepted but will have no effect since it’ll not be reached.

Description

Forces the frame at the specified position to be a key frame. The method will return S_FALSE if the frame at the specified position has already been compressed.

Returns

S_OK if succeeded, Error code otherwise.


LEAD Theora Decoder

Also known as a decompressor, this is a module or algorithm to decompress data.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD Theora Decoder

The LEAD Theora Decoder is a DirectShowÒ decoder for decompressing video data compressed using the Theora compression. For more information on Theora compression, refer to LEAD Theora Encoder.

Technical details for the filter are provided in the following table:

Filter Interface(s) | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_LTHE
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_YV12 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB565 MEDIASUBTYPE_RGB555
Filter CLSID | CLSID_LMTheoraDecoder
Property Page(s) CLSID | N/A
Filter category | CLSID_LegacyAmFilterCategory
Executable | LDecTheora.dll, DSKernel2.dll
Header | N/A

Platforms

Win32, x64


LEAD Theora Encoder

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD Theora Encoder

The LEAD Theora Encoder is a DirectShowÒ encoder for compressing video data using Theora compression. Theora is an open video codec developed by the Xiph.org foundation aimed at offering a patent-free alternative to MPEG-4. The compression is comparable to MPEG-2, H.263, MPEG-4 and H.264 and, unlike these codecs, the Theora codec is free of patent fees.

For more information, you can go to http://www.xiph.org and http://theora.org.

The compression options for the LEAD Theora Encoder can be set manually through the encoder property page. They can also be set programmatically through the ILMTheoraEncoder interface.

Technical details for the filter are provided in the following table:

Filter Interface(s) | ILMTheoraEncoder
Interface ID | IID_ILMTheoraEncoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_RGB32
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_LTHE
Filter CLSID | CLSID_LMTheoraEncoder
Property Page(s) CLSID | CLSID_LMTheoraEncoderProperty
Filter category | CLSID_VideoCompressorCategory
Executable | LEncTheora.dll, DSKernel2.dll
Header | ILEncTheora.h

Platforms

Win32, x64

LEAD Theora Encoder User Interface


LEAD Theora Encoder User Inteface

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD Theora Encoder User Interface

The LEAD Theora Encoder is a DirectShowÒ encoder for compressing video data using Theora compression. Theora is an open video codec developed by the Xiph.org foundation aimed at offering a patent-free alternative to MPEG-4. The compression is comparable to MPEG-2, H.263, MPEG-4 and H.264 and, unlike these codecs, the Theora codec is free of patent fees.

The compression options for the LEAD Theora Encoder can be set manually through the encoder property page. They can also be set programmatically through the ILMTheoraEncoder interface. The following figure shows the encoder property page:

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel.

If you are using the encoder with a third-party software package, refer to your software’s documentation for information on how to access the encoder’s property page(s).

The following table shows the controls and their descriptions:

Control

Description

Rate Control group

Use the controls in this group to control the output quality and bitrate.

Constant Quality radio button

Select this button when you want the output file to be a certain quality.

Quality Factor drop-down list box.

Select a quality factor ranging from 1 (highest quality, lowest compression ratio) to 64 (lowest quality, highest compression ratio).

Enabled only if the Constant Quality radio button is selected.

Constant Bitrate radio button

Select the Constant Bitrate radio button when you want the file to have a certain bitrate.

Max Quality Factor drop-down list box.

Select the maximum quality factor to be used in order to achieve the desired bitrate. A higher value makes it more likely that the compressor will achieve the desired bitrate. Recommended value: 64.

Enabled only if the Constant Bitrate radio button is selected.

Target Bitrate edit box

Enter the desired bitrate (in kbits/second). Note that this is 8 times larger than a bitrate specified in kilo bytes (KB) per second. For example, for a bitrate comparable with a 56kbps modem, you would enter 56 as the bitrate.

Output Frame Rate group

Use the controls in this group to adjust frame rate settings.

Output Frame Rate drop-down list box

Use the Output Frame Rate drop-down list box to specify one of the predefined output frame rates. The default value is "Input Frame Rate". Possible Values are

Value

Meaning

Input Frame Rate

Select this item to keep the frame rate unchanged.

1 fps

1 frame/second

5 fps

5 frames/second

7 fps

7 frames/second

10 fps

10 frames/second

15 fps

15 frames/second

20 fps

20 frames/second

23.976 fps - NTSC encapsulated film rate

23.976 frames/second

24 fps - Standard international cinema film rate

24 frames/second

25 fps - PAL (625/50) video frame rate

25 frames/second

29.97 fps - NTSC video frame rate

29.97 frames/second

30 fps - NTSC drop-frame (525/60) video frame rate

30 frames/second

50 fps - double frame rate/progressive PAL

50 frames/second

59.94 fps - double frame rate NTSC

59.94 frames/second

60 fps - double frame rate drop-frame NTSC

60 frames/second

Other Options group

Use the controls in this group to adjust other compression options.

I Frame Distance drop-down list box.

Specifies the maximum distance between key frames. Note that the codec might still insert additional key frames if it detects that a new key frame is necessary. A new key frame is generated sooner if the background changes too much and the current key frame is not suitable anymore for the frames being compressed. The default value is 64.

Fast Compression check box

Select this check box to enable the fast compression mode, which is 3 times faster than non-fast compression mode. The tradeoff is a small reduction in compression ratio. The default value is selected.

Sharpness drop-down list box.

Specify the desired sharpness of the video. The possible values are 0 (sharpest), 1 and 2 (least sharp). Sharper video looks better, but takes up more disk space. The default value is 2.

Rate Control Group

Use the Rate Control group controls to manage compression. The LEAD Theora Encoder has two compression modes: Quality driven, using Variable Bitrate (VBR); and Rate driven, using Constant Bitrate (CBR).

Quality-Driven

Use the variable bitrate compression mode to create a file with a specific quality. In such cases, it is not possible to accurately predict the generated file size. However, the movie will have the same quality throughout its length. Also, videos of various sizes (width, height, frame rate) will have a consistent quality when they are compressed using the same quality factor. When using quality driven compression:

· Low quality factor values will generate better quality videos and lower compression (larger file size)

· High quality factor values will generate lower quality videos and higher compression (smaller file size)

Rate-Driven

Use a constant bitrate when the generated file should have a specific bitrate. Typically this is used when a file is put on a web site and the file is to be played by computers whose Internet connection matches a specific speed. Or, when a codec in a videoconferencing or streaming application that uses a specific connection speed.

Remember that the bitrate is measured in kilo bits per second (kbps) not kilo bytes per second (KB/s)! To convert kilo bits/second to kilo bytes/second, divide by 8. Files compressed with variable bitrates should have the same size, regardless of the video width and height. This means that when two videos of different width and height are converted to the same bitrate, the video with the larger size will have a poorer quality than the video with smaller size.

Constant Bitrate (CBR) compression can be controlled in two ways: by selecting a maximum QFactor and by selecting a target bitrate. The compressor will achieve a desired target bitrate by adjusting the quality factor used to encode each frame. You can specify that the quality factor should never exceed a certain value. In this case, the quality will not be worse than what you feel it is acceptable. But, in this case, there is also a lower chance that you will get the output bitrate that you desire. It is recommended to leave the max quality factor to 64 if it is important that you get a certain output bitrate.

Output Frame Rate Group

Use the output Frame Rate list box to modify the frame rate of the file being compressed. Usually, videos are 30fps (30 frames per second). At this frame rate, the human eye perceives moving objects as smooth. Reducing the frame rate greatly increases the compression. But, as the frame rate is reduced, the video becomes jerkier. At 15fps video will still look acceptably smooth. Below this, the jerkiness becomes noticeable.

Generally, decrease the video frame rate in order to achieve higher compression. You can also increase the frame rate, but that is not recommended, since the output file will be bigger and the quality will not be any better. For example, if the original video is 15fps and you compress it as 30fps, the compressed video will NOT be smoother than the original.

It is recommended to reduce the frame rate if you increase the quality factor to the point you start seeing compression artifacts and the compression is still not good enough. In that case, reduce the frame rate and reduce the quality factor and you might get better visual results.

Other Options group

Use the I frame distance drop-down list box to specify the maximum distance between key frames.

The more key frames are used, the faster the seek operations. Seeks occur when you play a video file and you try to skip ahead or go back in the movie. You will notice that the playback does not start immediately. You can reduce the delay between the time you perform the seek and when the playback starts by reducing the distance between key frames. Also, if you use the encoder in a videoconferencing or streaming situations, the decoder will connect quicker if you have more key frames.

There is a price for that: key frames are a lot larger than the non-key frames, so the more key frames you have, the lower the compression will be (and bigger the output file).

The distance between key frames is specified in Frames. For example, if the distance between I frames is 64 and the output video is 30 fps, you will have a key frame every 2.1 seconds. Note that, for a 15fps video, 64 frames is equivalent to about 4 seconds.

You can use the Sharpness setting to adjust the video’s sharpness. A value of 0 generates the sharpest video, whilst a value of 2 generates less sharp video. The trade-off is the compression ratio: a sharper video compress reduces the compression ratio, so the output file is bigger. The default value is 2.


ILMTheoraEncoder Interface

ILMTheoraEncoder Interface

This is the interface for the LEAD Theora Encoder.

Interface Properties:

Type

Name

Description

eTHEORARATECONTROL

RateControlMethod

Set to THEORA_CONSTANT_BITRATE to use bitrate-based compression (CBR = constant bitrate). In this case, the bitrate is given by the AverageBitrate and MaxQFactor properties.

Set to THEORA_CONSTANT_QUALITY to use quality-based compression (VBR = variable bitrate). In this case, the quality is given by the QFactor property.

The default value is THEORA_CONSTANT_QUALITY.

long

AverageBitrate

(Used only if RateControlMethod is THEORA_CONSTANT_BITRATE). Use this value to set the desired compressed video rate in bits per second. Note: this is not the same value as in the property page, since the property page value is in kilo bits per second.

The default value is 400000.

long

MaxQFactor

(Used only if RateControlMethod is THEORA_CONSTANT_BITRATE). Indicate the maximum quality factor that should be used to achieve the desired bitrate. The value ranges from 1 (best quality, lowest compression ratio) to 64 (worst quality, highest compression). The compressor will not use a quality factor higher than this value. If you set this property to a low value, the compressor might not be able to achieve the desired bitrate. The recommended value is 64, which gives the compressor the freedom to use any quality factor in order to achieve the desired compression rate.

The default value is 64.

long

QFactor

(Used only if RateControlMethod is THEORA_CONSTANT_QUALITY). Use a custom quality factor. The value ranges from 1 (best quality, lowest compression) to 64 (worst quality, highest compression).

The default value is 32.

long

I_FrameDistance

Set the maximum distance between I frames. The compressor will smartly decide when it is time to generate a new key (I) frame, but this setting guarantees a maximum distance between I frames. The I frame distance must be a power of two. The allowed values are: 1, 2, 4, 8, 16, 32, 64 (default), 128, 256, 512, 1024, 2048, 4096, 8192, 16384 and 32768.

The distance between I frames becomes important especially when you use the compressor for videoconferencing applications. The decoder can start decoding only when it encounters an I frame. If the distance between I frames is too great, the decoder will take a long time to start playing. Seeking will also take longer when you have a big distance between I frames. On the other hand, I frames are larger and a big distance between I frames reduces the size of the compressed video.

The default value is 64.

double

OutputFrameRate

Use this property to control the output frame rate. You can set the output frame rate to be the same as the input frame rate (0) or you can set it to particular output frame rate (if > 0). Note that you should set the output frame rate to be less than the input frame rate (to get better compression). It is not very useful to set the output frame rate to more than the input frame rate.

The default value is 0 (use input frame rate).

VARIANT_BOOL

FastCompression

Set to TRUE to increase the compression speed by a factor of 3x.

Set to FALSE to use the slower compression – this will produce slightly better compression.

The default value is TRUE.

long

Sharpness

Use this to control the sharpness of the generated video. Allowed values are 0 (Sharpest), 1 and 2 (Least sharp). Sharper video looks better but will greatly reduce the compression ratio.

The default value is 2.

Interface Methods:

HRESULT WriteToRegistry()

Description

Writes the values of all of the properties listed above to the system registry, so that the encoder will remember these settings the next time it is used. This method is automatically called by the encoder property page when you make changes and click on Apply or OK buttons.

Return

S_OK if successful, S_FALSE otherwise.

HRESULT ReadFromRegistry()

Description

Reads all the values of all of the properties listed above from the system registry, so that the encoder will use the last defaults saved through WriteToRegistry.

Return

S_OK if successful, HRESULT error code otherwise.

HRESULT ResetToDefaults()

Description

Resets the encoder to its defaults.

Return

S_OK if successful, HRESULT error code otherwise.

eTHEORARATECONTROL enumeration

Value | Description
THEORA_CONSTANT_BITRATE | [0] The compressor will try to achieve bitrate indicated by AverageBitrate property and with quality factors ranging from 1 to MaxQFactor.
THEORA_CONSTANT_QUALITY | [1] The compressor will generate output of constant quality, as indicated by the QFactor property.


LEAD Vorbis Decoder

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD Vorbis Decoder

The LEAD Vorbis Decoder, is a DirectShow Ò filter for decompressing Vorbis audio data. For more information on the Vorbis audio compression algorithm, refer to LEAD Vorbis Encoder.

Technical details for the filter are provided in the following table:

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_Vorbis MEDIASUBTYPE_LEADVorbis (WAVEFORMATEX type with WAVE_FORMAT_LEADVORBIS for the format tag)
Output Media Types | Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_PCM
Filter CLSID | CLSID_LMVorbisDecoder
Property Page CLSID | N/A
Executable | LDecVorbis.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | N/A

Platforms

Win32, x64

LEAD Vorbis Encoder User Interface


LEAD Vorbis Encoder

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

LEAD Vorbis Encoder

The LEAD Vorbis Encoder is a DirectShow Ò filter for compressing audio data using the Vorbis compression algorithm. Vorbis is a new audio compression method used to store digital music or any audio data. The compressed audio data can be stored inside AVI or Ogg files.

Compared to MP3 compressed audio files, Vorbis based compression produces audio files that maintain a higher sound quality and/or a smaller compressed size, depending on the needs of the user. For example, the user has the option of keeping his or her digital music collection at the same sound quality level as MP3, but requiring significantly less disk space. Or, a user can commit the same amount of storage (disk space) as the MP3 based files, however the digital music will have higher quality sound.

The compression options for the LEAD Vorbis encoder can be set manually through the encoder property page. The compression options can also be set programmatically using the ILMVorbisEncoder interface.

Technical details for the filter are provided in the following table:

Filter Interfaces

ILMVorbisEncoder , ILMMCommon

Interface ID

IID_ILMVorbisEncoder

Input Media Types

Type:
MEDIATYPE_Audio
Subtypes:
MEDIASUBTYPE_WAVE
MEDIASUBTYPE_PCM

Output Media Types

Type:
MEDIATYPE_Audio
Subtype:
MEDIASUBTYPE_Vorbis
MEDIASUBTYPE_LEADVorbis (WAVEFORMATEX type with WAVE_FORMAT_LEADVORBIS for the format tag)

Filter CLSID

CLSID_LMVorbisEncoder

Property Page CLSID

CLSID_LMVorbisEncoderProperty

Executable

LEncVorbis.dll

Filter category

CLSID_AudioCompressorCategory

Header

ILEncVorbis.h

Platforms

Win32, x64

LEAD Vorbis Encoder User Interface


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

oftware component which decompresses audio. It must be designed to work with ACM or DirectShow. Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD Vorbis Encoder User Interface

The LEAD Vorbis Audio Encoder is a DirectShowÒ filter for compressing/decompressng audio data using the Vorbis compression algorithm. Vorbis is a new audio compression method used to store digital music or any audio data. This compression is far superior to MP3. The compressed audio data can be stored inside AVI or Ogg files.

Compared to MP3 compressed audio files, Vorbis-based compression produces audio files that maintain a higher sound quality and/or a smaller compressed size, depending on the needs of the user. For example, the user has the option of keeping his or her digital music collection at the same sound quality level as MP3, but requiring significantly less disk space. Or, a user can commit the same amount of storage (disk space) as the MP3 based files, however the digital music will have higher quality sound.

The compression options for the LEAD Vorbis encoder can be set manually through the encoder property page and is shown in the figure below:

Changes will be applied directly to the streaming media with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control.

The following table shows the controls and their descriptions:

Control

Description

Variable Rate Radio Button

When this radio button is selected,each piece of audio data is compressed using a different byte rate, depending on the audio content. If there are complex parts in an audio track, the compression algorithm will use a higher byte rate. If a portion of the track is relatively simple (for example silence), a lower byte rate is used. This variable rate compression technique produces very efficient compression results. The only disadvantage of this technique is that seeking to a particular point in the compressed stream is not possible. This is also known as VBR.

The variable rate option should be used when consistent audio quality and high compression are the top priority.

If this option is selected, the Quality Factor Drop-down box is enabled.

Constant Rate Radio Button

With this option, every piece of audio data is compressed using the same byte rate regardless of any changes in the audio stream. The result is that the sound quality is altered to reduce the information to fit the fixed byte rate. Accordingly, the quality is not consistent throughout the whole stream: the complex portions will be compressed more to fit the allowed byte rate.

Using this option makes it easier to estimate the file size. Additionally, the compressed audio is searchable, and therefore a particular point within the audio stream can be found. The constant rate compression option is also ideal when an audio file needs to fit a constant bit rate transmission channel.

The Constant Bit Rate, also known as CBR, must be used when saving compressed data inside AVI files. The AVI format does not support variable bit rate audio compression.

Quality Factor Drop – down list box

Controls the compression ratio when the Variable Rate option is selected. Possible values are:

Value

Meaning

Any Rate (Best Quality)

Highest Quality

Produces the best audio quality and the biggest file size - low compression ratios.

High Quality

Quality is more important than size

With approximately 120kbps, gives a smaller file size and significantly better quality than MP3 compression at 128kbps

Quality and size are equally important

Produces a very-near-CD-quality audio at roughly 17,500 Bytes per second (160 Kbps).

Size is more important than quality

Small size 1 / High compression

Small size 2 / High compression

Small size 3 / Default

Small size 4 / High compression

Small size 5 / High compression

Smallest Size / Highest compression

Produces the smallest file size and the lowest audio quality - high compression ratios.

Average Byte Per Second Slider

Controls the compression ratio when the Constant Rate option is selected.

Using a constant byte rate makes it easier to estimate file size. For example, if a byte rate of 5000 is chosen for an audio clip of 60 sec, the resulting file size will be approximately 300,000 bytes, (60 x 5000 = 300,000).

Maximum Input Rate Drop – down list box

Contains values used to further increase the compression by reducing the audio frequency. Note that this can greatly decrease the audio quality (a lot more so than just setting the compression to maximum). Leave this on "Any rate" unless the extra compression is needed. Possible values are:

Value

Meaning

8000 Hz

Telephone Quality

11025 Hz

Poor AM Radio Quality

22050 Hz

Near FM Radio Quality

32075 Hz

Better than FM Radio Quality

44100 Hz

CD Quality

Any Rate

Best Quality

Maximum Input Channels Drop – down list box

Contains settings used to further increase the compression by forcing the audio to be Mono. This can also degrade audio quality. Leave this on "Any" unless the extra compression is needed.

Value

Meaning

Mono

Forces the audio to be Mono

Any


ILMVorbisEncoder Interface

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

oftware component which decompresses audio. It must be designed to work with ACM or DirectShow . Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

ILMVorbisEncoder Interface

Interface Properties:

Type

Name

Description

VARIANT_BOOL

EnableQualityFactor

If this property is TRUE, the output will be compressed using a variable byte rate, and the QualityFactor property should be used to control compression. Set this option to TRUE when consistent audio quality and high compression are the top priority.

If this property is FALSE, the output will be compressed at a constant byterate, and the MaximumByteRate, MinimumByteRate and NominalByteRate properties should be used to control compression. This is useful to generate a predictable file size and when an audio file needs to fit a constant bitrate transmission channel. Moreover, the compressed audio file is searchable, and therefore a particular point within the audio stream can be found. For more information on the quality factor and variable byte rate vs. constant byte rate, see the descriptions for the Variable Rate Radio Button, the Constant Rate Radio Button and the Quality Factor drop-down box above.

long

QualityFactor

This property controls the compression ratio when EnableQualityFactor is TRUE. There are 8 quality factors, ranging from "Highest Quality" (which produces the best audio quality and the biggest file size - low compression ratios) to "Smallest Size/Highest Compression" (which produces the smallest file size and the lowest audio quality - high compression ratios). "Quality and Size are equally important" is a good choice to produce very-near-CD-quality audio at roughly 17,500 Byte per second rate (160 Kbps). "Quality is more important than size", with approximately 120kbps gives a smaller file size and significantly better quality than MP3 compression at 128kbps.

long

NominalByteRate

This property contains the value to set as the average/nominal bitrate in bits per second. It is valid only if the EnableQualityFactor property is FALSE.

long

MaximumByteRate

This property contains the value to set as the maximum bitrate in bits per second. It is valid only if the EnableQualityFactor property is FALSE.

long

MinimumByteRate

This property contains the value to set as the minimum bitrate in bits per second. It is valid only if the EnableQualityFactor property is FALSE.

long

SamplePerSec

(read only) If the LEAD Vorbis Encoder input pin is connected, this property gets the input audio stream samples per second.

long

Channels

(read only) If the LEAD Vorbis Encoder input pin is connected, this property gets the input number of channels of the audio stream .

eVORBISMAXRATE

MaximumInputRate

Limits the Maximum Sample rate of the input stream coming to LEAD Vorbis Encoder. This way it can decrease the sampling rate of the input stream to increase compression.

So if this property is set to R_11K, then any input audio stream with rate of 11000 (sample/sec) or above will be compressed at 11000 sample/sec but if it is below that value (8000 sample/sec) it will stay like that.

eVORBISMAXCHANNELS

MaximumInputChannels

Use this property to force the input audio stream to have a maximum number of channels.

For example, if this property is set to C_I, no matter whether the input file is stereo or mono the input audio stream will be compressed as mono.

Basically this property should be used to increase the compression of a stereo file by converting it to mono.

VARIANT_BOOL

IsAVIMuxConnected

(read only) This property returns TRUE if the LEAD Vorbis Encoder output pin is connected to the AVI Mux filter.

enum
{
R_08K = 1,
R_11K = 2,
R_22K = 3,
R_32K = 4,
R_44K = 5,
R_48K = 6

} eVORBISMAXRATE;

enum
{
C_1 = 1,
C_2 = 2,
}eVORBISMAXCHANNELS;


LEAD AAC Encoder

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A module that combines audio and video into one file.

Available in LEADTOOLS Multimedia toolkits.

LEAD AAC Encoder

The LEAD AAC Encoder is a DirectShow Ò filter for compressing audio data using the AAC compression standard (ISO/IEC 13818-7). The AAC standard delivers high quality audio at lower bitrate compared to other audio encoding standards like ISO/MPEG Audio Layer-3; MP3.

This encoder offers both variable bitrate and constant bitrate. However, due to a limitation in the AVI multiplexer, the encoder offers constant bit rate only if it is connected to the AVI multiplexer.

Technical details for the filter are provided in the following table:

Filter Interfaces | ILMAACEncoder, ILMMCommon
Interface ID | IID_ILMAACEncoder
Input Media Types | Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_PCM
Output Media Types | Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_LAAC (LEAD proprietary). MEDIASUBTYPE_mp4a MEDIASUBTYPE_AAC (format tag = 0xFF)
Filter CLSID | CLSID_LMAACEncoder
Property Page CLSID | CLSID_LMAACEncoderPropertyPage
Executable | LEncAAC.dll, DSKernel2.dll
Filter category | CLSID_AudioCompressorCategory
Header | ILEncAAC.h

Note: Media types are defined in the LGUIDs.h header file.

Platforms

Win32, x64

LEAD AAC Encoder User Interface

This filter is included as part of the following modules:

LEAD H.264 Video Encoder Module

LEAD MPEG-4 Video Encoder Module


LEAD AAC Encoder User Interface

The LEAD AAC Encoder implements Advanced Audio Coding (AAC), a new high quality compression standard used with MPEG4 or H264 ISO MP4 files. AAC is also the audio format that is used by iPod and PSP.

Key features of the LEAD AAC Encoder:

  • Supports both variable and constant bitrates.

  • Supports selection of output channels.

  • Supports surround sound.

  • Supports both versions of AAC, MPEG4 and MPEG2.

  • Supports different profiles: Low Complexity, Main and Long Term Prediction.

  • Supports 2 stream formats: Raw and ADTS.

  • Supports selection of output sample frequency.

  • Includes cutoff frequency option.

  • Includes a force stereo output option in the decoder .

Options for the LEAD AAC Encoder can be set manually through the encoder property page, which is shown in the figure below:

Changes will be applied only when the filter's state is stopped with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control.

The following table shows the controls and their descriptions:

Control

Description

The Format group

Stream format drop-down list box

The format of the output stream. Selecting “Raw” will cause the “MPEG Version” drop-down list box contents to be restricted to “MPEG4” only.

MPEG version drop-down list box

The AAC audio MPEG version. If MPEG2 is selected, only LC and MAIN object types will be listed in the “Object type” drop-down list box.

Object type drop-down list box

The AAC profile used. LC stands for Low Complexity; this option requires lower CPU and Memory resources. The MAIN profile offers more efficiency on the expense of more resources.

The Long Term Prediction profile, LTP, is suitable for speech and signals with clear pitch property. The LTP option can be used with MPEG4 AAC only; “MPEG4” must be selected in the “MPEG4 Version” drop-down list box.

Block type drop-down list box

The allowed block type; data window length. The long block is usually 1024 samples, while the short block is usually 128 samples. “Normal” means both blocks are allowed.

The Channels / Sample Rate group

Input channels text box

Shows the number of input audio channels. If the input pin is not connected, the box will contain the text “Unknown”.

Output channels drop-down list box

The number of output channels. You can select between, mono, stereo, 6 channels, or you can leave the output channels the same as the input channels. If “6 channels” is selected, the “Simulate surround” check box will be enabled.

Simulate surround check box

Enables\disables surround feature simulation. It will simulate surround sound on 5.1 systems from a stereo or mono source.

This check box will be enabled only if the “Output channels” drop-down list box has “6 channels” selected.

Output sample rate drop-down list box

The desired output sample rate (samples per second).

The Output Bitrate / Quality group

Average Bitrate (radio button and drop-down list box)

You can select between “Average BitRate” and “Constant Quality”. If the “Average BitRate” radio button is selected, the “Bitrate” drop-down list box next to it will be enabled and you can select one of the predefined bitrates.

Constant Quality (radio button and spin)

You can select between “Average BitRate” and “Constant Quality”. If the “Constant Quality” radio button is selected, the “QFactor” spin next to it will be enabled and you can select the desired quality factor.

Cutoff frequency (check box and drop-down list box)

The “Use Cutoff Frequency” check box enables or disables the usage of cutoff frequency. If the box is selected, the “Cutoff Frequency” combo box next to it will be enabled and you can select one of the predefined frequencies.

Timestamps handling

Ignore Discontinuity check box

If selected, this option will cause the encoder to ignore discontinuities in the timestamps (time gaps) of the incoming audio samples. Sometimes this is needed to work around audio source timing problems.

Ignore Overlapping check box

If selected, this option will cause the encoder to ignore overlapping in the timestamps of the incoming audio samples. Sometimes this is needed to work around audio source timing problems.


LEAD AAC Transcoder

Transcoder: A file format convertion process that is executed by data re-packetizing. Transcoding avoids decoding and re-compression thus providing speed gains over decoding-encoding methods used in traditional filters. Additionally, LEADTOOLS transcoders preserve data quality by avoiding re-compression of already compressed data.

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD AAC Transcoder

The LEAD AAC Transcoder is a DirectShow filter. It is used to transcode AAC audio stream in mpeg2 format to ACC in ISO (mpeg4) format. Note that this conversion is only possible in one direction from MPEG2 format to ISO format. This filter changes AAC packets format without performing re-compression of the audio stream or the data packets. Converting with this filter is fast while the quality of the original stream is preserved. To convert an AAC stream, inside an MPEG2 transport file to ISO format without re-compression, LEAD AAC Transcoder filter should be inserted between mpeg2 demux and ISO multiplexer. LEAD Multimedia toolkit automatically inserts the filter in this manner.

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_AAC
Output Media Types | Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_mp4a
Filter CLSID | CLSID_LMAACTranscoder
Filter category | CLSID_AudioCompressorCategory
Executable | LTranscoderAAC.dll, DSKernel2.dll

Platforms

Win32, x64

To illustrate the advantage of using transcoders, two setups are provided below for comparison. Observe (Figure 1) how the transcoders are positioned between LEAD MPEG Transport Demultiplexer and LEAD ISO Multiplexer. Now observe the next image (Figure 2) and how in between the same LEAD MPEG2 Transport Demultiplexer and LEAD ISO Multiplexer there is a need to use encoders and decoders. As a result of using decoding-encoding filters, the processing of data is slower than the speeds attained with data re-packetizing - a key feature of transcoders.

Figure 1. Re-packetizing of data using transcoders.

Figure 2. Decoding and encoding of data using filters.


ILMAACEncoder Interface

ILMAACEncoder Interface

This is the interface for the LEAD AAC Encoder.

Interface Properties:

Type

Name

Description

long

OutputBitrate

The output bitrate, in kbps, of the compressed audio data. Bitrate denotes the average number of bits that one second of audio data will take up in the compressed bitstream. The output quality is related to the selected bitrate; the higher the bitrate, the better the quality.

Supported bitrates are: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, and 640 kbps.

eOutputChannels

OutputChannels

The number of output channels. Possible values are (members of the eOutputChannels enumeration):

LAAC_OC_UNCHANGED: [0x00] Same as input.
LAAC_OC_MONO: [0x01] One channel; mono.
LAAC_OC_STEREO: [0x02] Two channels; stereo.
LAAC_OC_6CHANNELS: [0x03] Six channels; 5.1.

VARIANT_BOOL

SimulateSurround

Enables or disables surround feature simulation. Possible values are:

VARIANT_TRUE: Enables surround feature simulation.
VARIANT_FALSE: Disables surround feature simulation.

This property has effect only if the OutputChannels property was set to LAAC_OC_6CHANNELS.

eMPEGVersion

MPEGVersion

The AAC audio MPEG version. Possible values are (members of the eMPEGVersion enumeration):

LAAC_MPEGVersion_MPEG4: [0] MPEG-4 AAC.
LAAC_MPEGVersion_MPEG2: [1] MPEG-2 AAC. With this version, only LC and MAIN profiles (object types) are allowed.

eBlockType

BlockType

The allowed block type; data window length.

Possible values are (members of the eBlockType enumeration):

LAAC_BlockType_NORMAL: [0] Both long and short blocks are allowed.
LAAC_BlockType_NOSHORT: [1] Only long blocks allowed. A long block is usually 1024 samples.
LAAC_BlockType_NOLONG: [2] Only short blocks allowed. A short block is usually 128 samples.

eObjectType

ObjectType

The AAC profile used. Possible values are (members of the eObjectType enumeration):

LAAC_ObjectType_LC: [0] Low complexity profile. Requires lower CPU and Memory resources.
LAAC_ObjectType_MAIN: [1] Main profile. Greater coding efficiency on the expense of complexity (more resources).
LAAC_ObjectType_LTP: [2] Long Term Prediction profile. Most suitable for speech and signals with clear pitch property. This profile can be used with MPEG4 AAC only; the MPEG4Version property must be LAAC_MPEGVersion_MPEG4.

long

QFactor

The quality factor used in compressing the audio stream; the higher the quality factor, the better the quality. Possible values range from 10 (worst) to 500 (best).

eRateControl

RateControl

The method used to control the output bitrate. Possible values are (members of the eRateControl enumeration):

LAAC_RC_CONST_QUALITY: [0] Constant quality, or variable bitrate. The output bitrate depends on the used quality factor and the nature of the input signal. If the encoder is connected to the AVI multiplexer, this option is disabled and the encoder will revert to the constant bitrate (LAAC_RC_CONST_BITRATE).

LAAC_RC_CONST_BITRATE: [1] Average bitrate. The output bitrate is defined by the OutputBitrate property.

long

Cutoff

The cutoff frequency, the frequency beyond which the audio signal is attenuated, in Hz. Possible values range from 3000 to 24000 Hz, and the value must be a multiple of 1000.

VARIANT_BOOL

UseCutoff

Determines whether the cutoff frequency specified by the Cutoff property will be used. Possible values are:

VARIANT_TRUE: The cutoff frequency specified by the Cutoff property is used.
VARIANT_FALSE: No cutoff frequency is used. The Cutoff property has no effect.

eStreamFormat

StreamFormat

The format of the output stream. Possible values are (members of the eStreamFormat enumeration):

LAAC_STREAMFORMAT_RAW: The encoder will output raw compressed data; raw data blocks. Only one header at the beginning of the stream is output. Using this value, the MPEGVersion property is restricted to LAAC_MPEGVersion_MPEG4.

LAAC_STREAMFORMAT_ADTS: The encoder output format is Audio Data Transport Stream, where each frame has its own header.

long

OutputSampleRate

The output sample rate, in samples per second.

Possible values range between 8000 and 96000 samples per second (Hz).

Note: Changing the sample rate causes a change in the quality resulting from audio data resampling.

VARIANT_BOOL

IgnoreTimeDiscontinuity

If set to VARIANT_TRUE, this property will cause the encoder to ignore discontinuities in the timestamps (time gaps) of the incoming audio samples. Sometimes this is needed to work around audio source timing problems. This property is not active (VARIANT_FALSE) by default.

VARIANT_BOOL

IgnoreTimeOverlapping

If set to VARIANT_TRUE, this property will cause the encoder to ignore overlapping in the timestamps of the incoming audio samples. Sometimes this is needed to work around audio source timing problems. This property is not active (VARIANT_FALSE) by default.


LEAD AAC Decoder

A multimedia framework and API produced by Microsoft for software developers to perform various operations with media files. Most Windows video-related applications on Windows, such as Microsoft's Windows Media Player, use DirectShow to manage multimedia content.

Available in LEADTOOLS Multimedia toolkits.

LEAD AAC Decoder

The LEAD AAC Decoder is a DirectShowÒ filter for decompressing audio data using the AAC compression standard (ISO/IEC 13818-7).

Technical details for the filter are provided in the following table:

Filter Interfaces

ILMAACDecoder , ILMMCommon

Interface ID

IID_ILMAACDecoder

Input Media Types

Type:
MEDIATYPE_Audio
Subtypes:
MEDIASUBTYPE_LAAC (LEAD proprietary, only LEAD AAC Decoder can handle this type).
MEDIASUBTYPE_mp4a
MEDIASUBTYPE_AAC (format tag = 0xFF)

Output Media Types

Type:
MEDIATYPE_Audio
Subtype:
MEDIASUBTYPE_PCM

Filter CLSID

CLSID_LMAACDecoder

Property Page CLSID

CLSID_LMAACDecoderPropertyPage

Executable

LDecAAC.dll, DSKernel2.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

ILDecAAC.h

Note: Media types are defined in the LGUIDs.h header file.

Platforms

Win32, x64

LEAD AAC Decoder User Interface

This filter is included as part of the following modules:

LEAD H.264 Video Decoder Module

LEAD MPEG-4 Video Decoder Module


LEAD AAC Decoder User Interface

The LEAD AAC Decoder property page provides a user interface for changing the filter's attributes.

Changes will be applied only when filters state is stopped with the ability to set them permanently by clicking Apply or OK, or abandoning them by clicking Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in the following figure:

The following table shows the controls and their descriptions:

Control | Description
Input and Output Channels text boxes | Displays the number of input and output audio channels. If the pin is not connected, the box will contain the text Unknown.
Force stereo output check box | If selected, forces the number of output channels to 2.

LEAD AAC Decoder

ILMAACDecoder Interface


ILMAACDecoder Interface

ILMAACDecoder Interface

This is the interface for the LEAD AAC Decoder.

Interface Properties:

Type | Name | Description
VARIANT_BOOL | ForceStereoOutput | Enables or disables the stereo output (2 channels) to be active. Possible values are: VARIANT_TRUE: Enables the stereo output (2 channels) to be active. VARIANT_FALSE: Disables the stereo output (2 channels) to be active.


LEAD AC3 Encoder

LEAD AC3 Encoder

The LEAD AC3 Audio Encoder Filter is a DirectShow filter for compressing audio data using the AC3 compression standard (A/52 - Digital Audio Compression Standard (AC-3)). AC3 is the sound format for digital television (DTV), digital versatile discs (DVDs), high definition television (HDTV), and digital cable and satellite transmissions. AC3 is a 5.1 format, which means that it provides five full-bandwidth channels, front left, front right, center, surround left, and surround right. A low-frequency effect (LFE) channel is included for the sound needed for special effects and action sequences in movies. AC3 also has a downmixing feature that ensures compatibility with devices that do not support the 5.1 format.

Key features of the LEAD AC3 Audio Encoder:

  • Can create Dolby Digital with 6-channel surround sound.

  • Can create DVDs with Dolby surround.

  • Convert a 2-channel input into a 6-channel output or encode 6-channels as is.

You can use the encoder with your existing converter or DVD creator application, if it allows you to select the audio encoder. The AC3 encoder supports unchanged audio input, Force Mono, Force Stereo or Force 6 Channels. This audio encoder is needed in order to create DVDs that have 5.1-channel surround sound.

The compression option for the LEAD AC3 encoder can be set manually through the encoder property page. The compression option can also be set programmatically using the ILMAC3Encoderinterface.

Technical details for the filter are provided in the following table:

Filter Interfaces | ILMAC3Encoder , ILMMCommon
Interface ID | IID_ILMAC3Encoder
Input Media Types | Type: MEDIATYPE_Audio Subtypes: MEDIASUBTYPE_WAVE MEDIASUBTYPE_PCM
Output Media Types | Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_DOLBY_AC3
Filter CLSID | CLSID_LMAC3Encoder
Property Page CLSID | CLSID_LMAC3EncoderPropertyPage
Executable | LEncAC3.dll, DSKernel2.dll
Filter category | CLSID_AudioCompressorCategory
Header | ILEncAC3.h

Platforms

Win32, x64

LEAD AC3 Encoder User Interface

This filter is included as part of the following modules:

LEADTOOLS DVD Module for API

LEADTOOLS DVD Module for COM

LEAD MPEG-2 Video Encoder Module

LEAD M{EG-2 Video Codec Module


The LEAD AC3 Audio Codec is a DirectShow filter that supports the encoding of audio streams using the AC3 standard. The LEAD AC3 encoder provides options to control the quality and the number of output channels. AC3 is a 5.1 format, which means that it provides five full bandwidth channels: front left, front right, center, surround left, and surround right. A low-frequency effect (LFE) channels is included for the sound needed for special effects and action sequences in movies. AC3 also has a downmixing feature that ensures compatibility with devices that do not support the 5.1 format.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Available in LEADTOOLS Multimedia toolkits.

LEAD AC3 Encoder User Interface

The LEAD AC3 Audio Encoder Filter is a DirectShow Ò filter for compressing audio data using the AC3 compression standard (A/52 - Digital Audio Compression Standard (AC-3)). AC3 is the sound format for digital television (DTV), digital versatile discs (DVDs), high definition television (HDTV), and digital cable and satellite transmissions. AC3 is a 5.1 format, which means that it provides five full-bandwidth channels, front left, front right, center, surround left, and surround right. A low-frequency effect (LFE) channel is included for the sound needed for special effects and action sequences in movies. AC3 also has a down-mixing feature that ensures compatibility with devices that do not support the 5.1 format.

Key features of the LEAD AC3 Audio Encoder:

  • Can create Dolby Digital with 6-channel surround sound.

  • Can create DVDs with Dolby surround.

  • Can convert a 2-channel input into a 6-channel output or encode 6-channels as is.

You can use the encoder with your existing converter or DVD creator application, if it allows you to select the audio encoder. The AC3 encoder supports unchanged audio input, Force Mono, Force Stereo or Force 6 Channels. This audio encoder is needed in order to create DVDs that have 5.1-channel surround sound.

Options for the LEAD AC3 Audio Encoder can be set manually through the encoder property page, which is shown in the figure below:

Changes will be applied only when the filter's state is stopped with the ability to set them permanently by selecting Apply or OK, or to abandon changes by selecting Cancel. Positioning the mouse pointer over a control displays general information for that control.

The following table shows the controls and their descriptions:

Control

Description

Input channels – static text

Shows the number of input channels.

Output channels – static text

Shows the number of output channels.

Output Bit Rate - list box

Specifies the output bitrate of the compressed audio data. Bitrate denotes the average number of bits that one second of audio data will take up in your compressed bitstream. The unit is in kbps. To calculate the number of bytes per second of audio data, divide the bitrate value by eight. Bitrate represents the strength of compression. Also the bitrate has influence on quality. The higher the bitrate, the higher the quality.

The valid bitrate values are: {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 , 384, 448, 512, 576, 640}.

Output channels - list box

Specifies the number of the output channels of the compressed data. If this flag is set to “Unchanged”, the number of the output channels equals the number of input channels. Otherwise, the number of output channels will be forced to be as specified in this flag.

Simulate surround – check box

Enables\disables surround feature simulation. It will simulate surround sound on 5.1 system from a stereo or mono source.

This feature is enabled only if the output channels flag is “Forced 6 channels”.


ILMAC3Encoder Interface

ILMAC3Encoder Interface

This is the interface for the LEAD AC3 Encoder.

Interface Properties:

Type

Name

Description

long

OutputBitrate

Sets the output bitrate of the compressed audio data.Bitrate denotes the average number of bits that one second of audio data will take up in your compressed bitstream. The unit is in kbps. To calculate the number of bytes per second of audio data, divide the bitrate value by eight. Bitraterepresents the strength of compression. Also the bitrate has influence on quality. The higher the bitrate, the higher the quality.

The valid bitrate values are: {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640}.

long

OutputChannelsFlag

A flag specifies the number of output channels. Possible values are:

LENCAC3_UNCHAGED: [0x00] The number of output channels equals the number of input channels.
LENCAC3_FORCE_MONO: [0x01] The number of output channel is 1.
LENCAC3_FORCE_STEREO: [0x02] The number of output channels is 2.
LENCAC3_FORCE_6CHANNELS: [0x06] The number of output channels is 6.

BOOL

SimulateSurround

Enables or disables surround feature simulation. Possible values are:

TRUE: Enables surround feature simulation.

FALSE: Disables surround feature simulation.

This property works only if LENCAC3_FORCE_6CHANNELS flag is selected.


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Available in LEADTOOLS Multimedia toolkits.

LEAD AMR Encoder

The LEAD AMR Encoder is a DirectShow Ò filter for compressing audio data using the AMR speech compression. The AMR speech coder consists of the multi-rate speech coder, a source controlled rate scheme including a voice activity detector and a comfort noise generation system, and an error concealment mechanism to combat the effects of transmission errors and lost packets.

The multi-rate speech coder is a single integrated speech codec with eight source rates from 4.75 kbps to 12.2 kbps, and a low rate background noise encoding mode. The speech coder is capable of switching its bit-rate every 20 ms speech frame upon command.

Technical details for the filter are provided in the following table:

Filter Interfaces

ILMAMREncoder , ILMMCommon

Interface ID

IID_ILMAMREncoder

Input Media Types

Type:
MEDIATYPE_Audio
Subtypes:
MEDIASUBTYPE_PCM

Output Media Types

Type:
MEDIATYPE_Audio
Subtype:
MEDIASUBTYPE_LAVIAMR (LEAD proprietary).MEDIASUBTYPE_SAMR

Filter CLSID

CLSID_LMAMREncoder

Property Page CLSID

CLSID_LMAMREncoderPropertyPage

Executable

LEncAMR.dll, DSKernel2.dll

Filter category

CLSID_AudioCompressorCategory

Header

ILEncAMR.h

Note: Media types are defined in the LGUIDs.h header file.

Platforms

Win32, x64

LEAD AMR Encoder User Interface


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Available in LEADTOOLS Multimedia toolkits.

LEAD AMR Encoder User Interface

The LEAD AMR Encoder is a DirectShow Ò filter for compressing audio data using the AMR speech compression. The AMR speech coder consists of the multi-rate speech coder, a source controlled rate scheme including a voice activity detector and a comfort noise generation system, and an error concealment mechanism to combat the effects of transmission errors and lost packets.

The multi-rate speech coder is a single integrated speech codec with eight source rates from 4.75 kbps to 12.2 kbps, and a low rate background noise encoding mode. The speech coder is capable of switching its bit-rate every 20 ms speech frame upon command.

The LEAD AMR Encoder property page provides a user interface for changing the filter's attributes. The property page is shown in the following figure:

Changes will be applied directly to the streaming media with the ability to set them permanently by clicking Apply or OK, or to abandon changes by clicking Cancel. Positioning the mouse pointer over a control displays general information for that control. The following table shows the controls and their descriptions:

Control | Description
Bit Rate Drop-down list box | The desired output bit rate (kbps). Possible values are:
 | 4.75
 | 5.15
 | 5.90
 | 6.70
 | 7.40
 | 7.95
 | 10.20
 | 12.20


ILMAMREncoder Interface

This is the interface for the LEAD AMR Encoder.

Interface Properties:

Type | Name | Description
eBitRate | BitRate | Gets or sets the bit rate value for the output compressed stream. Possible values are (members of eBitRate): AMR_BITRATE_475: [0] The requested output bit rate is 4.75 kbps. AMR_BITRATE_515: [1] The requested output bit rate is 5.15 kbps. AMR_BITRATE_59: [2] The requested output bit rate is 5.9 kbps. AMR_BITRATE_67: [3] The requested output bit rate is 6.7 kbps. AMR_BITRATE_74: [4] The requested output bit rate is 7.4 kbps. AMR_BITRATE_795: [5] The requested output bit rate is 7.95 kbps. AMR_BITRATE_102: [6] The requested output bit rate is 10.2 kbps. AMR_BITRATE_122: [7] The requested output bit rate is 12.2 kbps.


LEAD AMR Decoder

The LEAD AMR Decoder is a DirectShow Ò filter for decompressing audio data. For more information on the AMR speech compression algorithm, refer to LEAD AMR Encoder.

Technical details for the filter are provided in the following table:

Filter Interfaces | N/A
Interface ID | N/A
Input Media Types | Type: MEDIATYPE_Audio Subtypes: Subtypes:MEDIASUBTYPE_LAVIAMR (LEAD proprietary, only LEAD AMR Decoder can handle this type)MEDIASUBTYPE_SAMRMEDIASUBTYPE_LISOSAMR MEDIASUBTYPE_AMRCBR (format tag = 0x7A21) MEDIASUBTYPE_AMRVBR (format tag = 0x7A22) MEDIASUBTYPE_AMRExtra1
Output Media Types | Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_PCM
Filter CLSID | CLSID_LMAMRDecoder
Property Page CLSID | N/A
Executable | LDecAMR.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | N/A

Note: Media types and CLSIDs are defined in the LGUIDs.h header file.

Platforms

Win32, x64


LEAD MPEG Audio Decoder

The LEAD MPEG Audio Decoder is a DirectShowÒ filter for decompressing audio data using the

MPEG-1 Layer 2 audio compression standard (ISO/IEC 11172-3).

Technical details for the filter are provided in the following table:

Filter Interfaces

ILMMpgAudDecoder, ILMMCommon

Interface ID

IID_ILMMpgAudDecoder

Input Media Types

Type:

MEDIATYPE_Audio

Subtypes:

MEDIASUBTYPE_MPEG2_AUDIO

MEDIASUBTYPE_MPEG1AudioPayload

Type:

MEDIATYPE_DVD_ENCRYPTED_PACK

Subtypes:

MEDIASUBTYPE_MPEG2_AUDIO

Output Media Types

Type:

MEDIATYPE_Audio

Subtype:

MEDIASUBTYPE_PCM

Filter CLSID

CLSID_LMMpgAudDecoder

Property Page CLSID

CLSID_LMMpgAudDecoderPropertyPage

Executable

ldecmpga.dll, DSKernel2.dll

Filter category

CLSID_LegacyAmFilterCategory

Header

ILMpgAudDec.h

Note: Media types are defined in the LGUIDs.h header file.

LEAD MPEG Audio User Interface


LEAD MPEG Audio Decoder User Interface

The LEAD MPEG Audio Decoder property page provides a user interface for changing the filter's attributes.

Changes will be applied only when filters state is stopped with the ability to set them permanently by clicking Apply or OK, or abandoning them by clicking Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in figure 1.

Figure 1. LEAD MPEG Audio Decoder Properties

The following table shows the controls and their descriptions:

Control | Description
Input and Output Channels text boxes | Displays the number of input and output audio channels. If the pin is not connected, the box will contain the text Unknown.
Force stereo output check box | If selected, forces the number of output channels to 2.


ILMMpgAudDecoder Interface

This is the interface for the LEAD MPEG Audio Decoder.

Interface Properties:

Type | Name | Description
VARIANT_BOOL | ForceStereoOutput | Enables or disables the stereo output (2 channels) to be active. Possible values are: VARIANT_TRUE: Enables the stereo output (2 channels) to be active. VARIANT_FALSE: Disables the stereo output (2 channels) to be active.

Interface Methods:

HRESULT ResetToDefaults ()

Description

Resets the filter properties to their default values. Calling this method might cause the filter to reconnect its output pin.

properties default values are:

ForceStereoOutput = FALSE

Return

S_OK Success

VFW_E_WRONG_STATE The filter is in the wrong state.


LEAD MPEG2 Transport UDP Sink

LEAD MPEG2 Transport UDP Sink

The LEAD MPEG2 Transport UDP Sink is a DirectShow Ò filter for streaming data from a UDP or TCP port. The data is usually in an MPEG-2 Transport format, as defined in ISO/IEC 13818-1.

This filter supports the standard IFileSinkFilter interface. Use the IFileSinkFilter::SetFileName method to let the LEAD MPEG2 Transport UDP Sink filter know where to send the data to (UDP streaming) or which port to listen to (TCP streaming). Please see the Microsoft documentation for this interface for more information.

Technical details for the filter are provided in the following table:

Filter Interfaces | IFileSinkFilter
Interface ID | IID_IFileSinkFilter
Input Media Types | Type: MEDIATYPE_Stream Subtype: MEDIATYPE_MPEG2_TRANSPORT Or the media type passed to IFileSinkFilter::SetFileName
Output Media Types | N/A
Filter CLSID | CLSID_LMUDPSnk
Property Page CLSID | N/A
Executable | LMUDPSnk.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | ILMUDPSnk.h

Platforms

Win32, x64

See Also:

How to Get Your Own IP Address Programmatically


IFileSinkFilter

IFileSinkFilter Interface

Interface Methods:

HRESULT GetCurFile(LPOLESTR *ppszFileName, AM_MEDIA_TYPE *pmt);

Parameters

ppszFileName | A valid pointer to a pointer that will receive a copy of the URL string. This cannot be NULL.
pmt | A pointer to an AM_MEDIA_TYPE structure. This pointer is optional and you can pass NULL if you do not need the media type.

Description

Gets the current URL string. This string contains the IP address, the port and (optional) the network card address. See the SetFileName method for more information on the format of the URL string.

If the function succeeds, the ppszFileName pointer will be updated with a pointer to a buffer containing the URL. This buffer has been allocated with CoTaskMemAlloc. You are responsible for freeing this buffer when you are done with it by calling CoTaskMemFree.

If the function succeeds and you set pmt to a valid pointer to AM_MEDIA_TYPE structure, this structure will be initialized with a copy of the stream media type. You are responsible for freeing the data allocated in this structure by calling the FreeMediaType function. Please refer to the Microsoft documentation for more information on this function.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | ppszFilename is NULL

HRESULT SetFileName(LPCOLESTR pszFileName, const AM_MEDIA_TYPE *pmt);

Parameters

pszFileName | A valid pointer to a buffer containing the URL of the stream. This cannot be NULL.
pmt | A pointer to an AM_MEDIA_TYPE structure indicating the media type of the data being streamed. This pointer can be NULL, in which case a default media type will be assumed.

Description

This function sets the URL of UDP or TCP stream. This string specifies the:

1. IP address of the server sending the data

2. (Optional) The UDP or TCP port on which the data will be received. If no port is specified, 9005 will be used.

3. (Optional) The IP address of network card receiving the data. If no network card is specified, the default network connection will be used. This can be used only with multicast UDP streaming.

The format of the string for UDP streaming is as follows:

udp://ip_address[:udp_port][/network_card]

ip_address

The IP address where the data should be sent to. This can be in the usual Ipv4 format (xx.xx.xx.xx) or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1

The stream is considered to be multicast if the first number in the Ipv4 address is between 224..239 (0xE0 .. 0xEF). If the first number is not in this range, the stream is unicast.

The stream is considered to be broadcast if the last number is 255. For example, streaming to 10.1.1.255 will send to all the computers whose IP address starts with 10.1.1

network_card

(Optional) The address of the network card receiving the data. This is optional – if it is missing, the default network card will be used. This is used only for multicast streams.

udp_port

(Optional) The port on which to send data to. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software. If you do not specify a port number, 9005 will be used.

The format of the string for TCP streaming is as follows:

ip_address | The IP address of on which to listen for connections and send the data. This can be in the usual Ipv4 format (xx.xx.xx.xx) or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer. TCP streams cannot be multicast or broadcast. All TCP streams are assumed to be unicast.
tcp_port | (Optional) The port on which to listen. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software. If you do not specify a port number, 9005 will be used.

Examples of valid strings:

udp://127.0.0.1:9005 – send the Unicast UDP stream to 127.0.0.1 (local computer) on port 9005

udp://224.1.1.1:9005/20.5.1.200 - send the Multicast UDP stream 224.1.1.1 on port 9005 using the network card with the IP address of 20.5.1.200

udp://10.1.1.255:9005 - send the Broadcast UDP stream on port 9005 to all computers with an IP address of 10.1.1.x

tcp://127.0.0.1:9005 – send the TCP stream from 127.0.0.1 (local computer) on port 9005

Note that you can find out the IP addresses of the network connections on your computer on Windows XP by typing the ipconfig command at the DOS prompt. For more information on obtaining your machine's host name, refer to How to Get Your Own IP Address Programmatically.

One might want to use a particular network card if you have two network connections and one is faster than the other. For example, a laptop might be connected to the network with a wireless network card and a regular network wire. In this case, it would be better to using the wired connection because it is faster and more reliable.

You should keep in mind that not all the routers will forward multicast and broadcast UDP packets. In most cases, UDP packets will not be sent out of the current network. This makes UDP unsuitable for streaming over the Internet. For streaming over the Internet, use TCP streaming.

The packets of data in TCP streaming are guaranteed to reach the remote destination and are resent if packets are lost. This means TCP streaming requires higher bandwidth than UDP streaming. Also, a bottleneck in the network traffic could impact the server performance. You should weigh the advantages and disadvantages of UDP vs TCP when you pick which type of streaming you should use.

In TCP streaming mode, the server will disconnect a remote client if it has not read any data in a certain amount of time.

Only one connection at a time is supported for TCP streaming.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_OUTOFMEMORY | (0x8007000E) Out of memory
E_FAIL | (0x80004005) Unspecified error
HRESULT_FROM_WIN32(xxx) | Windows error xxx has occurred. You can consult the Microsoft documentation for the definition of the HRESULT_FROM_WIN32 macro and the complete list of Windows error codes.


LEAD MPEG2 Transport UDP Source

LEAD MPEG2 Transport UDP Source

The LEAD MPEG2 Transport UDP Source is a DirectShowÒ filter for streaming data from a UDP or TCP port. The data is usually in an MPEG-2 Transport format, as defined in ISO/IEC 13818-1. The filter is also capable of receiving MPEG-2 Transport data packetized with RTP packets conforming to RFC 1889 and RFC 1890.

This filter supports the standard IFileSourceFilter interface. Use the IFileSourceFilter::Load method to let the LEAD MPEG2 Transport Source filter know where to read the data from. Please see the Microsoft documentation for this interface for more information.

Technical details for the filter are provided in the following table:

Filter Interfaces | IFileSourceFilter
Interface ID | IID_IFileSourceFilter
Input Media Types | N/A
Output Media Types | Type: MEDIATYPE_Stream Subtype: MEDIASUBTYPE_UDPStream Or the media type passed to IFileSourceFilter::Load
Filter CLSID | CLSID_LMUDPSrc
Property Page CLSID | N/A
Executable | LMUDPSrc.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | ILMUDPSrc.h

Platforms

Win32, x64

See Also:

How to Get Your Own IP Address Programmatically


IFileSourceFilter Interface

IFileSourceFilter Interface

Interface Methods:

HRESULT GetCurfile(LPOLESTR *ppszFileName, AM_MEDIA_TYPE *pmt);

Parameters

ppszFileName | A valid pointer to a pointer that will receive a copy of the URL string. This cannot be NULL.
pmt | A pointer to an AM_MEDIA_TYPE structure. This pointer is optional and you can pass NULL if you do not need the media type.

Description

Gets the current URL string. This string contains the IP address, the port and the network card address. See the Load method for more information on the format of the URL string.

If the function succeeds, the ppszFileName pointer gets updated with a pointer to a buffer containing the URL. This buffer was allocated with CoTaskMemAlloc. You are responsible for freeing this buffer when you are done with it by calling CoTaskMemFree.

If the function succeeds and pmt is set to a valid pointer to AM_MEDIA_TYPE structure, this structure gets initialized with a copy of the stream media type. You are responsible for freeing the data allocated in this structure by calling the FreeMediaType function. Please refer to the Microsoft documentation for more information on this function.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
E_POINTER | ppszFilename is NULL

HRESULT Load(LPCOLESTR pszFileName, const AM_MEDIA_TYPE *pmt);

Parameters

pszFileName | A valid pointer to a buffer containing the URL of the UDP stream. This cannot be NULL.
pmt | A pointer to an AM_MEDIA_TYPE structure indicating the media type of the data being streamed. This pointer can be NULL, in which case a default media type will be assumed.

Description

This function sets the URL of UDP, TCP or RTSP stream. This string specifies the following three items:

  1. IP address of the server sending the data

  2. (Optional) The UDP, TCP or RTSP port on which the data will be received. If no port is specified, 9005 will be used for UDP/TCP and 554 for RTSP.

  3. (Optional) The IP address of network card receiving the data. If no network card is specified, the default network connection will be used.

The format of the string for UDP streaming is as follows:

udp://ip_address[:udp_port][/network_card][?param1=val1[&param2=val2]...[&paramN=valN]]

The format of the string for TCP streaming is as follows:

tcp://ip_address[:udp_port][/network_card][?param1=val1[&param2=val2]...[&paramN=valN]]

The format of the string for RTSP streaming is as follows:

rtsp://[username[:password]@]ip_address[:rtsp_port]/server_URL[?param1=val1[&param2=val2]...[&paramN=valN]]

The format of the string for UDP streaming is as follows:

ip_address

The IP address of the server sending the data. This can be in the usual Ipv4 format (xx.xx.xx.xx), or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1

The stream is considered to be multicast if the first number in the Ipv4 address is between 224..239 (0xE0 .. 0xEF). If the first number is not in this range, the stream is unicast.

network_card

(Optional) The address of the network card receiving the data. This is optional – if it is missing, the default network card will be used. This is used only for receiving multicast streams.

udp_port

(Optional) The port number on which to listen. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software.

paramN=valN

(Optional, valid only with udp prefix) Parameters used to describe the format of RTP streams containing dynamic payloads for certain raw samples. Right now, this is used only with raw H264 streams. See Note 1 below for the possible values of parameters and values. Multiple parameter pairs should be separated using the '&' character.

The format of the string for TCP streaming is as follows:

ip_address | The IP address of the server sending the data. This can be in the usual Ipv4 format (xx.xx.xx.xx), or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer. TCP streams cannot be multicast. All TCP streams are assumed to be unicast.
tcp_port | (Optional) The port number on which to listen. The port must be a number from 1 to 65535. Note that you must make sure the port is open if you are running firewall software.
paramN=valN | (Optional, valid only with udp prefix) Parameters used to describe the format of RTP streams containing dynamic payloads for certain raw samples. Right now, this is used only with raw H264 streams. See Note 1 below for the possible values of parameters and values. Multiple parameter pairs should be separated using the '&' character.

The format of the string for RTSP streaming is as follows:

ip_address | The IP address of the server sending the data. This can be in the usual Ipv4 format (xx.xx.xx.xx), or it can be a valid host address accepted by the standard function inet_addr. For example, localhost is equivalent to 127.0.0.1. This is usually the IP address of the sending (server) computer. RTSP streams cannot be multicast. All RTSP streams are assumed to be unicast.
rtsp_port | (Optional) The port number on which the server is listening for RTSP commands. The port must be a number from 1 to 65535. If absent, the default RTSP port (554) will be used.
username | (Optional) For servers that use authentication, you can pass a username as part of the connection string. Passing the username and password will avoid the message box asking for the username and password. If you pass the username and password but still get the message box, the server has rejected supplied username and/or password.
password | (Optional) For servers that use authentication, you can pass a username and password as part of the connection string. Passing the username and password will avoid the message box asking for the username and password. If you pass the username and password but still get the message box, the server has rejected supplied username and password.
server_URL | The URL of the server RTSP. Obtain this from the server documentation.
paramN=valN | (Optional) These parameters get passed to the RTSP server. These parameters are server-dependent and you should consult the server's documentation for more information. They are commonly used for influencing the server's behavior: you can change the video or audio compression, video size, etc. See the following examples.

Examples of valid strings:

udp://127.0.0.1:9005 - Receive the Unicast stream from 127.0.0.1 on port 9005

udp://224.1.1.1:9005/20.5.1.200 - Receive the Multicast stream 224.1.1.1 on port 9005 using the network card with the IP address of 20.5.1.200

tcp://127.0.0.1:9005 – Receive the TCP stream from 127.0.0.1 (local computer) on port 9005

udp://192.168.1.100:40000?rtpmap=99;H264/90000 - Receive a Unicast stream containing raw H264 video with sequence headers from 192.168.1.100 on port 40000. The stream uses dynamic RTP packets with payload type 99 and the timestamps unit is 1/90000 of a second.

udp://192.168.1.100:40000?rtpmap=99;H264/90000&fmtp=96;sprop-parameter-sets="Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA==" - Receive a Unicast stream containing raw H264 video without sequence headers from 192.168.1.100 on port 40000. The stream uses dynamic RTP packets with payload type 99 and the timestamps unit is 1/90000 of a second.

rtsp://192.168.0.164/axis-media/media.amp - Connect to a RTSP server running on 192.168.0.164 at the "axis-media/media.amp" URL. The data will be streamed using the default compression.

rtsp://root:pass@192.168.0.164/axis-media/media.amp?videocodec=jpeg - Connect to a RTSP server running on 192.168.0.164 at the "axis-media/media.amp" URL. The data will be streamed using the jpeg compression. This server is using authentication, and we are connecting as username 'root' and with the password 'pass' in order to avoid having to enter a username and password.

To determine the IP addresses of the network connections on your a computer running Windows XP, type the ipconfig command at the DOS prompt. For more information on obtaining your machine's host name, refer to How to Get Your Own IP Address Programmatically .

One might want to use a particular network card when the system has two network connections and one is faster than the other. For example, a laptop might be connected to the network with a wireless network card and a regular network wire. In this case, it would be better to use the wired connection because it is faster and more reliable.

Note 1: Parameters used to describe raw H264 video streams

H264 streams sent inside RTP packets use dynamic payloads with a payload type between 96 and 127. These streams can only be decoded when there is extra information being sent using a separate communication channel. The most common method of sending this extra information is through a Session Description Protocol (also known as SDP). The SDP contains extra information describing the stream. The UDP source needs only the following:

  • The payload number and the compression associated with it.

  • The number of RTP units per second.

  • The sequence header information (if it is not sent with the video stream).

The UDP source needs to know this information in order to process these streams. There are two useful parameters right now (rtpmap and fmtp) and their syntax is described as follows:

  • rtpmap=payload_type;compression/RTP_units_per_second

Parameter | Description
payload_type | The payload type. This value should be between 96 and 127.
compression | The string describing the compression. Right now, only H264 is supported.
RTP_units_per_second | The number of RTP units per second. This value is usually 90000.

These values are usually sent in the SDP information via the a=rtpmap line, as in the following example:

a=rtpmap:99 H264/90000

This should be translated by replacing the space with semicolon (';) into

rtpmap=99;H264/90000

So, the URL syntax for a H264 stream sent to port 40000 containing RTP packets with a payload of 99 and with sequence header packets (NAL units 7 and 8) sent inside the compressed stream is something like this:

udp://192.168.1.100:40000?rtpmap=99;H264/90000

  • fmtp=payload_type;sprop-parameter-sets="seq1,seq2,...,seqN"

Parameter

Description

payload_type

The payload type. This value should be between 96 and 127. It should match the value in the rtpmap parameter.

seqN

The base64 encoding of the sequence parameter. When there are several sequence headers, they are separated with a comma ( , ). Usually, there are two sequence headers. A double quote ( " ) should be added at the beginning and end of the sequence list.

Note that the three dots would not be passed in the string. They are there only to indicate there could be other sequence values between seq2 and seqN.

These values are usually sent in the SDP information via the a=fmtp line, as in the following example:

a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA==

In the above example, there are two sequence header strings following the sprop-parameter-sets, separated with a comma. The UDP source filter is interested only in the sprop-parameter-sets field, so this line should be translated into:

fmtp=96;sprop-parameter-sets="Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA=="

And this pair should be appended to the URL to form something like this:

udp://192.168.1.100:40000?rtpmap=99;H264/90000&fmtp=96;sprop-parameter-sets="Z0IAKeKQFge2BqwYBBuHiRFQ,aM48gA=="

The above URL syntax describes a stream streaming on port 40000, with H264 data inside RTP packets with payload type set to 99, with 90000 RTP units per second and whose sequence headers are not part of the stream. Instead, they are passed through the sprop-parameter-sets component of the fmtp parameter.

Returns

S_OK if successful, < 0 if an error occurred.

Common error codes:

Value | Meaning
HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND) | (0x80072AF9) The URL is invalid.
HRESULT_FROM_WIN32(WSAETIMEDOUT) | (0x8007274C) The URL might be valid, but the remote end is not sending data
E_OUTOFMEMORY | (0x8007000E) Out of memory
E_FAIL | (0x80004005) Unspecified error
HRESULT_FROM_WIN32(xxx) | A Windows error xxx has occurred. Consult the Microsoft documentation for the definition of the HRESULT_FROM_WIN32 macro and the complete list of Windows error codes.


LEAD MPEG2 Transport RTSP Source

LEAD MPEG2 Transport RTSP Source

The LEAD MPEG2 Transport RTSP Source is a DirectShowÒ filter for streaming data from a RTSP server. The data is usually streamed on a UDP port in an MPEG-2 Transport format, as defined in ISO/IEC 13818-1. The data can be packetized with RTP packets conforming to RFC 1889 and RFC 1890. Data can also be streamed in separate video and audio streams and is not limited to video compressions supported by the MPEG2 Transport wrapper.

Currently, the following formats are supported:

  • MPEG2 Transport (any video and audio compression supported by MPEG2 Transport)

  • H264 video contained in RTP packets

  • JPEG video contained in RTP packets

  • AAC audio contained in RTP packets

This filter supports the standard IFileSourceFilter interface. Use the IFileSourceFilter::Load method to let the LEAD MPEG2 Transport RTSP Source filter know where to read the data from. Please see the Microsoft documentation for this interface for more information.

Technical details for the filter are provided in the following table:

Filter Interfaces | IFileSourceFilter
Interface ID | IID_IFileSourceFilter
Input Media Types | N/A
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_H264 Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_jpeg Type: MEDIATYPE_Audio Subtype: MEDIASUBTYPE_mp4a
Filter CLSID | CLSID_LMRTSPSrc
Property Page CLSID | N/A
Executable | LMRTSPSrc.dll, DSKernel2.dll
Filter category | CLSID_LegacyAmFilterCategory
Header | ILMRTSPSrc.h

Platforms

Win32, x64

See Also:

How to Get Your Own IP Address Programmatically


LEAD MPEG2 Transport RTSP Source User Interface

LEAD MPEG2 Transport RTSP Source User Interface

The LEAD MPEG2 Transport RTSP Source filter opens the Login Required dialog when connecting to a server that requires a username and password in order to stream data.

This dialog box will not appear if the username and password are passed programmatically to IFileSourceFilter::Load. See the documentation for IFileSourceFilter::Load for more details.

The following figure shows the Login Required dialog box:

When this dialog appears, enter the username and password and click OK. The dialog continues to appear until a valid username and password are entered.

Click Cancel to abort this process. Clicking Cancel makes the connection fail.


Introduction to the LEADTOOLS DVD Module

The driver that writes the data (burns the data) to the DVD. It is the software that burns the DVD image to the physical media.DVD image to the physical media.

A set of files that contain all of the video and audio content for a DVD, organized with a table of contents (optional). See also: Title, Chapter, ISO Image.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data. COmpressor combined with a DECompressor, or encoder and a decoder , which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

Introduction to the LEADTOOLS DVD Module

The LEADTOOLS DVD Module enhances the LEADTOOLS Multimedia toolkit by adding functionality for programmatically creating, burning, and playing DVD images. The LEADTOOLS DVD Module has everything you need to create and burn DVD images, including DVD Imager interface, DVD burner , DVD writer, MPEG-2 and MPEG-1 multiplexers, MPEG Audio encode, LEAD MPEG-2 Standard video codec (Encoder /Decoder ), and several DirectShow filters to resize and crop videos, as well as filters to convert video color spaces. The LEADTOOLS DVD Module adds on to the LEADTOOLS Multimedia SDK and includes a fully enabled development license for the following components:

DVD Support (including support for DVD Title /Chapters and burning):

LEAD DVD Writer for API

LEAD DVD Burner for API

LEAD DVD Control for API

LEAD DVD Writer Filter for COM

LEAD DVD Burner Object for COM

LEAD DVD Control Object for COM

MPEG Multiplexers:

LEAD MPEG-1 Multiplexer (2.0)

LEAD MPEG-2 Multiplexer (2.0)

Codecs:

LEAD MPEG Audio Encoder (2.0)

MPEG-2 support:

LEAD MPEG-2 Decoder (2.0)

LEAD MPEG-2 Encoder (3.0)

DirectShow Filters:

LEAD Video Frame Rate Controller Filter (2.0)

LEAD Video Deinterlace Filter (2.0)

LEAD Video Resize Filter (2.0)

LEAD Video Crop Filter (2.0)

LEAD Video Rotation Filter (2.0)***

Obtaining release versions of the DVD Module Specialized Components

You need to unlock the LEADTOOLS DVD module to use the above filters in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.

You can develop and perform testing with the development only editions of the components, codecs and filters contained in this product. Development only editions of the codecs display either "LEAD Encoder" or "LEAD Decoder" in the video stream . Development only editions of the filters and components display a licensing dialog from time to time while the program is running. The development only editions do not expire but may not be used in a production environment under your license.

In order to deploy the DVD Module specialized components, you must sign the duplication and distribution license for the LEADTOOLS DVD Module and return it to LEAD. You will be provided with unlock instructions to the release versions of any of these filters or codecs which you wish to license when you have signed the appropriate duplication and distribution license. These release editions will not display a licensing dialog box or LEAD text on the video stream. If you have any questions concerning licensing the codecs/filters, you can contact LEAD licensing at licensing@leadtools.com .


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Introduction to the LEADTOOLS Video Streaming Module

The LEADTOOLS Video Streaming Module is perfect for developers who need to serve videos on demand, offering an unsurpassed multimedia experience while at the same time reducing bandwidth requirements. You can serve multimedia files using a standard IIS web server or using the Microsoft Media Server. The LEADTOOLS Video Streaming Module is designed to provide you with all the tools you need to provide streaming multimedia content via the web.

It is also possible to create custom video conferencing applications and utilities. The LEADTOOLS Video Streaming Module can be used to create Client Server applications such as:

Security Server / WebCast - Where a single server is sending to multiple clients

Video Conferencing - Where each computer participating in the conference is both a client and a server

Live Presentations over the Web - Where screen activity on a server is captured and sent to one or more clients

The LEADTOOLS Video Streaming Module adds onto the LEADTOOLS Multimedia API and COM SDK and includes a fully enabled development license for the following components:

Network filters and objects:

LEAD Network Protocol Manager **

LEAD Network Demultiplexer Filter for API **

LEAD Network Multiplexer Filter for API **

LEAD Network Sink Filter for API ** **

LEAD Network Source Filter for API ** **

LEAD Network Demultiplexer Filter for COM **

LEAD Network Multiplexer Filter for COM **

LEAD Network Sink Filter for COM **

LEAD Network Source Filter for COM ** **

Codecs:

H.264 support:

LEAD H264 Decoder

LEAD H264 Decoder (DMO)

LEAD H264 Encoder

LEAD H264 Encoder (DMO)

LEAD H264 Encoder Advanced (DMO)

MPEG-4 support:

LEAD MPEG-4 Decoder

LEAD MPEG-4 Encoder

MCMP/MJPEG support:

LEAD MCMP/MJPEG Codec

LEAD MCMP/MJPEG Decoder

H263 support:

LEAD H263 Encoder

LEAD H263 Decoder

Theora support:

LEAD Theora Encoder

LEAD Theora Decoder

AAC support:

LEAD AAC Encoder

LEAD AAC Decoder

AMR support:

LEAD AMR Encoder

LEAD AMR Decoder

Multiplexers and Demultiplexers:

LEAD FLV Demultiplexer

LEAD FLV Multiplexer

LEAD ISO Demultiplexer

LEAD ISO Multiplexer

Filters:

LEAD Video Frame Rate Controller Filter

LEAD Video Deinterlace Filter

LEAD Video Resize Filter

LEAD Video Crop Filter

LEAD Video Rotation Filter

Obtaining release versions of the Video Streaming Module Components

You can develop and perform testing with the development only editions of the components, codecs and filters contained in this product. In the case of the codecs, a LEAD Encoder or LEAD Decoder message text will be displayed in the video stream , and in the case of the filters and components, a licensing dialog will appear from time to time while the program is running. The development only editions do not expire but may not be used in a production environment under your license.

In order to deploy the Video Streaming Module specialized components, you must sign the duplication and distribution license agreement and return it to LEAD. You will be provided with unlock instructions to the release versions of any of these filters or codecs which you wish to license when you have signed the appropriate duplication and distribution license. These release editions will not display a licensing dialog box or LEAD text on the video stream. If you have any questions concerning licensing the codecs/filters, you can contact LEAD licensing at licensing@leadtools.com .

For answers to some commonly asked questions, refer to Video Streaming Module FAQs .


Introduction to the LEADTOOLS MPEG-2 Transport Module

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

MPEG-2 Transport Module

The LEADTOOLS MPEG-2 Transport Module enhances the LEADTOOLS Multimedia toolkit by adding functionality for playing and creating MPEG-2 Transport and MPEG-2 Program Files and Streams. These streams are used by satellite broadcast systems and by UAVs (Unmanned Aerial Vehicles). You can also stream data from a RTSP server.

For applications such as satellites and UAVs (Unmanned Aerial Vehicle), the LEADTOOLS MPEG-2 Transport Module supports the creation ( ILMKlvBuilder Interface) and parsing ( ILMKlvParser Interface) of any KLV data to create implementations of specifications such as:

UAV Datalink Local Metadata Set (EG 0601 12 Jan 2006)

Predator UAV Basic Universal Metadata Set (MISB EG 0104.4 25 August 2005)

Key Features:

  • Pause DVR

  • Rewind DVR

  • Fast-forward DVR

  • Pause Live UDP/TCP Stream

  • Rewind Live UDP/TCP Stream

  • Fast-forward Live UDP/TCP Stream

  • Play RTSP Stream

  • Pause RTSP Stream

The LEADTOOLS MPEG-2 Transport Stream Module adds on to the LEADTOOLS Multimedia SDK and includes a fully enabled development license for the following components:

  • MPEG Multiplexers and Demultiplexers:

  • LEAD MPEG-2 Transport Demultiplexer

  • LEAD MPEG-2 Transport Multiplexer

  • LEAD MPEG-2 Multiplexer

  • LEAD MPEG-2 Program Demultiplexer

  • DVR Filters:

  • LEAD DVR Sink Filter

  • LEAD DVR Source Filter

  • Codecs:

  • LEAD MPEG-2 Decoder (2.0)

  • LEAD MPEG-2 Encoder (3.0)

  • LEAD MPEG-4 Decoder (2.0)

  • LEAD MPEG-4 Encoder (2.0)

  • LEAD H264 Decoder (3.0)

  • LEAD MCMP/MJPEG Decoder (2.0)

  • LEAD MCMP/MJPEG Decoder (2.0)

  • LEAD MPEG Audio Encoder (2.0)

  • LEAD AAC Encoder

  • LEAD AAC Decoder

  • DirectShow Filters:

  • LEAD MPEG-2 Transport UDP Sink

  • LEAD MPEG-2 Transport UDP Source

  • LEAD MPEG-2 Transport RTSP Source

  • Video Post Processing Filters:

  • LEAD Video Frame Rate Controller Filter

  • LEAD Video Deinterlace Filter

  • LEAD Video Resize Filter

  • LEAD Video Crop Filter

  • LEAD Video Rotation Filter

Obtaining release versions of the MPEG-2 Transport Module Components

You need to unlock the LEADTOOLS MPEG-2 Transport module to use the above filters in RELEASE mode. For more information, refer to Evaluation Mechanism Overview

You can develop and perform testing with the development only editions of the components, codecs and filters contained in this product. Development only editions of the codecs display either "LEAD Encoder" or "LEAD Decoder" in the video stream. Development only editions of the filters and components display a licensing dialog from time to time while the program is running. The development only editions do not expire but may not be used in a production environment under your license.

In order to deploy the MPEG-2 Transport Module specialized components, you must sign the duplication and distribution license and return it to LEAD. You will be provided with unlock instructions to the release versions of any of these filters or codecs which you wish to license when you have signed the appropriate duplication and distribution license. These release editions will not display a licensing dialog box or LEAD text on the video stream. If you have any questions concerning licensing the codecs/filters, you can contact LEAD licensing at licensing@leadtools.com.


LEAD Text Overlay XML File Format

LEAD Text Overlay XML File Format

General:

The text overlay XML file is a normal XML file following the XML specifications. However, this format defines a set of tags for use in this filter. Any other tags will be ignored. Tag names are case sensitive; for example: use TOverlay and not Toverlay or toverlay. The file must contain a signature comment before any of the text tags; the signature comment must be: <!--LEAD TextOverlay XML File-->.

Valid tags:

The root tag is "TOverlay". This is the main tag. All other tags must be children to this tag. This tag has an attribute named "Text_Scrolling" that can take either "Yes" or "No". This tag can appear only once in the file. For the same file you can have only a scrolling text or a non-scrolling text.

The text tag is "Text". It is a child tag of the "TOverlay" tag. This is the major tag that will introduce the overlay text. This tag hosts the following tags: Text_Line, Start_Frame, End_Frame, Scrolling_Speed.

The text line tag is "Text_Line". This is a child tag of the "Text" tag. Use it to set one or more of your overlay text strings. To enter a new line in the text, you can use the ‘\n’ sequence.

The start frame tag is "Start_Frame". This is also a child tag of the "Text" tag. Use this to specify the frame in the stream at which the overlay text in the Text_Line tag will first appear.

The end frame tag is "End_Frame". This is also a child tag of the "Text" tag. Use this to specify the frame in the stream at which the overlay text in the Text_Line tag will disappear.

The scrolling speed tag is "Scrolling_Speed". This is also a child tag of the "Text" tag. Use this to specify the speed at which the overlay text in the Text_Line tag will scroll. This tag can be used only if the text is specified as scrolling in the TOverlay root tag.

Example 1, no scrolling:

<?xml version="1.0" ?>

<!--LEAD TextOverlay XML File-->

<TOverlay Text_Scrolling = "No">

<Text>

LEAD Technologies, Inc.\nAudio/Video capture, playback and editing using Microsoft DirectX and DirectShow technologies.

<Start_Frame>0</Start_Frame>

<End_Frame>300</End_Frame>

</Text>

<Text>

<Text_Line>Includes fully functional video\ncapture and teleconference demos. </Text_Line>

<Start_Frame>300</Start_Frame>

<End_Frame>600</End_Frame>

</Text>

<Text>

<Text_Line>Support for AVI, MPEG, WAV, MIDI, SND, AIF files and much more.</Text_Line>

<Start_Frame>600</Start_Frame>

<End_Frame>1000</End_Frame>

</Text>

<Text>

<Text_Line>The quick brown fox jumps over the lazy dog</Text_Line>

<Start_Frame>1000</Start_Frame>

<End_Frame>2000</End_Frame>

</Text>

</TOverlay>

Example 2, scrolling:

<?xml version="1.0" ?>

<!--LEAD TextOverlay XML File-->

<TOverlay Text_Scrolling = "Yes">

<Text>

<Text_Line>LEAD Technologies, Inc.\nAudio/Video capture, playback and editing using Microsoft DirectX and DirectShow technologies.</Text_Line>

<Scrolling_Speed>1</Scrolling_Speed>

</Text>

<Text>

<Text_Line>Includes fully functional video\ncapture and teleconference demos. </Text_Line>

<Scrolling_Speed>2</Scrolling_Speed>

</Text>

<Text>

<Text_Line>Support for AVI, MPEG, WAV, MIDI, SND, AIF files and much more.</Text_Line>

<Scrolling_Speed>15</Scrolling_Speed>

</Text>

<Text>

<Text_Line>The quick brown fox jumps over the lazy dog</Text_Line>

<Scrolling_Speed>5</Scrolling_Speed>

</Text>

</TOverlay>


Multimedia Filters and Codecs Licensing - General

Multimedia Filters and Codecs Licensing - General

LEADTOOLS Multimedia SDK is distributed with a variety of DirectShow Ò filters, video codecs and audio codecs that may be used for manipulating and compressing audio or video data. Certain filters and codecs may be included with your end user application and be distributed without runtime licenses in accordance with the license agreement governing LEADTOOLS Multimedia SDK (see Hybrid License). Release versions of these filters and codecs are included with the LEADTOOLS Multimedia setup.

Certain filters and codecs require runtime licenses in order to be included and deployed with your end user application. Evaluation versions of these filters and codecs are included with the LEADTOOLS Multimedia setup. In addition, LEAD has bundled certain of these filters and codecs requiring runtime licenses together and included with the LEADTOOLS DVD Module, the LEADTOOLS DVR Module, the LEADTOOLS Video Streaming Module and the LEADTOOLS MPEG2 Transport Module, which are add-ons to LEADTOOLS Multimedia SDK.

To unlock the evaluation versions of these filters and codecs requiring runtime licensing, you must complete the Duplication and Distribution License, the terms of which are covered in detail in the LEADTOOLS Multimedia Help File under the topic "LEAD Licensing".


LEADTOOLS Multimedia

LEADTOOLS Multimedia Interfaces, Objects, Codecs, and DirectShow Filters

Create professional, high-quality multimedia applications with the LEADTOOLS Multimedia SDK. Add multimedia functionality such as Capture, Play, and Edit, as well as the latest DirectShow filters and multimedia file support. Load/convert to and from many formats, such as (WAV, AVI, WMA, WMV, MPEG-1, MPEG-2, and OGG. Get programmatic control over multimedia processors, compressors, video and audio inputs, types and sub-types; as well as increased camera control (brightness, contrast, zoom, etc); more flexible capturing options and much more!

With the LEADTOOLS Multimedia SDK you have a fully enabled development and deployment license for the following interfaces and objects:

API Interfaces

ILTDvdWriter Interface (available in the LEADTOOLS DVD Module)

ILTDVDBurner Interface (available in the LEADTOOLS DVD Module)

ILMDVRSink (Available in the LEADTOOLS DVR Module)

ILMDVRSource (available in the LEADTOOLS DVR Module)

ILMNetConnection Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetConnectionPoint Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetDmx Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetMux Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetProtocol Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetProtocolManager Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetSnk Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetSnkConnection Interface (available in the LEADTOOLS Video Streaming Module)

ILMNetSrc Interface (available in the LEADTOOLS Video Streaming Module)

IltmmAnalogVideoDecoder Interface

IltmmAudioFormat Interface

IltmmAudioFormats Interface

IltmmAudioInput Interface

IltmmAudioInputs Interface

IltmmCameraControl Interface

IltmmCapture Interface

IltmmCaptureInput Interface

IltmmCaptureInputs Interface

IltmmCaptureSize Interface

IltmmCaptureSizes Interface

IltmmCaptureSubType Interface

IltmmCaptureSubTypes Interface

IltmmCompressor Interface

IltmmCompressors Interface

IltmmConvert Interface

IltmmDevice Interface

IltmmDevices Interface

IltmmDVDControl Interface

IltmmMediaInfo Interface

IltmmMediaSampleDisp Interface

IltmmMediaTypeDisp Interface

IltmmMemory Interface

IltmmMultiStreamSource Interface

IltmmMultiStreamTarget Interface

IltmmObjectWrapper Interface

IltmmPlay Interface

IltmmProcessor Interface

IltmmProcessors Interface

IltmmRenderer Interface

IltmmRenderers Interface

IltmmSampleSource Interface

IltmmSampleTarget Interface

IltmmSupportManager Interface

IltmmTargetDevice Interface

IltmmTargetDevices Interface

IltmmTargetFormat Interface

IltmmTargetFormats Interface

IltmmTVTuner Interface

IltmmVCRControl Interface

IltmmVideoFormat Interface

IltmmVideoFormats Interface

IltmmVideoProcAmp Interface

IltmmWMMutualExclusion Interface

IltmmWMProfile Interface

IltmmWMProfileManager Interface

IltmmWMStreamConfig Interface

COM Objects

ltDVDWriter Object (available in the LEADTOOLS DVD Module)

ILTDVDBurner Object (available in the LEADTOOLS DVD Module)

ILMDVRSink Object (Available in the LEADTOOLS DVR Module)

ILMDVRSource Object (Available in the LEADTOOLS DVR Module)

LMNetDmx Object (available in the LEADTOOLS Video Streaming Module)

LMNetMux Object (available in the LEADTOOLS Video Streaming Module)

ILMNetSnk Object (available in the LEADTOOLS Video Streaming Module)

ILMNetSnkConnection Object (available in the LEADTOOLS Video Streaming Module)

LMNetSrc Object (available in the LEADTOOLS Video Streaming Module)

ltmmAnalogVideoDecoder Object

ltmmAudioFormat Object

ltmmAudioFormats Object

ltmmAudioInput Object

ltmmAudioInputs Object

ltmmCameraControl Object

ltmmCaptureCtrl Object

ltmmCaptureInput Object

ltmmCaptureInputs Object

ltmmCaptureSize Object

ltmmCaptureSizes Object

ltmmCaptureSubType Object

ltmmCaptureSubTypes Object

ltmmCompressor Object

ltmmCompressors Object

ltmmConvertCtrl Object

ltmmDevice Object

ltmmDevices Object

ltmmDVDControl Object

ltmmMediaInfo Object

ltmmMemory Object

ltmmMultiStreamSource Object

ltmmMultiStreamTarget Object

ltmmPlayCtrl Object

ltmmProcessor Object

ltmmProcessors Object

ltmmRenderer Object

ltmmRenderers Object

ltmmSampleSource Object

ltmmSampleTarget Object

ltmmSupportManager Object

ltmmTargetDevice Object

ltmmTargetDevices Object

ltmmTargetFormat Object

ltmmTargetFormats Object

ltmmTVTuner Object

ltmmVCRControl Object

ltmmVideoFormat Object

ltmmVideoFormats Object

ltmmVideoProcAmp Object

ltmmWMMutualExclusion Object

ltmmWMProfile Object

ltmmWMProfileManager Object

ltmmWMStreamConfig Object

The LEADTOOLS Multimedia SDK includes a fully enabled development license for the following components:

DirectShow Filters

LEAD Video Add Filter

LEAD Video Auto Contrast Filter

LEAD Video Auto Intensity Filter

LEAD Video Auto Level Filter

LEAD Video EFX Brightness Filter

LEAD Video Color Filter

LEAD Video Color Replacement Filter

LEAD Video Deblocking Filter

LEAD Video Edge Enhance Filter

LEAD Video EFX Aging Filter

LEAD Video EFX Bump Map Filter

LEAD Video EFX Dizzy Filter

LEAD Video EFX Fire Filter

LEAD Video EFX Ghost Filter

LEAD Video EFX Glass Tile Filter

LEAD Video EFX Hologram Filter

LEAD Video EFX Lens Filter

LEAD Video EFX Lightning Filter

LEAD Video EFX Maze Filter

LEAD Video EFX Motion Blur Filter

LEAD Video EFX Motion Emboss Filter

LEAD Video EFX Motion Mosaic Filter

LEAD Video EFX Motion Scan Filter

LEAD Video EFX Particles Filter

LEAD Video EFX Predator Filter

LEAD Video EFX Rain Filter

LEAD Video EFX Streak Filter

LEAD Video EFX Wave Filter

LEAD Video Emboss Filter

LEAD Video Gamma Correction Filter

LEAD Video Mosaic Filter

LEAD Video RGB Converter

LEAD Video YUV Converter

LEAD Still Image Reader

LEAD Still Image Writer

LEAD Audio Callback Filter

LEAD Audio Chorus Filter

LEAD Audio Echo Filter

LEAD Audio Flanger Filter

LEAD Audio Phaser Filter

LEAD Audio Volume Control Filter

LEAD Audio VU Meter Filter

LEAD MPEG Audio Converter

LEAD Ogg Multiplexer

LEAD Ogg Splitter

Codecs

LEAD Vorbis Decoder

LEAD Vorbis Encoder

In addition, the toolkit includes evaluation versions of the following components:

DirectShow Filters

LEAD Video Frame Rate Controller Filter***

LEAD Video Histogram Equalize Filter

LEAD Video Histogram View Filter

LEAD Video Overlay Filter

LEAD Video Text Overlay Filter

LEAD Video Unsharp Mask Filter

LEAD Video Deinterlace Filter***

LEAD Video Motion Detection Filter

LEAD Audio Detection Filter

LEAD Video Resize Filter***

LEAD Video Crop Filter***

LEAD Video Callback Filter

LEAD Video Rotation Filter***

LEAD MPEG-1 Multiplexer*

LEAD MPEG-2 Multiplexer*

LEAD ISO Multiplexer**

LEAD ISO Demultiplexer**

LEAD MPEG2 Transport Demultiplexer****

LEAD MPEG2 Program Demultiplexer****

LEAD MPEG2 Transport UDP Source****

LEAD MPEG2 Transport UDP Sink****

LEAD MPEG2 Transport RTSP Source****

LEAD DVD Writer for API*

LEAD DVD Burner for API*

LEAD DVD Control for API

LEAD Network Demultiplexer Filter for API **

LEAD Network Multiplexer Filter for API **

LEAD Network Sink Filter for API **

LEAD Network Source Filter for API**

LEAD DVD Writer for COM*

LEAD DVD Burner for COM*

LEAD DVD Control for COM

LEAD Network Demultiplexer Filter for COM **

LEAD Network Multiplexer Filter for COM **

LEAD Network Sink Filter for COM **

LEAD Network Source Filter for COM**

Codecs

LEAD MPEG Audio Encoder*

LEAD AAC Encoder **

LEAD AAC Decoder **

LEAD AC3 Encoder

LEAD AMR Encoder**

LEAD AMR Decoder**

LEAD H263 Decoder

LEAD H263 Encoder

LEAD H263 Encoder (VFW)

LEAD H264 Decoder**

LEAD H264 Decoder (DMO)**

LEAD H264 Encoder**

LEAD H264 Encoder (DMO)

LEAD H264 Encoder Advanced (DMO)

LEAD MCMW Decoder

LEAD MCMW Encoder

LEAD MCMP/MJPEG Codec (VFW)

LEAD MJ2K Decoder

LEAD MJ2K Encoder

LEAD MPEG-2 Decoder*

LEAD MPEG-2 Encoder*

LEAD MPEG-4 Decoder**

LEAD MPEG-4 Encoder**

LEAD Screen Capture Codec Filter (VFW)

LEAD Screen Capture Decoder

LEAD Screen Capture Encoder

* Included in the LEADTOOLS DVD Module once you sign the license agreement.

** Included in the LEADTOOLS Video Streaming Module once you sign the license agreement.

*** Included in the LEADTOOLS DVD Module or the LEADTOOLS Video Streaming Module once you sign the license agreement.

**** Included in the LEADTOOLS MPEG-2 Transport Module once you sign the license agreement.


A module that combines audio and video into one file.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

Filters And Codecs Not Requiring Runtime Licensing

The filters and codecs listed on this page may be deployed and distributed with your end user application in accordance with the LEADTOOLS Software License Agreement ("Hybrid License") governing LEADTOOLS Multimedia SDK. Under this license you may deploy and distribute your end user application internally on a quantity unlimited basis and commercially to up to 1000 users per year or on up to five (5) production servers per year. Release versions of these filters and codecs are included with the LEADTOOLS Multimedia setup and may be copied and distributed with your end user application.

List of Runtime License Free Filters and Codecs

DirectShow Filters

  • LEAD Video Add Filter

  • LEAD Video Auto Contrast Filter

  • LEAD Video Auto Intensity Filter

  • LEAD Video Auto Level Filter

  • LEAD Video EFX Brightness Filter

  • LEAD Video Color Filter

  • LEAD Video Color Replacement Filter

  • LEAD Video Deblocking Filter

  • LEAD Video Edge Enhance Filter

  • LEAD Video EFX Aging Filter

  • LEAD Video EFX Bump Map Filter

  • LEAD Video EFX Dizzy Filter

  • LEAD Video EFX Fire Filter

  • LEAD Video EFX Ghost Filter

  • LEAD Video EFX Glass Tile Filter

  • LEAD Video EFX Hologram Filter

  • LEAD Video EFX Lens Filter

  • LEAD Video EFX Lightning Filter

  • LEAD Video EFX Maze Filter

  • LEAD Video EFX Motion Blur Filter

  • LEAD Video EFX Motion Emboss Filter

  • LEAD Video EFX Motion Mosaic Filter

  • LEAD Video EFX Motion Scan Filter

  • LEAD Video EFX Particles Filter

  • LEAD Video EFX Predator Filter

  • LEAD Video EFX Rain Filter

  • LEAD Video EFX Streak Filter

  • LEAD Video EFX Wave Filter

  • LEAD Video Emboss Filter

  • LEAD Video Gamma Correction Filter

  • LEAD Video Mosaic Filter

  • LEAD Video RGB Converter

  • LEAD Video YUV Converter

  • LEAD Audio Callback Filter

  • LEAD Audio Chorus Filter

  • LEAD Audio Echo Filter

  • LEAD Audio Flanger Filter

  • LEAD Audio Phaser Filter

  • LEAD Audio Volume Control Filter

  • LEAD Audio VU Meter Filter

  • LEAD Ogg Multiplexer

  • LEAD Ogg Splitter

  • LEAD MPEG Audio Converter

Codecs

  • LEAD Vorbis Encoder

  • LEAD Vorbis Decoder


Filters And Codecs Requiring Runtime Licensing

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

A module that combines audio and video into one file.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

The LEAD AC3 Audio Codec is a DirectShow filter that supports the encoding of audio streams using the AC3 standard. The LEAD AC3 encoder provides options to control the quality and the number of output channels. AC3 is a 5.1 format, which means that it provides five full bandwidth channels: front left, front right, center, surround left, and surround right. A low-frequency effect (LFE) channels is included for the sound needed for special effects and action sequences in movies. AC3 also has a downmixing feature that ensures compatibility with devices that do not support the 5.1 format.

LEAD H264 is a DirectShow filter for compressing and decompressing Video data using the H264/AVC standard. H264 is the latest video standard developed jointly by ITUand MPEG. H264/AVC provides a far more efficient algorithm for compressing video.It typically outperforms all existing standards by a factor of three to four especiallyin comparison to MPEG-2.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

LEAD MPEG-4 is a DirectShow filter for compressing/decompressing video data usingthe MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths, from low bandwidth to broadband.

Available in LEADTOOLS Multimedia toolkits.

Filters And Codecs Requiring Runtime Licensing

The filters and codecs listed on this page require runtime licenses. You may not deploy or distribute your end user application with any of these filters or codecs unless you first enter into a duplication and distribution agreement. Evaluation versions of these filters and codecs are included with the LEADTOOLS Multimedia setup and will generate an evaluation notice when used and/or will expire after a period of time.

If you are interested getting the licensed version of any of these filters or codecs, you should contact oemsales@leadtools.com to obtain a license agreement. Once the agreement has been executed and returned to LEAD, our support department will provide you with the release version of the individual codec (s)/filter(s) you wish to license. The Duplication and Distribution License can be found in the Licensing Help File under the topic "LEADTOOLS Duplication and Distribution License".

The license to use LEADTOOLS Multimedia without any of the filters and filters listed below is governed by the LEADTOOLS License Agreement ("Hybrid License") and does not require runtime licensing. The LEADTOOLS Standard End-User Software License Agreement (EULA) can be found in the Licensing Help File under the topic "License SDK 17.0".

List of Filters and Codecs Requiring Runtime Licenses

Filters

  • LEAD Audio Detection Filter

  • LEAD DICOM Reader (Requires LEADTOOLS Medical Imaging with Medical Multimedia Module)

  • LEAD DICOM Writer (Requires LEADTOOLS Medical Imaging with Medical Multimedia Module)

  • LEAD DVR Source

  • LEAD DVR Sink

  • LEAD ISO Multiplexer

  • LEAD ISO Demultiplexer

  • LEAD MPEG1 Multiplexer

  • LEAD MPEG2 Multiplexer

  • LEAD MPEG2 Transport Multiplexer

  • LEAD MPEG2 Program Demultiplexer

  • LEAD MPEG2 Transport Demultiplexer

  • LEAD MPEG2 Transport UDP Sink

  • LEAD MPEG2 Transport UDP Source

  • LEAD MPEG2 Transport RTSP Source

  • LEAD Network Demultiplexer

  • LEAD Network Multiplexer

  • LEAD Network Source

  • LEAD Network Sink

  • LEAD Network Protocol Manager Object

  • LEAD Still Image Reader (Requires LEADTOOLS Imaging Pro)

  • LEAD Still Image Writer (Requires LEADTOOLS Imaging Pro)

  • LEAD Video Callback Filter

  • LEAD Video Crop Filter

  • LEAD Video Deinterlace Filter

  • LEAD Video Frame Rate Controller Filter

  • LEAD Video Dynamic Rate Control Filter

  • LEAD Video Histogram Equalize Filter

  • LEAD Video Histogram View Filter

  • LEAD Video Motion Detection Filter

  • LEAD Video Overlay Filter

  • LEAD Video Image Overlay Filter

  • LEAD Video Text Overlay Filter

  • LEAD Video Resize Filter

  • LEAD Video Rotation Filter

  • LEAD Screen Capture Filter

  • LEAD Video Unsharp Mask Filter

  • LEAD Windows Media Reader (Included in the LEADTOOLS Multimedia SDK)

Codecs

  • LEAD MPEG Audio Encoder

  • LEAD AAC Encoder

  • LEAD AAC Decoder

  • LEAD AC3 Encoder

  • LEAD AC3 Decoder

  • LEAD AMR Decoder

  • LEAD AMR Encoder

  • LEAD H263 Decoder

  • LEAD H263 Encoder

  • LEAD H263 Encoder (VFW)

  • LEAD H264 Decoder

  • LEAD H264 Decoder (DMO)

  • LEAD H264 Encoder

  • LEAD H264 Encoder (DMO)

  • LEAD H264 Encoder Advanced (DMO)

  • LEAD MCMW Decoder

  • LEAD MCMW Encoder

  • LEAD MCMP/MJPEG Codec (VFW)

  • LEAD MCMP/MJPEG Codec

  • LEAD MCMP/MJPEG Decoder

  • LEAD MJ2K Decoder

  • LEAD MJ2K Encoder

  • LEAD MPEG-2 Decoder

  • LEAD MPEG-2 Encoder

  • LEAD MPEG-4 Decoder

  • LEAD MPEG-4 Encoder

  • LEAD Screen Capture Codec (VFW)

  • LEAD Screen Capture Decoder

  • LEAD Screen Capture Encoder

  • LEAD Theora Decoder

  • LEAD Theora Encoder

    Some of the filters and codecs listed above are bundled together and included with the following SDK Add-Ons:

    • LEADTOOLS DVD Module, LEADTOOLS DVR Module, LEADTOOLS MPEG2 Transport Module, or LEADTOOLS Video Streaming Module, which are add-ons to the LEADTOOLS Multimedia SDK.

    • Medical Multimedia Module, which is an add-on to the LEADTOOLS Medical Imaging SDK.

    Licensing terms, including runtime license prices for the individual filters / codecs as well as for these add-ons is covered in the Licensing Help File, under the "LEAD Runtime License Prices - Medical" and the "LEAD Runtime License Prices - Multimedia" topics.


Multimedia Files To Be Included With Your Application

A module that combines audio and video into one file.

The driver that writes the data (burns the data) to the DVD. It is the software that burns the DVD image to the physical media.DVD image to the physical media.DVD image to the physical media.DVD image to the physical media.

A set of files that contain all of the video and audio content for a DVD, organized with a table of contents (optional). See also: Title, Chapter, ISO Image.

The name for a group of related video files (called "Chapters") on your DVD. For example, for a DVD called "My Summer Vacation," you might have the titles "Water Skiing," "New Friends," and "Hiking." For each of those titles, you might have one or more different video files.

The name for each individual video file on a DVD. For example, under the title "Water Skiing", you might have the chapters "My first try," "My first wreck," and "My first jump."

An ISO image (.iso) is a disk image of a file system. It includes data files that are contained in the ISO image along with filesystem metadata. ISO images are an alternative to physical media for distribution of a "DVD" over the Internet. Most operating systems allow ISO images images to be "played" as if they were physical discs. See also: DVD Image.

Available in LEADTOOLS Multimedia toolkits.

Multimedia Files You Must Include With Your Application (Redistributables)

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation. The following subdirectory for the Multimedia features is created:

Redist\MM\Win32 | Redistributable Multimedia feature files for Win32 systems
Redist\MM\x64 | Redistributable Multimedia feature files for x64 systems
Redist\MM\Win32\RequireLicensing | Redistributable Multimedia feature files for Win32 systems that require special licensing
Redist\MM\x64\RequireLicensing | Redistributable Multimedia feature files for x64 systems that require special licensing.

The LEADTOOLS Multimedia features require Microsoft DirectShow 8.0 or later for full multimedia functionality. In particular, the QUARTZ.DLL file, which is the DirectShow kernel module, must be installed on the computer.

To save Windows Media (WMV) with full functionality (create video-only files, use custom, non-Microsoft codecs in WMV files, etc.), the latest Windows Media Components are required. These components are included in an installation package named WMFDist95.exe present in the Redist\MM folder. These components are also included in Windows Media Player 9 and later versions. Therefore, you do not need to install these components on computers that have Windows Media 9 player installed.

Note: | LEADTOOLS Multimedia redistributable files are all COM-based, unless otherwise specified, and must be registered by your installation procedure.
Note: | Some Multimedia features are provided for evaluation purposes only. You may not copy, redistribute or deploy in production any of the following files without obtaining the proper license. In some cases, the license is included with your initial purchase of LEADTOOLS Multimedia SDK. In other cases, you must obtain a license from LEAD by entering into a Duplication and Distribution License. See Multimedia Licensing. For these special licensing situations, see the notes below accompanying the specific file.
Note: | Certain standards-based technology may require patent licenses from third party patent holders. The license provided by LEAD does not include any third party patent licenses, and it is your responsibility to acquire any third party licenses that are required. In certain cases where LEAD is aware of the existence of third party patents covering a standard, LEAD has acquired a patent license that covers the LEADTOOLS SDK, but we do not have the right to sublicense the patents. In cases where LEAD has acquired a patent license, the contact information for the patent holder/agent is shown below. LEAD makes no representations or warranties whatsoever to the effect that the patent holders shown below constitute all persons holding patents covering the standards-based technology that is included in the Software. LEAD encourages its customers to conduct their own due diligence regarding the potential for third party patents on any features that are being incorporated into the application
Note: | You may not distribute the header files with your application, and you may not provide software development capabilities in your application.
Note: | To unlock the LEADTOOLS Multimedia features (LTMM17.DLL), you need to unlock one of the following modules: Multimedia DVD Module Video Streaming Module Medical Multimedia Module Medical Imaging Suite
Note: | The Still Image filters (reader and writer) require a LEADTOOLS Imaging Pro license.

The following table summarizes the files you must include on your distribution media to support the LEADTOOLS Multimedia features functions on a WIN32\x64 system.

The (Redist\MM\Win32) & (Redist\MM\x64) folders contain the files you are licensed to use with the LEADTOOLS Multimedia SDK

The (Redist\MM\Win32\RequireLicensing) & (Redist\MM\x64\RequireLicensing) folders contain the files that require a separate license before you can redistribute them. These can be licensed by purchasing an Add-on module, or by licensing the filters or codecs individually.

Redistributables

Explanation

Win32 Platforms:

x64 Platforms:***

Requires LEAD Duplication and Distribution license

LTMM

Multimedia Features Support

The LEADTOOLS Multimedia Support DLL.

LTMM17.DLL

DSKERNEL2.DLL

LTMM17.DLL

DSKERNEL2.DLL

No

DSKernel2*

LEAD DirectShow Kernel

DSKernel2.DLL is the LEAD DirectShow Kernel DLL. It is used to unlock filters and modules provided in Evaluation mode.

DSKERNEL2.DLL

DSKERNEL2x.DLL

No

WMFDist

Windows Media Components Redistributable

This redistributable is provided by Microsoft with its Windows Media Format 9.5 SDK. These components are also included in Windows Media Player 9 and later versions. We included it with our setup for your convenience. You should run this executable as part of your setup if you detect that the Windows Media Components need to be updated. Please see the Microsoft documentation if you need more information about this redistributable.

WMFDist95.EXE

WMFDist95.EXE

No

LTDVDWRT

LEAD DVD Writer

This is used to create DVD images, which can be later burned to a DVD disk. It implements the ILTDvdWriter interface. This filter requires the LEAD MPEG-2 Multiplexer filter. MPEG-2 technology may require third party patents. See (www.mpegla.com) for more information on MPEG-2 patent availability and terms.

LTDVDWRT2.DLL
DSKERNEL2.DLL

LTDVDWRT2x.DLL
DSKERNEL2x.DLL

Yes

LTDVDBrn

LEAD DVD Burner

This is used to burn DVD and ISO images to a DVD disk. It implements the ILTDVDBurner interface. It is included in the LEADTOOLS DVD Module.

LTDVDBrn2.DLL

DSKERNEL2.DLL

LTDVDBrn2x.DLL

DSKERNEL2x.DLL

Yes

LMNetCon

LEAD Network Connection Manager
This is used to implement the low level network connection protocols. This filter is used internally by the LEAD Network Sink Filter and the LEAD Network Source Filter for the TCP/IP connections. It is required by the server demos shipped with the Video Streaming Module.

LMNetCon2.DLL
DSKERNEL2.DLL

LMNetCon2x.DLL
DSKERNEL2x.DLL

Yes

LMNetMux

LEAD Network Multiplexer Filter

This is used to multiplex video and audio together using the LEAD streaming format. It is used together with the LEAD Network Sink in applications that send video over TCP/IP. It is required by the server demos shipped with the Video Streaming Module. Note: You need to use video and audio compressors for efficient streaming. This filter will not do any compression.

LMNetMux2.DLL
DSKERNEL2.DLL

LMNetMux2x.DLL
DSKERNEL2x.DLL

Yes

LMNetSnk

LEAD Network Sink Filter

This is used to send data multiplexed with the LEAD Network Multiplexer. It is used together with the LEAD Network Multiplexer in applications that send video over TCP/IP. It is required by the server demos shipped with the Video Streaming Module.

LMNetSnk2.DLL
LMNetCon2.DLL
DSKERNEL2.DLL

LMNetSnk2x.DLL
LMNetCon2x.DLL
DSKERNEL2x.DLL

Yes

LMNetSrc

LEAD Network Source Filter

This filter connects to the LEAD Network Sink filter and receives multiplexed data over TCP/IP connections. This filter is used with the LEAD Network Demultiplexer in client demos shipped with the Video Streaming Module.

LMNetSrc2.DLL
LMNetCon2.DLL
DSKERNEL2.DLL

LMNetSrc2x.DLL
LMNetCon2x.DLL
DSKERNEL2x.DLL

Yes

LMNetDmx

LEAD Network Demultiplexer Filter

This filter will demultiplex (split) data in the LEAD streaming format. This filter is used with the LEAD Network Source in client demos shipped with the Video Streaming Module. It can also be used to create LEADTOOLS Streaming Files. Note: This filter will not do any decompression. You need video and audio decoders to play compressed streams.

LMNetDmx2.DLL

DSKERNEL2.DLL

LMNetDmx2x.DLL

DSKERNEL2x.DLL

Yes

LMIsoDmx LMIsoMux

LEAD ISO Demultiplexer and Multiplexer

LMIsoDmx is the LEAD ISO Demultiplexer. It is used to play multimedia files based on the ISO Base File Format (see ISO/IEC 19996-12. LMIsoDmx is the LEAD ISO Multiplexer. It is used to create multimedia files based on the ISO Base File Format. There are many file formats based on this format. The most common are: Quicktime (.MOV), MPEG-4 (.MP4), 3GPP (.3gp), Flash HD, and AVC. Do not confuse this with the .ISO file format, which is used to store DVD or CD images on a hard drive.

The LEAD ISO Demultiplexer is also used to play the Flash HD files. The Flash HD files are usually ISO base files with H264 Video compression and AAC audio compression.

The LEAD ISO Multiplexer can also be used with the LEAD H264 Encoder and LEAD AAC Encoder to create Flash HD files.

LMIsoDmx.DLL LMIsoMux.DLL

DSKERNEL2.DLL

LMIsoDmxx.DLL LMIsoMuxx.DLL

DSKERNEL2x.DLL

Yes

LMOggMux

LMOggSpl

LEAD Ogg Multiplexer and Splitter

TheLMOggMux.DLL is the LEAD Ogg Muxer DLL. It is required for creating Ogg files. The LMOggSpl.DLL is the LEAD Ogg Splitter DLL. It is required for playing Ogg files.

LMOggMux.DLL
LMOggSpl.DLL

LMOggMuxx.DLL
LMOggSplx.DLL

No

LMMpg1Mx

LMMpg2Mx

LEAD MPEG-1 and MPEG-2 Multiplexers

LMMpg1Mx2.DLL is the LEAD MPEG1 Multiplexer DLL. It is required for creating MPEG1 System files. LMMpg2Mx2.DLL is the LEAD MPEG2 Multiplexer DLL. It is required for creating MPEG2 Program files.

MPEG-2 technology may require third party patents. See www.mpegla.com for more information on MPEG-2 patent license availability and terms

LMMpg1Mx2.DLL
LMMpg2Mx2.DLL
DSKERNEL2.DLL

LMMpg1Mx2.DLL
LMMpg2Mx2.DLL
DSKERNEL2.DLL

Yes

LMMpgDmxP

LEAD MPEG-2 Program Demultiplexer

Used for playing MPEG2 Program and MPEG1 System files. Can also play raw video (MPEG2, MPEG4, H264) or audio (MPEG Audio Layer I, II, III, AAC, AC3).

MPEG-2, H264, MPEG4 and AAC technology may require third party patents. See www.mpegla.com for more information on MPEG-2, H264 and MPEG4 patent license availability and terms and www.vialicensing.com for more information on AAC patent license availability and terms.

LMMpgDmxP.DLL
DSKernel2.DLL

LMMpgDmxPx.DLL
DSKernel2x.DLL

Yes

LMMpg2MxT

LEAD MPEG-2 Transport Multiplexer

Used for creating MPEG-2 Transport files. It can also be used together with the LEAD MPEG2 Transport UDP Sink filter to stream MPEG-2 Transport files using UDP or TCP/IP. (The server side, which sends the data).

MPEG-2 technology may require third party patents. See www.mpegla.com for more information on MPEG-2 patent license availability and terms.

LMMpg2MxT.DLL
DSKernel2.DLL

LMMpg2MxTx.DLL
DSKernel2x.DLL

Yes

LMUDPSnk

LEAD MPEG-2 Transport UDP Sink

Used together with LEAD MPEG-2 Transport Multiplexer for streaming MPEG-2 Transport files using UDP and TCP/IP. (The server side, which sends the data).

LMUDPSnk.DLL
DSKernel2.DLL

LMUDPSnkx.DLL

DSKernel2x.DLL

Yes

LMMpgDmxT

LEAD MPEG-2 Transport Demultiplexer

Used for playing MPEG2 Transport, MPEG2 Program and MPEG1 System files. Can also play raw video (MPEG2, MPEG4, H264) or audio (MPEG Audio Layer I, II, III, AAC, AC3). Also supports private data stored in MPEG2 files (including KLV data).

It can also be used together with the LEAD MPEG2 Transport UDP Source filter to stream MPEG2 files using UDP or TCP/IP. (The client side, which receives the data).

MPEG-2 technology may require third party patents. See www.mpegla.com for more information on MPEG-2 patent license availability and terms.

LMMpgDmxT.DLL
DSKernel2.DLL

LMMpgDmxTx.DLL
DSKernel2x.DLL

Yes

LMUDPSrc

LEAD MPEG-2 Transport UDP Source

Used together with LEAD MPEG-2 Transport Demultiplexer for streaming MPEG-2 Transport files using UDP and TCP/IP. (The client side, which receives the data).

Now contains LEAD DVR Sink and LEAD DVR Source functionality to implement live stream buffering for pause, rewind and fast-forward control.

LMUDPSrc.DLL
DSKernel2.DLL

LMUDPSrcx.DLL
DSKernel2x.DLL

Yes

LMRTSPSrc

LEAD MPEG-2 Transport RTSP Source

Used for streaming data from a RTSP Server.

LMRTSPSrc.DLL

DSKernel2.DLL

LMRTSPSrcx.DLL

DSKernel2x.DLL

Yes

LMDVRSink

LEAD DVR Sink Filter

Filter used to write live video/audio streams to disk for playback, employing the LEAD intelligent time-shifting algorithm for DVR Playback. Provides complete control of the buffer size, including support for having the buffer span more than one disk. It is used in conjunction with the LEAD DVR Source Filter.

LMDVRSink.DLL

DSKernel2.DLL

LMDVRSinkx.DLL

DSKernel2x.DLL

Yes

LMDVRSource

LEAD DVR Source Filter

This filter in conjunction with LMUDPSrc, allows the LEAD Player control to read video and audio streams from files created by the LEAD DVR Sink Filter. This filter allows the LEAD Player Control to play, pause, rewind, and fast forward live streams.

LMDVRSource.DLL

DSKernel2.DLL

LMDVRSourcex.DLL

DSKernel2x.DLL

Yes

LMFLVDmx

LEAD FLV Demultiplexer

Used for playing Flash FLV (non-HD) files commonly used on video sites like YouTube. To play Flash HD files, you will need the LEAD ISO Demultiplexer.

LMFLVDmx.DLL
DSKernel2.DLL

LMFLVDmxx.DLL
DSKernel2x.DLL

Yes

LMFLVMux

LEAD FLV Multiplexer

Used for creating Flash FLV (non-HD) files commonly used on video sites like YouTube. To create Flash HD files, you will need the LEAD ISO Multiplexer.

LMFLVMux.DLL
DSKernel2.DLL

LMFLVMuxx.DLL
DSKernel2x.DLL

Yes

LMWMReader

LEAD Windows Media Reader

Use the LEAD Windows Media Reader to parse Windows Media Files. It is especially useful for playing Windows Media files under Vista from an URL.

LDecAMR

LEAD AMR Decoder

Used for decoding AMR audio. AMR audio compression is used in 3GP files (very popular with mobile phones).

LDecAMR.DLL
DSKernel2.DLL

LDecAMRx.DLL
DSKernel2x.DLL

Yes

LEncAMR

LEAD AMR Encoder

Used for encoding AMR audio. AMR audio compression is used in 3GP files (very popular with mobile phones).

LEncAMR.DLL
DSKernel2.DLL

LEncAMRx.DLL
DSKernel2x.DLL

Yes

LDecAAC

LEAD AAC Decoder

Used for decoding AAC audio. AAC audio compression is the next generation of the MPEG audio encoding technology. It is commonly used in MP4 files used by iPod, iPhone, PSP and other similar portable devices. It is also used in Flash HD files.

AAC technology may require third party patents. See www.vialicensing.com for more information on AAC patent license availability and terms.

LDecAAC.DLL
DSKernel2.DLL

LDecAACx.DLL
DSKernel2x.DLL

Yes

LEncAAC

LEAD AAC Encoder

Used for encoding AAC audio. AAC audio compression is the next generation of the MPEG audio encoding technology. It is commonly used in MP4 files used by iPod, iPhone, PSP and other similar portable devices. It is also used in Flash HD files.

AAC technology may require third party patents. See www.vialicensing.com for more information on AAC patent license availability and terms.

LEncAAC.DLL
LEncAACKrn.DLL
DSKernel2.DLL

LEncAACx.DLL
LEncAACKrnx.DLL
DSKernel2x.DLL

Yes

LTranscoderAAC

LEAD AAC Encoder

Used for transcoding AAC audio stream in mpeg2 format to ACC in ISO (mpeg4) format. Changes the AAC packets format without re-compressing the audio stream or data packets. Converting with LEAD AAC Encoder is fast while retaining the quality of the original stream.

To convert an AAC stream inside an MPEG2 transport file to ISO format without re-compression, insert this filter between the mpeg2 demux and ISO multiliplixer. The LEAD Multimedia toolkit inserts it in this way automatically.

LTranscoderAAC.Dll
DSKernel2.DLL

LTranscoderAACx.Dll
DSKernel2x.DLL

LEncAC3

LEAD AC3 Encoder

Used for encoding AC-3 audio. AC-3 audio compression (also known as ATSC A/52) is commonly used in DVDs. It is the format used for Dolby® surround sound.

LEncAC3.DLL
LEncAC3Krn.DLL
DSKernel2.DLL

LEncAC3x.DLL
LEncAC3Krnx.DLL
DSKernel2x.DLL

Yes

LDecVorbis

LEAD Vorbis Decoder

Used for decoding Vorbis audio. Vorbis audio compression is popular in Ogg files. Vorbis is patent-free and has compression comparable to (if not better than) MP3.

LDecVorbis.DLL

LDecVorbisx.DLL

No

LEncVorbis

LEAD Vorbis Encoder

Used for encoding Vorbis audio. Vorbis audio compression is popular in Ogg files. Vorbis is patent-free and has compression comparable to (if not better than) MP3.

LEncVorbis.DLL

LEncVorbisx.DLL

No

LEncMpga

LEAD MPEG Audio Encoder

Used for encoding MPEG Audio Layer II files. MPEG audio can be used in MPEG files and DVDs.

LEncMpga2.DLL
DSKernel2.DLL

LEncMpga2x.DLL
DSKernel2x.DLL

Yes

LDecMpg2

LEAD MPEG2 Decoder

Used for decoding MPEG2 video. Can also be used to decode MPEG1 video. MPEG2 video compression is commonly used in MPEG2 Program, MPEG2 Transport and DVDs. LEAD MPEG2 Decoder cannot be used to play DVDs. You need a DVD decoder to play DVDs.

MPEG-2 technology may require third party patents. See www.mpegla.com for more information on MPEG-2 patent license availability and terms.

LDecMpg22.DLL
DSKernel2.DLL

LDecMpg22x.DLL
DSKernel2x.DLL

Yes

LEncMpg2

LEAD MPEG2 Encoder

Used for encoding MPEG2 or MPEG1 video. MPEG2 video compression is commonly used in MPEG2 Program, MPEG2 Transport and DVDs. LEAD MPEG2 Encoder can be used to encode DVDs.

MPEG-2 technology may require third party patents. See www.mpegla.com for more information on MPEG-2 patent license availability and terms

LEncMpg23.DLL
DSKernel2.DLL

LEncMpg23x.DLL
DSKernel2x.DLL

Yes

LDecMpg4

LEAD MPEG4 Decoder

Used for decoding MPEG-4 video. MPEG-4 video compression is commonly used in MP4 files. DivX compression is based on MPEG-4.

MPEG-4 and AAC technology may require third party patents. See www.mpegla.com for more information on MPEG-4 patent license availability and terms and www.vialicensing.com for more information on AAC patent license availability and terms.

LDecMpg42.DLL
DSKernel2.DLL

LDecMpg42x.DLL
DSKernel2x.DLL

Yes

LEncMpg4

LEAD MPEG4 Encoder

Used for encoding MPEG-4 video. MPEG-4 video compression is commonly used in MP4 files. DivX compression is based on MPEG-4.

MPEG-4 and AAC technology may require third party patents. See www.mpegla.com for more information on MPEG-4 patent license availability and terms and www.vialicensing.com for more information on AAC patent license availability and terms.

LEncMpg42.DLL
DSKernel2.DLL

LEncMpg42x.DLL
DSKernel2x.DLL

Yes

LDecH264

LEAD H264 Decoder

Used for decoding H.264 video. H.264 video compression (also known as MPEG-4 Part 10) is commonly used in MP4 and Flash HD files.

H264 and AAC technology may require third party patents. See www.mpegla.com for more information on H264 patent license availability and terms and www.vialicensing.com for more information on AAC patent license availability and terms.

LDecH2643.DLL
DSKernel2.DLL

LDecH2643x.DLL
DSKernel2x.DLL

Yes

LEncH264

LEAD H264 Encoder

Used for encoding H.264 video. H.264 video compression (also known as MPEG-4 Part 10) is commonly used in MP4 and Flash HD files.

H264 and AAC technology may require third party patents. See www.mpegla.com for more information on H264 patent license availability and terms and www.vialicensing.com for more information on AAC patent license availability and terms.

LEncH2644.DLL
DSKernel2.DLL

LEncH2644x.DLL
DSKernel2x.DLL

Yes

LTranscoderH264

LEAD H264 Transcoder

Used for transcoding h.264 video stream in NAL Unit (mpeg2) format to h.264 in ISO (mpeg4) format. LEAD H264 Transcoder filter changes the stream to the h.264 packets format without re-compressing the video stream or the data packets. Converting is fast while retaining the quality of the original stream.

Inserted between the (AVI, OGG or mpeg2) demux and ISO multiliplixer, this filter converts an h.264 stream inside an AVI, OGG or MPEG2 transport file to ISO format without re-compression. The LEAD Multimedia toolkit automatically inserts the filter in this
manner .

LTranscoderH264.DLL
DSKernel2.DLL

LTranscoderH264x.DLL
DSKernel2x.DLL

LCodc26D

LEAD H263 Encoder and LEAD H263 Decoder (DirectShow version)

Used for encoding and decoding H.263 and Sorenson video. The encoder and decoder are in the same DLL. H.263 video compression is commonly used in standard videoconferencing applications. Sorenson video compression is commonly used in Flash FLV files.

You do not need both the DirectShow and VFW versions of this codec. The VFW codec is provided for old applications that cannot use DirectShow encoders. It is recommended that you use the DirectShow version of the codec.

LCodc26D2.DLL
DSKernel2.DLL

LCodc26D2x.DLL
DSKernel2x.DLL

Yes

LCodc26x

LEAD H263 Codec (VFW version)

Used for encoding and decoding H.263 and Sorenson video. The encoder and decoder are in the same DLL. H.263 video compression is commonly used in standard videoconferencing applications. Sorenson video compression is commonly used in Flash FLV files.

You do not need both the DirectShow and VFW versions of this codec. The VFW codec is provided for old applications that cannot use DirectShow encoders. It is recommended that you use the DirectShow version of the codec.

LCodc26x2.DLL
DSKernel2.DLL

LCodc26x2x.DLL
DSKernel2x.DLL

Yes

LDecTheora

LEAD Theora Decoder

Used for decoding Theora video. Theora video compression is popular in Ogg files. Theora is patent-free and has compression comparable to H.263.

LDecTheora.DLL
DSKernel2.DLL

LDecTheorax.DLL
DSKernel2x.DLL

Yes

LEncTheora

LEAD Theora Encoder

Used for encoding Theora video. Theora video compression is popular in Ogg files. Theora is patent-free and has compression comparable to H.263.

LEncTheora.DLL
DSKernel2.DLL

LEncTheorax.DLL
DSKernel2x.DLL

Yes

LCodcCMP

LEAD MCMP/MJPEG Codec, LEAD MCMP/MJPEG Decoder and LEAD MCMP/MJPEG Codec (VFW)

Both the DirectShow and the VFW versions of the MCMP/MJPEG codec are in one DLL. This codec is used for encoding and decoding motion CMP or JPEG video. The compressor is very fast and suitable for capturing or in other applications that require fast compression/decompression.

LCodcCMP2.DLL
DSKernel2.DLL

LCodcCMP2x.DLL
DSKernel2x.DLL

Yes

LCodcCMW

LEAD MCMW Encoder and LEAD MCMW Decoder

This codec is used for encoding and decoding motion CMW (wavelet CMP) video. The encoder and decoder are in the same DLL. This codec uses wavelet compression technology and is a more advanced version of the MJ2K codec.

LCodcCMW3.DLL
LCMW3.DLL
DSKernel2.DLL

LCodcCMW3x.DLL
LCMW3x.DLL
DSKernel2x.DLL

Yes

LCodcJ2K

LEAD MJ2K Encoder and LEAD MJ2K Decoder

This codec is used for encoding and decoding motion JPEG2000 video. The encoder and decoder are in the same DLL.

LCodcJ2K2.DLL
DSKernel2.DLL

LCodcJ2K2x.DLL
DSKernel2x.DLL

Yes

LDecScr

LEAD Screen Capture Decoder (DirectShow version)

DirectShow version of the Screen Capture decoder. Used for decoding video captured from the screen. Lossless codec normally used to compress video coming from the LEAD Screen Capture filter.

You do not need both the DirectShow and VFW versions of this codec. The VFW codec is provided for old applications that cannot use DirectShow encoders. It is recommended that you use the DirectShow version of the codec.

LDecScr2.DLL
DSKernel2.DLL

LDecScr2x.DLL
DSKernel2x.DLL

No

LEncScr

LEAD Screen Capture Encoder (DirectShow version)

DirectShow version of the Screen Capture encoder. Used for encoding video captured from the screen. Lossless codec normally used to compress video coming from the LEAD Screen Capture filter.

You do not need both the DirectShow and VFW versions of this codec. The VFW codec is provided for old applications that cannot use DirectShow encoders. It is recommended that you use the DirectShow version of the codec.

LEncScr2.DLL
DSKernel2.DLL

LEncScr2x.DLL
DSKernel2x.DLL

No

LCodcScr

LEAD Screen Capture Codec (VFW version)

Used for encoding and decoding video captured from the screen. The encoder and decoder are in the same DLL. Lossless codec normally used to compress video coming from the LEAD Screen Capture filter.

You do not need both the DirectShow and VFW versions of this codec. The VFW codec is provided for old applications that cannot use DirectShow encoders. It is recommended that you use the DirectShow version of the codec.

LCodcScr2.DLL
DSKernel2.DLL

LCodcScr2x.DLL
DSKernel2x.DLL

No

LMScrCap

LEAD Screen Capture

Used for capturing video from the screen. Normally, the video is compressed using the LEAD Screen Capture Encoder.

LMScrCap2.DLL
DSKernel2.DLL

LMScrCap2x.DLL
DSKernel2x.DLL

No

LTDicRd

LEAD Dicom Reader

Used for playing back DICOM files. DICOM files are used for storing medical video files. Can be used without any Demultiplexer or Decoder for playing DICOM that do not use MPEG2 compression. Used together with LEAD MPEG2 Program Demultiplexer or LEAD MPEG2 Transport Demultiplexer and LEAD MPEG2 Decoder to play DICOM files with MPEG-2 compression.

LTDicRd2.DLL
DSKernel2.DLL

LTDicRd2x.DLL
DSKernel2x.DLL

Yes

LTDicWrt

LEAD Dicom Writer

Used for creating DICOM files. DICOM files are used for storing medical video files. Can be used without any Multiplexer or Encoder for creating DICOM that do not use MPEG2 compression. Used together with LEAD MPEG2 Multiplexer, LEAD MPEG2 Encoder and LEAD MPEG Audio Encoder to create DICOM files with MPEG-2 compression.

LTDicWrt2.DLL
DSKernel2.DLL

LTDicWrt2x.DLL
DSKernel2x.DLL

Yes

LMACalBk

LEAD Audio Callback Filter

Used for direct access to uncompressed audio samples.

LMACalBk.DLL

LMACalBkx.DLL

Yes

LMAChrs

LEAD Audio Chorus Filter

Used to add the chorus audio effect.

LMAChrs.DLL

LMAChrsx.DLL

No

LMAConv

LEAD Audio Converter Filter

Used to convert the audio sampling rate. This filter is very useful for creating files (eg: FLV) that support only a few audio frequencies.

LMAConv.DLL
DSKernel2.DLL

LMAConvx.DLL
DSKernel2x.DLL

Yes

LMADet

LEAD Audio Detection Filter

Used for detecting sound above a certain level. This filter can be used in together with the LEAD Video Motion Detection Filter to trigger recording when motion or sound is detected, for example, in security monitoring applications.

LMADet2.DLL
DSKernel2.DLL

LMADet2x.DLL
DSKernel2x.DLL

Yes

LMAEcho

LEAD Audio Echo Filter

Used to add the echo audio effect.

LMAEcho.DLL

LMAEchox.DLL

No

LMAFlng

LEAD Audio Flanger Filter

Used to add the flange audio effect.

LMAFlng.DLL

LMAFlngx.DLL

No

LMAMpgCnv

LEAD MPEG Audio Converter

Used to convert MPEG1 Layer 2 audio coming from MPEG-2 Demultiplexer or MPEG-2 splitter to a format suitable for the MPEG Audio Decoder. This filter is now obsolete and is not needed if you use the LEAD MPEG2 Program Demultiplexer or LEAD MPEG2 Transport Demultiplexer for playing MPEG-2 files.

LMAMpgCnv.DLL

LMAMpgCnvx.DLL

No

LMAPhase

LEAD Audio Phase Filter

Used to add the phaser audio effect.

LMAPhase.DLL

LMAPhasex.DLL

No

LMAVol

LEAD Audio Volume Filter

Used to change the volume of sound samples.

LMAVol.DLL

LMAVolx.DLL

No

LMAVUMeter

LEAD Audio VUMeter Filter

Used to add a VU meter to an audio stream.

LMAVUMeter.DLL

LMAVUMeterx.DLL

No

LMVAdd

LEAD Video Add Filter

Used for enhancing night vision or dropping more light on dark sources to clarify objects.

LMVAdd.DLL

LMVAddx.DLL

No

LMVAutoCont

LEAD Video Auto Contrast Filter

Performs color leveling at the luminance (grayscale) level, introducing no color cast.

LMVAutoCont.DLL

LMVAutoContx.DLL

No

LMVAutoInt

LEAD Video Auto Intensity Filter

Performs color leveling on the RGB channel (the sum of the R, G, and B channels), introducing no color cast.

LMVAutoInt.DLL

LMVAutoIntx.DLL

No

LMVAutoLvl

LEAD Video Auto Level Filter

Performs color leveling on the individual R, G and B channels, treating each of the R, G and B channels as a separate entity, introducing no color cast.

LMVAutoLvl.DLL

LMVAutoLvlx.DLL

No

LMVCalBk

LEAD Video Callback Filter

Used for direct access to uncompressed video samples.

LMVCalBk2.DLL
DSKernel2.DLL

LMVCalBk2x.DLL

DSKernel2x.DLL

Yes

LMVClr

LEAD Video Color Filter

Used to change some color attributes (brightness, contrast, hue, saturation) of the video stream.

LMVClr.DLL

LMVClrx.DLL

No

LMVClrRp

LEAD Video Color Replacement Filter

Used to replace a color with another color in the video stream.

LMVClrRp.DLL

LMVClrRpx.DLL

No

LMVCrop

LEAD Video Crop Filter

Used to crop video. The filter reduces the video width or height, eliminating unwanted portions of the video.

LMVCrop2.DLL
DSKernel2.DLL

LMVCrop2x.DLL

DSKernel2x.DLL

Yes

LMVDblck

LEAD Video Deblocking Filter

Performs deblocking on a video stream. Useful for improving the appearance of highly compressed video taken with phones or digital cameras.

LMVDblck.DLL

LMVDblckx.DLL

No

LMVDeitr

LEAD Video Deinterlace Filter (2.0)

Improves the appearance of interlaced video by converting it to progressive scan video.

LMVDeitr2.DLL
DSKernel2.DLL

LMVDeitr2x.DLL

DSKernel2x.DLL

Yes

LMVEdgEnh

LEAD Video Edge Enhance Filter

Performs edge enhancement on a video stream. Useful for improving the appearance of blurry video. For example, video taken with a digital camera or phone enlarged to DVD size becomes blurry. You would use this filter or the LEAD Unsharp Mask Filter to improve its appearance before burning it to DVD.

LMVEdgEnh.DLL

LMVEdgEnhx.DLL

No

LMVUsMsk2

LEAD Video Unsharp Mask Filter

Performs a sharpening effect on a video stream. Useful for improving the appearance of blurry video. For example, video taken with a digital camera or phone enlarged to DVD size becomes blurry. You would use this filter or the LEAD Video Edge Enhance Filter to improve its appearance before burning it to DVD.

LMVUsMsk2.DLL

LMVUsMsk2x.DLL

No

LMVEmbs

LEAD Video Emboss Filter

Used to add the emboss video effect.

LMVEmbs.DLL

LMVEmbsx.DLL

No

LMVFramCtrl

LEAD Frame Rate Controller Filter

Used to change the video frame rate (fps) to a specific frame rate value before starting playback.

LMVFramCtrl2.DLL
DSKernel2.DLL

LMVFramCtrl2x.DLL

DSKernel2x.DLL

Yes

LMVDynRateCtrl

LEAD Dynamic Rate Control Filter

Used to dynamically adjust the video frame rate (by a coefficient) during playback without stopping the graph.

LMVDynRateCtrl.DLL
DSKernel2.DLL

LMVDynRateCtrlx.DLL

DSKernel2x.DLL

Yes

LMVGamma

LEAD Video Gamma Correction Filter

Performs gamma correction to a video stream.

LMVGamma.DLL

LMVGammax.DLL

No

LMVHstg

LEAD Video Histogram Equalize Filter

The LEAD Video Histogram Equalize filter performs Histogram Equalization to a video stream.

LEAD Video Histogram View Filter

The LEAD Video Histogram View filter draws the running histogram of a video stream in its property page.

Both filters are in the same DLL.

LMVHstg2.DLL
DSKernel2.DLL

LMVHstg2x.DLL

DSKernel2x.DLL

Yes

LMVMosc

LEAD Video Mosaic Filter

Adds a mosaic video effect. This effect is useful for protecting the identity of persons or objects in the video.

LMVMosc.DLL

LMVMoscx.DLL

No

LMVMtnDet

LEAD Video Motion Detection Filter

Used for detecting motion in the video. This filter can be used in together with the LEAD Audio Detection Filter to trigger recording when motion or sound is detected, for example, in security monitoring applications.

LMVMtnDet2.DLL
DSKernel2.DLL

LMVMtnDet2x.DLL

DSKernel2x.DLL

Yes

LMVMiscFX

LEAD Video EFX Aging Filter

The LEAD Video EFX Aging filter gives a movie the look and feel of an old style movie (Color or B&W).

LEAD Video EFX Bump Map Filter

The LEAD Video EFX bump map filter embeds the texture of an image or frame into the movie frames.

LEAD Video EFX Dizzy Filter

The LEAD Video EFX Dizzy filter rotates, zooms and blurs movie frames to create a dizziness-like effect.

LEAD Video EFX Glass Tile Filter

The LEAD Video EFX Glass Tile filter will create a stained glass effect on each movie frame.

LEAD Video EFX Lens Filter

The LEAD Video EFX Lens filter adds a fish eye-like effect to the movie.

LEAD Video EFX Maze Filter

The LEAD Video EFX Maze filter distorts the movie into a crystal maze.

LEAD Video EFX Rain Filter

The LEAD Video EFX Rain Filter adds rain drops to the video.

All these filters are in the same DLL.

LMVMiscFX.DLL

LMVMiscFXx.DLL

No

LMVMtnFX

LEAD Video EFX Fire Filter

The LEAD Video EFX fire filter draws flames around a moving object.

LEAD Video EFX Ghost Filter

The LEAD Video EFX Ghost filter makes moving objects invisible.

LEAD Video EFX Hologram Filter

The LEAD Video EFX Hologram filter draws a holographic-like a shadow of a moving object.

LEAD Video EFX Lightning Filter

The LEAD Video EFX Lightning filter draws lightning sparks around a moving object.

LEAD Video EFX Motion Blur Filter

The LEAD Video EFX Motion Blur filter creates a motion blur effect for moving objects. It gives the appearance of a random glow around the motion.

LEAD Video EFX Motion Emboss Filter

The LEAD Video EFX Motion Emboss filter applies an Emboss effect to moving objects.

LEAD Video EFX Motion Mosaic Filter

The LEAD Video EFX Motion Mosaic filter applies a mosaic effect to moving objects.

LEAD Video EFX Motion Scan Filter

The LEAD Video EFX Motion Scan filter will scan one line per frame and draw it to the destination. This gives the effect of distorting the moving objects.

LEAD Video EFX Particles Filter

The LEAD Video EFX Particles filter distorts an object, when it moves, into small particles. It then joins the particles to reform the object when it stops moving.

LEAD Video EFX Predator Filter

The LEAD Video EFX Predator filter detects any object that moves and displaces the background pixels.

LEAD Video EFX Streak Filter

The LEAD Video EFX Streak filter shows moving objects as they are traced in slow motion.

LEAD Video EFX Wave Filter

The LEAD Video EFX Wave filter makes waves around moving objects.

All these filters are in the same DLL.

LMVMtnFX.DLL

LMVMtnFXx.DLL

No

LMVRot

LEAD Video Rotation Filter

Used to rotate the video. Useful when the video was taken sideways.

LMVRot2.DLL
DSKernel2.DLL

LMVRot2x.DLL

DSKernel2x.DLL

Yes

LMVRsz

LEAD Video Resize Filter

Used to resize a video stream.

LMVRsz2.DLL
DSKernel2.DLL

LMVRsz2x.DLL

DSKernel2x.DLL

Yes

LMVTOvLy

LEAD Video Text Overlay Filter

Performs text overlaying on a video stream.

LMVTOvly2.DLL
DSKernel2.DLL

LMVTOvly2x.DLL

DSKernel2x.DLL

Yes

LMVVOvLy

LEAD Video Overlay Filter

Used to overlay video and images to a video stream.

LMVVOvLy2.DLL
DSKernel2.DLL

LMVVOvLy2x.DLL

DSKernel2x.DLL

Yes

LMVIOvLy

LEAD Video Image Overlay Filter

Used to overlay images to a video stream. This is a simpler version of the LEAD Video Overlay Filter.

LMVIOvLy2.DLL
DSKernel2.DLL

LMVIOvLy2x.DLL

DSKernel2x.DLL

Yes

LMVRGBxf

LEAD Video RGB Converter

Used to perform conversion between different RGB formats.

LMVRGBxf.DLL

LMVRGBxfx.DLL

No

LMVYUVxf

LEAD Color Space Converter

Used to perform automatic conversion between different YUV and RGB formats.

LMVYUVxf.DLL

LMVYUVxfx.DLL

No

LTSTLIMGRd

LEAD Still Image Reader**
Used to load raster images supported by LEADTOOLS Raster toolkits.

LTSTLIMGRd2.DLL
DSKernel2.DLL

LTSTLIMGRd2x.DLL

DSKernel2x.DLL

No

LTSTLIMGWrt

LEAD Still Image Writer**

Used to save raster images supported by LEADTOOLS Raster toolkits.

LTSTLIMGWrt2.DLL
DSKernel2.DLL

LTSTLIMGWrt2x.DLL

DSKernel2x.DLL

No

* LEAD DirectShow components now rely on an external object to determine the operation mode: Release or Evaluation. This external object, called DSKernel, should be used to unlock/lock LEAD DirectShow modules.

** Requires additional LEADTOOLS SDK depending on which raster formats are required.

*** It is recommended that you install the x64 runtime in the %windir%\SYSWOW64 folder instead of the %windir%\System32 folder because some development environments (like VS8) will not import references that are placed in the %windir%\System32 folder since that is a 32-bit application.

For more information on the evaluation mechanism and the DSKernel object, please refer to the

Evaluation Mechanism Overview and the LMDSKernel2 Object


LEAD DirectShow Modules Evaluation Mechanism

LEAD DirectShow Modules Evaluation Mechanism

The instantiation of LEAD DirectShow Ò filters is controlled by a central component called the LEAD DirectShow Kernel. This kernel is a COM object that must be registered before any other LEAD DirectShow filter. LEADTOOLS setup installs and registers this object for you during installation. Your application installation program must do the same. Filters, once registered, enter an Evaluation mode for 60 days.

Filters, when they are instantiated, ask the kernel about their state. If the filter is declared to be expired, it will fail to be created.

Filters need to be unlocked, using an interface exposed by the kernel, in order to work in Release mode. For more information on the Evaluation mode, expired filters, and unlocking filters, refer to LMDSKernel2 Object.


LMDSKernel2 Object

Software component that compresses and decompresses audio. Codec stands for COmpressor and DECompressor.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Software component that compresses and decompresses video. Codec stands for Compressor and Decompressor.Compressor and Decompressor.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

LMDSKernel2 Object

The LEAD DirectShow Kernel object is used to manage the state of the LEAD DirectShow modules. LEAD DirectShow modules can take one of the following states:

  • LEADTOOLS MM – Default state for LEADTOOLS Multimedia toolkit installation setup. Modules in this state display a message box but never expire.

  • Evaluation - Modules in the evaluation state behave in one of two ways:

    • A DirectShow filter or audio codec will work for 60 days and then expire. The module displays a nag message whenever it is used.

    • A Video Codec will write a watermark text into the video while compressing or decompressing video.

  • Expired - Modules in the expired state do not launch. They instead display an "expired" message box.

  • Release - Modules in the Release state will work normally, will not display a nag message and will not expire.

Whenever LEAD DirectShow modules are loaded they call the kernel to determine whether they are in the Evaluation, Release, or Expired state, and behave accordingly.

The DSKernel2.dll must be included in the files that are distributed whenever filters/codecs are being used. Retrieve the interface pointer by making a QueryInterface call on the object created by CoCreateInstance.

Interfaces | ILMDSKernel2
CLSID | CLSID CLSID_LMDSKernel2
Executable | DSKernel2.DLL
Header | ILMDSKernel2.h

See Also

ILMDSKernel2 Interface

Using the DSKernel Object

Evaluation Mechanism Overview


ILMDSKernel2 Interface

The ILMDSKernel2 provides access to the functions of the DSKernel. In addition to the methods inherited from IDispatch, the ILMDSKernel2 Interface exposes the following functions:

Functions

ILMDSKernel2::UnlockModule

ILMDSKernel2::LockModules

See Also

Using the DSKernel Object

Evaluation Mechanism Overview

Multimedia Filters and Codecs Licensing - General

LMDSKernel2 Object


ILMDSKernel2::LockModules

#include "ILMDSKernel2.h"

C Syntax | HRESULT ILMDSKernel2_LockModules(pDSKrn, AppID, Flags)
C++ Syntax | HRESULT LockModules(AppID, Flags)
VB Syntax | object.LockModules(AppID As String, Flags As Long) As Long

ILMDSKernel2 *pDSKrn; | /* pointer to an interface */
BSTR AppID; | /* application ID that is doing the calling */
long Flags; | /* flags */

Locks all modules of the same AppID that were unlocked using ILMDSKernel2::UnlockModule.

Parameter | Description
pDSKrn | Pointer to an ILMDSKernel2 interface.
AppID | The application ID. This cannot be NULL (empty).
Flags | Flags that specify the level at which locking will be performed. For a list of possible values, refer to LockFlagsConstants2.

Returns

S_OK | The function ran successfully.
<> S_OK | An error occurred. Refer to the Error Codes or the HRESULT error codes in the DirectShow documentation.

Comments

You must call ILMDSKernel2::LockModules:

  • When the application terminates, if unlocking was performed at the application level using LOCK_APP_ONCE.

  • When uninstalling the application, if unlocking was performed at the computer level using LOCK_COMPUTER or LOCK_APP_PATH.

Required DLLs and Libraries

DSKernel2.dll

See Also

Elements:

ILMDSKernel2::UnlockModule

Example

For an example, refer to Using the DSKernel Object.


ILMDSKernel2::UnlockModule

#include "ILMDSKernel2.h"

C Syntax | HRESULT ILMDSKernel2_UnlockModule(pDSKrn, Key, Flags, AppID)
C++ Syntax | HRESULT UnlockModule(BSTR Key, long Flags, BSTR AppID)
VB Syntax | object.UnlockModule(Key As String, Flags As Long, AppID As String) As Long

ILMDSKernel2 *pDSKrn; | /* pointer to an interface */
BSTR Key; | /* serial number */
long Flags; | /* flags */
BSTR AppID; | /* calling application ID or path */

Unlocks a specific module, or group of modules (depending on the serial number, or Key).

Parameter

Description

pDSKrn

Pointer to an ILMDSKernel2 interface.

Key

A string that represents the module serial number. This parameter cannot be NULL (empty).

Flags

One of the UnLockFlagsConstants2 enumeration values that specify the level at which the unlocking operation will be performed.

AppID

  • If Flags contains UNLOCK_APP_ONCE or UNLOCK_COMPUTER: The application ID; a unique ID of the calling application. The caller is responsible for uniqueness of this ID. It is recommended to use the full path of the application.
  • If Flags contains UNLOCK_APP_PATH: The application full path of the application (the long version, not the short 8.3 version of the path).

This parameter cannot be NULL (empty).

Returns

S_OK | The function ran successfully.
<> S_OK | An error occurred. Refer to the Error Codes or the HRESULT error codes in the DirectShow documentation.

Comments

Use this function to change the state for the modules that are unlocked to Release. Please note the following:

  • The Key is a unique module serial number that must be purchased from LEAD.

  • It may be necessary to call the function several times to unlock several toolkits (or filters/codecs).

  • Each module has its own key, but some keys can unlock more than one filter/module.

  • The AppID is used to uniquely identify the calling application. The AppID must be set to the application path if you unlock using UNLOCK_APP_PATH.

  • The UNLOCK_APP_ALWAYS has been deprecated. Currently, it has the same effect as UNLOCK_APP_ONCE and support for it might be dropped in the future. You should use UNLOCK_APP_PATH if you want to unlock a particular app.

Required DLLs and Libraries

DSKernel2.dll

See Also

Elements:

ILMDSKernel2::LockModules

Example

For an example, refer to Using the DSKernel Object.


LockFlagsConstants2 Enumeration Constants

typedef enum LockFlagsConstants2 Constants

{

LOCK_COMPUTER = 0x01,

LOCK_APP = 0x02,

LOCK_APP_PATH = 0x04,

} LockFlagsConstants2;

The LockFlagsConstants2 constants define the level at which locking will be performed.

Constant Description

Constant | Description
LOCK_COMPUTER | [0x01] Use this flag to lock the module at the computer level. This flag prevents all applications that do not unlock the module from using it.
LOCK_APP | [0x02] Use this flag to lock the module at the application level for the current application instance.
LOCK_APP_PATH | [0x04] Use this flag to lock the an application that was unlocked using UNLOCK_APP_PATH. You should lock this application when you uninstall it.

See Also

ILMDSKernel2::UnlockModule

ILMDSKernel2::LockModules


UnlockFlagsConstants2 Enumeration Constants

#include "ILMDSKernel2.h"

C Syntax | HRESULT ILMDSKernel2_LockModules(pDSKrn, AppID, Flags)
C++ Syntax | HRESULT LockModules(AppID, Flags)
VB Syntax | object.LockModules(AppID As String, Flags As Long) As Long

ILMDSKernel2 *pDSKrn; | /* pointer to an interface */
BSTR AppID; | /* application ID that is doing the calling */
long Flags; | /* flags */

Locks all modules of the same AppID that were unlocked using ILMDSKernel2::UnlockModule.

Parameter | Description
pDSKrn | Pointer to an ILMDSKernel2 interface.
AppID | The application ID. This cannot be NULL (empty).
Flags | Flags that specify the level at which locking will be performed. For a list of possible values, refer to LockFlagsConstants2.

Returns

S_OK | The function ran successfully.
E_APP_NOT_FOUND | [0x80050019] The application was not found (returned when you tried to lock using LOCK_APP_PATH). Check and make sure the application path is the same as the one used during ILMDSKernel2::UnlockModule
<> S_OK | An error occurred. Refer to the Error Codes or the HRESULT error codes in the DirectShow documentation.

Comments

You must call ILMDSKernel2::LockModules:

  • When the application terminates, if unlocking was performed at the application level using LOCK_APP_ONCE.

  • When uninstalling the application, if unlocking was performed at the computer level using LOCK_COMPUTER or LOCK_APP_PATH.

Required DLLs and Libraries

DSKernel2.dll

See Also

Elements:

ILMDSKernel2::UnlockModule

Example

For an example, refer to Using the DSKernel Object.


Using the DSKernel Object

C++ Example

These examples show you how to unlock the multimedia toolkit using the DSKernel object.

1.

To create the DSKernel object, use the Win32 CoCreateInstance function:

#include "ILMDSKernel2.h"

ILMDSKernel2* pKernel = NULL;

HRESULT hr = CoCreateInstance(CLSID_LMDSKernel2, NULL, CLSCTX_INPROC_SERVER, IID_ILMDSKernel2, (void**) &pKernel);

2. | To use the unlock method, use the following code:
 | a. | To unlock the multimedia toolkit at the application level, use the following code before creating or using any multimedia objects:

pKernel->UnlockModule(L"LTMM_SERIAL_NUMBER", UNLOCK_APP_ONCE, L"Application ID");

b.

To unlock the MPEG4 encoder at the application level, use the following code:

pKernel->UnlockModule(L"MPEG4_encoder_serial_number", UNLOCK_APP_ONCE, L"Application ID");

c.

To always unlock the multimedia toolkit for a particular application, you can use the following code during setup:

pKernel->UnlockModule(L"LTMM_SERIAL_NUMBER", UNLOCK_APP_PATH, L"c:\\Application\\full\\path.exe");

3. | To use the lock method, use the following code:
 | a. | To reverse the effects of unlocking the multimedia toolkit, and any modules, filters and codecs at the application level (case 'a'. and 'b.' above) and clean up any allocated memory, use the following code before exiting your app:

pKernel->LockModules(L"Application ID", LOCK_APP);

b.

To reverse the effects of unlocking all the filters and modules for a particular application (case 'c' above) and clean up any allocated memory, use the following code before uninstalling your app:

pKernel->LockModules(L"c:\\Application\\full\\path.exe", LOCK_APP_PATH);

3. | Free the DSKernel object as follows:
 | a. | pKernel->Release();

VB Example

1.

Before you can create the DSKernel object, add the DSKernel reference to the project using the "Project->References..." menu item.

2.

Declare the DSKernel object as follows:

Dim pKernel As LMDSKernel2

3.

Create the DSKernel object as follows:

Set pKernel = New LMDSKernel2

4. | To use the unlock method, use the following code:
 | a. | To unlock the multimedia toolkit at the application level, use the following code before or using any multimedia objects:

pKernel.UnlockModule "LTMM_SERIAL_NUMBER", UNLOCK_APP_ONCE, "Application ID"

b.

To unlock the MPEG4 encoder at the application level, use the following code:

pKernel.UnlockModule "MPEG4_encoder_serial_number", UNLOCK_APP_ONCE, "Application ID"

c.

To always unlock the multimedia toolkit for a particular application, you can use the following code during setup:

pKernel.UnlockModule "LTMM_SERIAL_NUMBER", UNLOCK_APP_PATH, "c:\Application\full\path.exe"

5. | To use the lock method, use the following code:
 | a. | To reverse the effects of unlocking the multimedia toolkit, and any modules, filters and codecs at the application level (case 'a'. and 'b.' above) and clean up any allocated memory, use the following code before exiting your app:

pKernel.LockModules "Application ID", LOCK_APP

b.

To reverse the effects of unlocking all the filters and modules for a particular application (case 'c' above) and clean up any allocated memory, use the following code before uninstalling your app:

pKernel.LockModules "c:\Application\full\path.exe", LOCK_APP_PATH

6.

Free the DSKernel object as follows:

Set pKernel = Nothing

Notes and comments

A typical application would unlock the multimedia toolkit and several video filters and codecs at the application level. You should do all this unlocking before using any multimedia objects or any of these filters and codecs. You achieve this by calling UnlockModule one or more times.

DSKernel allocates memory and storage resources during the unlocking process. To clean that, you should call LockModules before exiting the app.

If you used the same application ID (as you should) when you unlocked all the modules, one call to LockModules is enough to free the memory allocated for all the modules.


LEAD H.264 Video Decoder Module

Also known as a decompressor, this is a module or algorithm to decompress data.decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD H.264 Video Decoder

The LEAD H.264 Video Decoder contains DirectShow Ò filters and codecs that allow H.264 files to be played. The LEAD H.264 Video Decoder contains the following components:

Video Decoder

LEAD H.264 Video Decoder

LEAD H.264 Video Decoder DMO

Demultiplexers

LEAD ISO Demultiplexer

LEAD MPEG-2 Program Demultiplexer

Audio Decoder

LEAD AAC Audio Decoder

You need to unlock the LEAD H.264 Video Decoder to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.


LEAD H.264 Video Encoder Module

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. compressor , this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder .

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEAD H.264 Video Encoder

The LEAD H.264 Standard Video Encoder contains DirectShow Ò filters and codecs that allow files to be converted to H.264 files. The LEAD H.264 Standard Video Encoder Module contains the following components:

Video Encoder

LEAD H.264 Video Encoder

LEAD H.264 Video Encoder DMO

LEAD H.264 Video Encoder Advanced DMO

Multiplexers

LEAD ISO Multiplexer

Audio Encoder

LEAD AAC Audio Encoder

You need to unlock the LEAD H.264 Standard Video Encoder to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.

Profiles

For a list of supported profiles see LEAD H264 Codecs Profile Suppport


LEAD MPEG-2 Video Decoder Module

Also known as a decompressor, this is a module or algorithm to decompress data.decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

LEAD MPEG-2 Video Decoder

The LEAD MPEG-2 Video Decoder contains DirectShow Ò filters and codecs that allow MPEG-2 files to be played. The LEAD MPEG-2 Video Decoder contains the following components:

Video Decoders

LEAD MPEG-2 Video Decoder

Demultiplexers

LEAD MPEG-2 Program Demultiplexer

You need to unlock the LEAD MPEG-2 Video Decoder to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.


LEADMPEG-2 Video Encoder Module

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEADMPEG-2 Video Encoder

The LEAD MPEG-2 Video Encoder contains DirectShow Ò filters and codecs that allow files to be converted to MPEG-2 files. The LEAD MPEG-2 Video Encoder contains the following components:

Video Encoders

LEAD MPEG-2 Video Encoder

Multiplexers

LEAD MPEG-1 Multiplexer

LEAD MPEG-2 Multiplexer

Audio Encoders

LEAD AC3 Audio Encoder

LEAD MPEG Audio Encoder

You need to unlock the LEAD MPEG-2 Video Encoder to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.


LEAD MPEG-4 Video Decoder Module

LEAD MPEG-4 is a DirectShow filter for compressing/decompressing video data usingthe MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths, from low bandwidth to broadband.

Also known as a decompressor, this is a module or algorithm to decompress data.decompressor, this is a module or algorithm to decompress data.

Also known as a decoder, this is a module or algorithm to decompress data.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-4 Video Decoder

The LEAD MPEG-4 Video Decoder contains DirectShow Ò filters and codecs that make it possible to play MPEG-4 files. The LEAD MPEG-4 Video Decoder contains the following components:

Video Decoder

LEAD MPEG-4 Video Decoder

Demultiplexers

LEAD ISO Demultiplexer

LEAD MPEG-2 Program Demultiplexer

Audio Decoder

LEAD AAC Audio Decoder

You need to unlock the LEAD MPEG-4 Video Decoder to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.


LEAD MPEG-4 Video Encoder Module

LEAD MPEG-4 is a DirectShow filter for compressing/decompressing video data usingthe MPEG-4 (ISO/IEC 14496-2) standard. MPEG-4 is suitable for a wide range of bandwidths, from low bandwidth to broadband.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEAD MPEG-4 Video Encoder

The LEAD MPEG-4 Video Encoder contains DirectShow Ò filters and codecs that allow files to be converted to MPEG-4 files. The LEAD MPEG-4 Video Encoder contains the following components:

Video Encoders

LEAD MPEG-4 Video Encoder

Multiplexers

LEAD ISO Multiplexer

Audio Encoders

LEAD AAC Audio Encoder

You need to unlock the LEAD MPEG-4 Video Encoder to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview..


Demo Programs

The portion of the file holding the audio data. The audio data might be compressed to save disk space. The data has to be decompressed using an audio decompressor before you can play (hear) it.

oftware component which decompresses audio. It must be designed to work with ACM or DirectShow . Note that different compression methods require different decompressors. There is no universal decompressor capable of decoding all compressed streams.

DV stands for Digital Video and has been defined in "Specification of Consumer-use Digital VCRs" (aka the Blue Book).

Demo Programs

The following demo programs are installed in separate EXAMPLES subdirectories (such as C:\Program Files\LEAD Technologies\LEADTOOLS 17.0\Examples\Ltmm\cpp\capture). You can specify these during

Note:

You can run the example programs on your system by clicking the appropriate buttons in online help. If you try to run an example program that is not on your system, an error message will appear.

C Demos

Demo name | EXE name | Description
cCapture | cCapture.exe | Demonstrates the capture and save to file capabilities of the Multimedia toolkit in C.
cPlayer | cPlayer.exe | Demonstrates the play files from disk capabilities of the Multimedia toolkit in C.
cConvert | cConvert.exe | Demonstrates the file to file conversion capabilities of the Multimedia toolkit in C.
cCnvMem | cCnvMem.exe | Demonstrates the memory to file conversion capabilities of the Multimedia toolkit in C.
cGenAvi | cGenAvi.exe | Demonstrates how to create a file by generating every frame using the Multimedia toolkit in C.
cConvertToMobile | cConvertToMobile.exe | Demonstrates how to create video and audio files that would run on mobile devices like iPod™, IPhone™, PSP™, Zen™, Zune™, and SmartPhones in C.
cH264Transcode | cH264Transcoder | Demonstrates how to transcode an h.264 stream to an ISO format, without performing decoding and re-encoding. This provides a faster conversion method for some formats in C

C++ Demos

Demo name | EXE name | Description
Capture | Capture.exe | Demonstrates the capture and save to file capabilities of the Multimedia toolkit in C++.
Player | Player.exe | Demonstrates the play files from disk capabilities of the Multimedia toolkit in C++.
Callback | Callback.exe | A simple player demo that demonstrates the use of the Video Callback Filter of the Multimedia toolkit in C++. The Video Callback Filter is inserted automatically as a video processor when the demo starts. You can choose one of the sample effects listed in the "Effects" menu. Note: You must install the LEADTOOLS Imaging Pro SDK (or higher) to build this demo.
Convert | Convert.exe | Demonstrates the file to file conversion capabilities of the Multimedia toolkit in C++.
CnvMem | CnvMem.exe | Demonstrates the memory to file conversion capabilities of the Multimedia toolkit in C++.
CnvWM | CnvWM.exe | Shows how to manage Windows Media profiles (creating custom profiles) in the Multimedia toolkit in C++.
DVR | DVR.exe | Demonstrates how to capture using ltmmCapture and then use the DVRSink interface to set the DVR buffer folder settings. Also, the ltmmPlay control is used to read from the DVR buffer file.
GenAvi | GenAvi.exe | Demonstrates how to create a file by generating every frame using the Multimedia toolkit in C++.
TVViewer | TVViewer.exe | Demonstrates how to use the IltmmTVTuner interface of the Multimedia toolkit in C++.
AudioReplace | AudioReplace.exe | Demonstrates how to change the audio stream in a media file using the capabilities of the convert object of the multimedia toolkit, in C++.
AVDetection | AVDetection.exe | Demonstrate the usage of the LEAD Audio Detection filter and LEAD Video Motion Detection filter using live sources for audio and video, in C++.
CallbackA | AudCalBk.exe | Demonstrates the use of the Audio Callback Filter of the Multimedia toolkit, in C++. The Audio Callback Filter is inserted automatically as an audio processor. The demo shows how to use the audio callback filter to change the volume of the audio stream.
CaptureDICOM | CaptureDicom.exe | Demonstrates capturing from a live video source to a DICOM file using the capabilities of the multimedia toolkit and the LEAD DICOM Writer Filter, in C++.
CnvDV | cnvdv.exe | Demonstrates converting media files to the DV format writing the output directly to the device (DV camera), in C++.
ConcatAndResize | ConcatAndResize.exe | Demonstrates the joining process of media files of different formats using the capabilities of the multimedia toolkit, in C++. The demo allows resizing of the video streams in addition to providing the ability to choose the audio and video compressors for the output stream.
ConcatSameSize | ConcatSameSize.exe | Demonstrates the joining process of media files of the same format without recompression, using the capabilities of the multimedia toolkit, in C++.
DVDAuthor | DVDAuthor.exe | Demonstrates creating DVD images using the capabilities of the multimedia toolkit (with LEAD DVD Writer), in C++. The source media files can be of any supported format.
DVDBurner | DVDBurner.exe | Demonstrates burning DVD images and ISO files to DVDs using the capabilities of the LEAD DVD Burner, in C++.
MediaInfo | MediaInfo.exe | Demonstrates the usage of the media information object of the multimedia toolkit, which provides comprehensive information about all streams in a media file, in C++.
MPEG2Transport | MPEG2Transport.exe | Demonstrates playback of MPEG-2 Transport files from a file or UDP stream. Also shows how to handle KLV metadata in C++. Additionally, you can control the capture buffering using the new DVR Sink interface.
NetServer | NetServer.exe | Demonstrates creating a basic video conferencing server using the capabilities of the multimedia toolkit with the LEADTOOLS Video Streaming Module, in C++.
NetClient | NetClient.exe | Demonstrates creating a basic video conferencing client using the capabilities of the multimedia toolkit with the LEADTOOLS Video Streaming Module, in C++.
Restreamer | Restreamer.exe | Streaming MPEG-2 Transport files to a UDP or TCP/IP port, in C++.
VOverlay | VOverlay.exe | Demonstrates overlaying images over video using the capabilities of the multimedia toolkit and the LEAD Video Overlay Filter, in C++. Note: The filter has more capabilities than what the demo shows.
ConvertToMobile | ConvertToMobile.exe | Demonstrates how to create video and audio files that would run on mibile devices like iPod™, IPhone™, PSP™, Zen™, Zune™, and SmartPhones in C.
H264Transcoder | H264Transcoder.exe | Demonstrates how to transcode an h.264 stream to an ISO format, without performing decoding and re-encoding. This provides a faster conversion method for some formats in C

Visual Basic Demos

Demo name | EXE name | Description
vbCapture | vbCapture.exe | Demonstrates the capture and save to file capabilities of the Multimedia toolkit in VB.
vbPlayer | vbPlayer.exe | Demonstrates the play files from disk capabilities of the Multimedia toolkit in VB.
vbConvert | vbConvert.exe | Demonstrates the file to file conversion capabilities of the Multimedia toolkit in VB.
vbCnvMem | vbCnvMem.exe | Demonstrates the memory to file conversion capabilities of the Multimedia toolkit in VB.
vbCnvWM | vbCnvWM.exe | Shows how to manage Windows Media profiles (creating custom profiles) in the Multimedia toolkit in VB.
DVR | DVR.exe | Demonstrates how to capture using ltmmCapture and then use the DVRSink interface to set the DVR buffer folder settings. Also, the ltmmPlay control is used to read from the DVR buffer file.
vbGenAvi | vbGenAvi.exe | Demonstrates how to create a file by generating every frame using the Multimedia toolkit in VB.
vbTVViewer | vbTVViewer.exe | Demonstrates how to use the IltmmTVTuner interface of the Multimedia toolkit in VB.
vbAudioReplace | vbAudioReplace.exe | Demonstrates how to change the audio stream in a media file using the capabilities of the convert object of the multimedia toolkit., in VB.
vbCallback | vbCallback.exe | A simple player demo that demonstrates the use of the Video Callback Filter of the Multimedia toolkit in VB. The Video Callback Filter is inserted automatically as a video processor when the demo starts. You can choose one of the sample effects listed in the "Effects" menu. Note: You must install the LEADTOOLS Imaging Pro SDK (or higher) to build this demo.
vbCallbackA | vbCallbackA.exe | Demonstrates the use of the Audio Callback Filter of the Multimedia toolkit. The Audio Callback Filter is inserted automatically as an audio processor. The demo shows how to use the audio callback filter to change the volume of the audio stream.
vbConcatAndResize | vbConcatAndResize.exe | Demonstrates the joining process of media files of different formats using the capabilities of the multimedia toolkit, in VB. The demo allows resizing of the video streams in addition to providing the ability to choose the audio and video compressors for the output stream.
vbConcatSameSize | vbConcatSameSize.exe | Demonstrates the joining process of media files of the same format without recompression, using the capabilities of the multimedia toolkit, in VB.
vbDVDAuthor | vbDVDAuthor.exe | Demonstrates creating DVD images using the capabilities of the multimedia toolkit (with LEAD DVD Writer), in VB. The source media files can be of any supported format.
vbDVDBurner | vbDVDBurner.exe | Demonstrates burning DVD images and ISO files to DVDs using the capabilities of the LEAD DVD Burner, in VB.
vbMediaInfo | vbMediaInfo.exe | Demonstrates the usage of the media information object of the multimedia toolkit, which provides comprehensive information about all streams in a media file, in VB.
vbMPEG2Transport | vbMPEG2Transport.exe | Demonstrates playback of MPEG-2 Transport files from a file or UDP stream. Also shows how to handle KLV metadata in VB. Additionally, you can control the capture buffering using the new DVR Sink interface.
vbMtnDet | vbMtnDet.exe | Demonstrate the usage of the LEAD Video Motion Detection filter using live source for video, in VB.
vbNetServer | vbNetServer.exe | Demonstrates creating a basic video conferencing server using the capabilities of the multimedia toolkit with the LEADTOOLS Video Streaming Module, in VB.
vbNetClient | vbNetClient.exe | Demonstrates creating a basic video conferencing client using the capabilities of the multimedia toolkit with the LEADTOOLS Video Streaming Module, in VB.
vbVOverlay | vbVOverlay.exe | Demonstrates overlaying images over video using the capabilities of the multimedia toolkit and the LEAD Video Overlay Filter, in VB. Note: The filter has more capabilities than what the demo shows.
vbConvertToMobile | vbConvertToMobile.exe | Demonstrates how to create video and audio files that would run on mibile devices like iPod™, IPhone™, PSP™, Zen™, Zune™, and SmartPhones in C.
vbH264Transcoder | vbH264Transcoder.exe | Demonstrates how to transcode an h.264 stream to an ISO format, without performing decoding and re-encoding. This provides a faster conversion method for some formats in C

Builder Demos

Demo name | EXE name | Description
Capture | CaptureB5.exe | Demonstrates the capture and save to file capabilities of the Multimedia toolkit in C++ (using Borland Builder).
Player | PlayerB5.exe | Demonstrates the play files from disk capabilities of the Multimedia toolkit in C++ (using Borland Builder).

Delphi Demos

Demo name | EXE name | Description
Capture | CaptureD5.exe | Demonstrates the capture and save to file capabilities of the Multimedia toolkit in Delphi.
Player | PlayerD5.exe | Demonstrates the play files from disk capabilities of the Multimedia toolkit in Delphi.

C#.NET Demos

Demo name | EXE name | Description
DrawOnVideo | Source only. | Demonstrates how to draw objects on a video using the Multimedia toolkit and LEAD Raster objects, in C#.NET.
DVR | csDVR.exe | Demonstrates how to capture using ltmmCapture and then use the DVRSink interface to set the DVR buffer folder settings. Also, the ltmmPlay control is used to read from the DVR buffer file.
GenerateAVI | Source only. | Demonstrates how to create a file by generating every frame using the Multimedia toolkit in C#.NET.
MPEG2Transport | CSMPEG2Transport.exe | Demonstrates playback of MPEG-2 Transport files from a file or UDP stream. Also shows how to handle KLV metadata in C#.NET.
VideoConferencing | Source only. | Demonstrates creating a basic video conferencing application (server and client) using the capabilities of the multimedia toolkit with the LEADTOOLS Video Streaming Module, in C#.NET.
ConvertToMobile | ConvertToMobile.exe | Demonstrates how to create video and audio files that would run on mibile devices like iPod™, IPhone™, PSP™, Zen™, Zune™, and SmartPhones in C.
H264Transcoder | CSH264Transcoder.exe | Demonstrates how to transcode an h.264 stream to an ISO format, without performing decoding and re-encoding. This provides a faster conversion method for some formats in C

VB.NET Demos

Demo name | EXE name | Description
Capture | Capture.exe Note: Not directly in the Bin folder. | Demonstrates the capture and save to file capabilities of the Multimedia toolkit in VB.NET.
ConcatSameSize | ConcatSameSize.exe Note: Not directly in the Bin folder. | Demonstrates the joining process of media files of the same format without recompression, using the capabilities of the multimedia toolkit in VB.NET.
Convert | Convert.exe Note: Not directly in the Bin folder. | Demonstrates the file to file conversion capabilities of the Multimedia toolkit in VB.NET.
DrawOnVideo | Source only. | Demonstrate how to draw objects on a video using the Multimedia toolkit and LEAD Rastor objects in VB.NET.
DVDAuthor | DVDAuthor.exe Note: Not directly in the Bin folder. | Demonstrates creating DVD images using the capabilities of the multimedia toolkit (with LEAD DVD Writer), in VB.NET. The source media files can be of any supported format.
DVR | vbDVR.exe | Demonstrates how to capture using ltmmCapture and then use the DVRSink interface to set the DVR buffer folder settings. Also, the ltmmPlay control is used to read from the DVR buffer file.
GenerateAVI | Source only. | Demonstrates how to create a file by generating every frame using the Multimedia toolkit in C++.
MPEG2Transport | VBMPEG2Transport | Demonstrates playback of MPEG-2 Transport files from a file or UDP stream. Also shows how to handle KLV metadata in VB.NET. Additionally, you can control the capture buffering using the new DVR Sink interface.
Player | Player.exe Note: Not directly in the Bin folder. | Demonstrates the play files from disk capabilities of the Multimedia toolkit in VB.NET.
VideoConferencing | Source only. | Demonstrates creating a basic video conferencing application (server and client) using the capabilities of the multimedia toolkit with the LEADTOOLS Video Streaming Module, in VB.NET.
ConvertToMobile | VBConvertToMobile.exe | Demonstrates how to create video and audio files that would run on mibile devices like iPod™, IPhone™, PSP™, Zen™, Zune™, and SmartPhones in C.
H264Transcoder | VBH264Transcoder.exe | Demonstrates how to transcode an h.264 stream to an ISO format, without performing decoding and re-encoding. This provides a faster conversion method for some formats in C

See Also:

Introduction

Microsoft Code Snippet Picker

LEADTOOLS Support Forums


LEAD MPEG-2 Encoder (2.0)

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-2 Encoder (2.0)

The LEAD MPEG-2 Encoder Filter is a DirectShow filter for compressing video data using the MPEG-2 (ISO/IEC 13818-2) or MPEG-1 (ISO 11172-2) standard. The LEAD MPEG-2 Decoder is a DirectShow filter for decompressing MPEG-2 video data.

MPEG-1 is the older standard and achieves higher compression than MPEG-2 (but at lower quality). MPEG-1 compression is used in VCD (video on CD).

MPEG-2 is the newer standard and has lower compression than MPEG-1 but the quality is much better than MPEG-1. MPEG-2 is a high quality video compression algorithm and is best suited for applications with higher bit rates or high-bandwidth usage. The most common applications include DVD-Videos, SVCD and digital TVs. The compressed video data can be stored inside MPEG, AVI, or Ogg files with the option of saving the file with or without the audio data.

The compression options for the LEAD MPEG-2 Encoder can be set manually through the encoder property page. The compression options can also be set programmatically using the ILMMPEG2Encoder interface.

Filter Interfaces | ILMMPEG2Encoder , ILMMCommon
Interface ID | IID_ILMMPEG2Encoder
Input Media Types | Type: MEDIATYPE_Video Subtypes: MEDIASUBTYPE_YV12 MEDIASUBTYPE_YUY2 MEDIASUBTYPE_UYVY MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB24
Output Media Types | Type: MEDIATYPE_Video Subtype: MEDIASUBTYPE_MPEG2_VIDEO MEDIASUBTYPE_LMPG2
Filter CLSID | CLSID_LMMPEG2Encoder
Property Page CLSID | CLSID_LMMPEG2EncoderProperty
Executable | LENCMPG2.dll, DSKernel2.dll
Filter category | CLSID_VideoCompressorCategory
Header | ILEncMPEG2_2.h

Platforms

Win32, x64

Levels and Profiles

A MPEG-2 encoder capable of handling all resolutions, bit rates and frame rates up to HDTV would be too expensive for many simpler applications or hardware implementations. Therefore, the MPEG-2 standard was subdivided into levels and profiles. The MPEG-2 standard allows for four source formats, or Levels, to be coded; ranging from Limited Definition (todays VCR quality), to full HDTV, each with a range of bit rates. In addition to this flexibility in source formats, MPEG-2 allows for different Profiles. Each profile offers a collection of compression tools that together make up the coding system. A different profile means that a different set of compression tools is available. The four levels, including frame size and maximum bit rate, are defined in the following table:

Level | Maximum Frame size (PAL / NTSC) | Maximum Bitrate | Significance
Low | 352x288 352x240 | 4 Mb/s | CIF, consumer tape equiv.
Main | 720x576 720x480 | 15 Mb/s | ITU-R 601, Studio TV
High 1440 | 1440x1152 1440x1080 | 60 Mb/s | 4x 601, consumer HDTV
High | 1920x1152 1920x1080 | 80 Mb/s | PROD. SMPTE

Most of today's work is done at the Main Level, which is designated for standard video. Within this level, the Main profile is used for many applications. The MPEG-2 encoder will automatically adjust the level if the video being encoded is bigger than the maximum size for the current level.

I Frames and P Frames

To increase the compression performance, MPEG-2 uses Temporal Compression. Temporal compression is achieved by encoding only the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An MPEG-2 video stream is comprised of I Frames, B Frames and P Frames:

  • I: (Intraframe) frames. These are encoded without reference to another frame to allow for random access.
  • P: (Predictive) frames are encoded using the previous I (or P) frame as reference. P frames are compressed more than I frames.
  • B: (Bi-directional) frames are encoded using both previous and next I (or P) frames as reference and they are compressed more than both I, and P frames.

To increase the compression of MPEG-2, more B and P frames should be used. You do so by adjusting the "I Frame" and "P Frame" options on the Encoder property page:

  • I Frame: represents the distance between I frames. All the frames between successive I frames are P or B frames.
  • P Frame: represents the distance between P frames. All the frames between successive frames are B frames.

For example if I frame is 12, and P Frame is 3, then video stream looks like the following:

I B B P B B P B B P B B I B B P B B P B B P B B ..

The distance between I frames must be a multiple of the distance between the P frames. The LEAD MPEG-2 Encoder will automatically adjust these values to preserve this relationship.

LEAD MPEG-2 Encoder User Interface

This filter is included as part of the following modules:

LEAD MPEG-2 Video Codec Module


Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

DV stands for Digital Video and has been defined in "Specification of Consumer-use Digital VCRs" (aka the Blue Book).

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Phase Alternating Line - a television broadcast color encoding system used in Europe, the Middle East, India, China, Southeast Asia, Australia, and most of Africa.

Available in LEADTOOLS Multimedia toolkits.

LEAD MPEG-2 Encoder User Interface (2.0)

The Encoder property page provides a user interface for changing the filter's attributes.

Changes will be applied only when filter’s state is stopped with the ability to set them permanently by selecting Apply or OK, or abandoning them by selecting Cancel. Positioning the mouse pointer over a control displays the general information for that control. The property page is shown in the figure below:

Control

Description

Constant Bitrate radio button

(Fixed output rate): If this radio button is selected, the compression level is constant and the storage requirements are easily predicted. This may affect the video quality of more dynamic scenes and pictures with lots of detail. The bit rate describes the amount of data used or transferred per second. It is directly related to the compression level. For example, a DV video (approximately 1:5 compression) would need 25 Mbit (3.12MB) per second. Using MPEG-2 compression at bit rate = 6 Mbit/sec, the compression level will be 1:27. Therefore, the higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bitrate edit box. For both Variable Bitrate and Fixed Bitrate, the video quality also depends on the MPEG-2 profile used (4:2:2 or 4:2:0) and the distance between I frames and P frames.

Bitrate edit box

(Constant bitrate only) If the Constant Bitrate radio button is selected, this edit box can be used to set the bitrate in Kbits/sec.

Use Default Bitrate check box

(Constant bit rate only) If this is checked, the bitrate will be set to a default value in kbits/sec. Each output type (Custom MPEG-1, VCD, Custom MPEG-2, SVCD, DVD 1 and DVD 2) has its own default bitrate. This is useful for correcting a bitrate that was changed accidentally.

Constant Quality radio button

(Variable bit rate and Fixed video quality). If this radio button is selected the compression rate varies with scene content. For more dynamic scenes a high bit rate (low compression) is used to maintain consistent video quality. Setting a quality value in the Quality drop down box can further control the quality.

Quality Factor drop-down list box

(Constant quality only) Sets the quality value for the encoded video when the Constant Quality radio button is selected. A value of 1 gives the best quality and the largest video size. A value of 31 gives the smallest file size with the lowest video quality. The default is 4.

Variable Bitrate radio button

If this radio button is selected, the compression rate varies with scene content. The Minimum Quality Factor, Maximum Quality Factor, Average Bitrate and Maximum Bitrate will control the video quality. The video quality will vary between the Minimum and Maximum quality factors, and the rate will not exceed the Maximum Bitrate. This option should be used when good video quality is required at a certain bit rate. (A common use for this is DVD creation). You achieve the best compression-quality performance when you use this option.

For this option, the compressor increases or decreases the quality factor automatically to maintain the highest quality at the desired bit rate, specified in the Average Bitrate and the Maximum Bitrate edit boxes. However, the quality factor will not go below the Minimum Quality factor or exceed the Maximum Quality factor.

Min Quality Factor drop-down list box

(Variable bitrate only) Sets the minimum quality value the MPEG-2 encoder should use. A value of 1 gives the best quality and the biggest video size. A value of 31 gives the smallest file size with low video quality. This quality factor will be the starting quality factor for the MPEG-2 compressor. This value should be always smaller than Maximum Quality Factor.

Max Quality Factor drop-down list box

(Variable bitrate only) Sets the maximum quality value the MPEG-2 encoder should use. A value of 1 gives the best quality and the biggest video size. A value of 31 gives the smallest file size with low video quality. This value should be always larger than Minimum Quality Factor.

Max Bitrate edit box

(Variable bitrate only) Contains the maximum bit rate allowed, in Kbits/sec.

Avg Bitrate edit box

(Variable bit rate only) Contains the average bit rate. The bitrate for the duration of the file will be equal (or very close to) the average bit rate. Simple scenes with little movement and few changes will be compressed with a lower bit rate (higher compression). Complex scenes with more movement or changes will be compressed with a higher bit rate. The highest bit rate will not exceed the maximum bitrate. If in doubt about what values to enter in these edit boxes, leave them unchanged.

Output Video Type radio buttons

The encoder is capable of generating MPEG-1 or MPEG-2 video.

  • When the MPEG-1 radio button is checked, MPEG-1 compression is used. In this case, only Custom MPEG-1 or VCD MPEG-1 options are available.

    • Custom MPEG-1 lets you control all the MPEG-1 compression options. A custom MPEG-1 file may or may not be compatible with VCD.

    • VCD (Video on CD) lets you create VCD-compatible files. VCD-compatible files use MPEG-1 compression, but have certain restrictions on compression options, the video size (must be 352x240) and frame rate. The encoder will display a warning if the VCD output type is selected and the size of the video being compressed is not 320x240 (see below).

  • When the MPEG-2 radio button is checked, MPEG-2 compression is used. In this case, only Custom MPEG-2, SVCD, DVD 1 and DVD 2 are available.

    • Custom MPEG-2 lets you control all the MPEG-2 compression options. A custom MPEG-2 file may or may not be compatible with SVCD or DVD.

    • SVCD (Super Video CD) lets you create SVCD-compatible files. SVCD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 720x480) and frame rate. The encoder will display a warning if the SVCD output type is selected and the size of the video being compressed is not 720x480 (see below).

    • DVD lets you create DVD-compatible files that can be put on a 1-hour DVD. DVD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 720x480) and frame rate. The encoder will display a warning if DVD output type is selected and the size of the video being compressed is not 720x480(see below).

    • DICOM lets you create Digital Imaging and Communications in Medicine (DICOM), compatible mpeg2 file. The mpeg2 encoder setting is based on DICOM Part 5: Data Structures and Encoding (PS 3.5-2004).

Playback Frame Rate drop down box

Contains the allowable playback frame rates. The input video will be adjusted so it matches the selected frame rate.

Profile drop-down box

Contains a set of predefined profiles, or collections of compression tools used to make up the coding system.

Level drop-down box

Contains a set of predefined levels or source formats.

Aspect Ratio drop-down box

Indicates the desired aspect ratio during playback. This does not change the movie in any way and not all MPEG-2 Decoders/Players pay attention to this.

I Frame drop-down box

Contains the number of frames between I frames. This value must be a multiple of the number of frames between P frames, set in the P Frame drop down box.

P Frame drop-down box

Contains the number of frames between P frames.

Video Format drop-down box

Specifies the TV system on which the MPEG file will be played (NTCS, PAL). Use this option when producing a file to be played on TV, such as a DVD or VCD.

Show Warning Message check box

If this is checked, a message box will display a warning if the video size does not meet the standard required for compressing DVD, SVCD or VCD options. If this box is cleared, these messages will not be displayed. For more information, refer to the Notes section below.

Display Scan

This option should be set to “Interlaced” if the mpeg2 file needs to be played on an interlaced device, such as a TV set. Otherwise set this option to "Progressive" if the mpeg2 file needs to be played on a progressive display device such as a Computer Monitor.

Set Default Values

Brings back the default settings of the selected Output VideoType.

Time Quality Factor File

Sets the name of the file that has a set of time stamps and the desired quality factors to be used by the encoder.

To create such a file just open a regular text file and start writing the time stamps and each corresponding quality factor.
The format of the time stamps and quality factor should appears as follows:

#00:00:00:000-00:00:01:000 26
#00:00:02:000-00:01:03:000 40

The above two lines mean:
between 0 seconds and one second, use Quality Factor of 26.
between 1 second and 2 seconds, use the default Quality Factor.
between 2 seconds and 1 minute and 3 seconds, use Quality Factor of 40.

You can put as many time stamps-quality factors as needed. They must be within the video clip time span to be considered by the encoder.

Notes:

The DVD output type is designed to create files compatible with DVDs. These files should be 720x480. If the movie size is of a different size, the following warning message box will appear:

If this message box appears, it is recommended that you select No and resize or crop the video to be 720x480. Otherwise, the generated file will not be DVD-compatible.

The SVCD output type is designed to create files compatible with SVCDs. These files should be 720x480. If the movie size is of a different size, the following warning message box will appear:

If this message box appears, it is recommended that you select No and resize or crop the video to be 720x480. Otherwise, the generated file will not be SVCD-compatible.

The VCD output type is designed to create files compatible with VCDs. These files should be 352x240. If the movie size is of a different size, the following warning message box will appear:

If this message box appears, it is recommended that you select No and resize or crop the video to be 352x240. Otherwise, the generated file will not be VCD-compatible.


Multimedia Filter and Codec Agreement

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

The name for a group of related video files (called "Chapters") on your DVD. For example, for a DVD called "My Summer Vacation," you might have the titles "Water Skiing," "New Friends," and "Hiking." For each of those titles, you might have one or more different video files.

Multimedia Filter and Codec Agreement

LEADTOOLS MULTIMEDIA

Duplication and Distribution Agreement

For Codecs/Direct Show Filters

(Per Copy Agreement)

Company Name: | _________________________________ (herein "Licensee")
Attn: | ________________________________________________
Address: | ________________________________________________
Street Address: | ________________________________________________
City, State, Postal Code, Country | ________________________________________________

Phone No.: _______________________

Fax No.: __________________________

LEADTOOLS Multimedia Serial Number:

________________________________________________

(herein Software)

Filter(s)/Codecs to be included with Application Software: See completed schedule 1 (herein Licensed Filters).

Name or Description of Licensees Software Application into which the Licensed Filters will be integrated

___________________________
(herein Application Software)

This Duplication and Distribution License (Agreement) is made by and between LEAD Technologies, Inc., a North Carolina corporation, principally located at 1201 Greenwood Cliff, Suite 400, Charlotte, North Carolina 28204, USA (LEAD) and Licensee.

Recitals

  1. Licensee has heretofore obtained a development license to use the Software in connection with the development of the Application Software in accordance with the terms of the LEADTOOLS Software License Agreement, a copy of which is included in the Software packaging and online help file, and the terms of which are hereby incorporated herein by this reference (herein the License Agreement).

  2. The Software includes demo versions of several optional components comprising Direct Show filters and audio and video codecs, including demo versions of the Licensed Components, which are bundled with the Software and which may be licensed for inclusion with the Application Software.

  3. Licensee wishes to obtain a license whereby it may internally deploy or commercially distribute the Application Software with the Licensed Components to end users and LEAD is willing to grant the licenses described herein provided Licensee complies with the terms and conditions of this Agreement.

NOW, THEREFORE, in consideration of the mutual covenants and promises set forth herein, the parties hereto, intending to be legally bound, do hereby agree as follows:

  1. Effectiveness of License Agreement; Grant of Duplication and Distribution License.
    (    a) License Agreement. Licensee acknowledges that its use of the Software and Licensed Components is governed by the terms, conditions, limitations and restrictions contained in the License Agreement and hereby agrees to faithfully abide by such terms and conditions and will not take any action with respect to the Software or Licensed Components prohibited by the License Agreement. This Agreement is supplementary to the License Agreement, and this Agreement and the License Agreement together will govern Licensees use of the Software, Licensed Components and Application Software. Unless otherwise modified by the terms of this Agreement, all of the terms and conditions of the License Agreement remain in full force and effect. In the event of an inconsistency between this Agreement and the License Agreement, this Agreement will control.

    (b) Duplication and Distribution License.     Under LEADs copyright, and subject to all the terms and conditions set forth in this Agreement and the License Agreement, including without limitation, the payment of the runtime licensing fees described in paragraph 2 hereof, LEAD hereby grants Licensee (and only Licensee) a non-exclusive, non-transferable, worldwide license to reproduce exact copies of the Licensed Components and include such files in the Application Software, and to deploy the Application Software on Licensees owned and controlled computers and networks for use by Licensees employees, contractors and affiliates and/or to commercially distribute the Application Software, directly or through customary distribution channels, to end users for their use without further distribution.

  2. Runtime Licenses. Licensee must purchase a runtime license or server license for each Deployment of Application Software. For purposes hereof, a Deployment of Application Software will include Stand Alone Deployments, Concurrent Deployments and Server Licenses. A Stand Alone Deployment includes any and all copies of the Application Software installed, used, distributed, leased, or sold by Licensee and any of its customers, employees, distributors, resellers, affiliates or other channel partners. If the Application Software is installed on a server or network by Licensee or its customers, the number of Stand Alone Deployments that must be reported and the number of runtime licenses that must be purchased hereunder will be the number of computers that are permitted access to the Application Software via the network or server, unless a Server License is purchased (section 2(c) below).

    (    a) Per Copy Runtime Licensing for Runtime Licenses that are Not Prepaid. Except as otherwise provided in paragraph 2(b) 2(c) or 2(d) hereof, Licensee will pay a runtime license fee equal to the non prepaid runtime license fees set forth on Schedule 2 for the Licensed Components times the number of Deployments of Application Software. Licensee will report Deployments and pay for the runtime licenses pursuant to paragraph 3 hereof.

    (    b) Prepaid Runtime Licensing. In lieu of paying the per copy non-prepaid rates as described above, Licensee may pay in advance for its projected runtime licensing needs in the quantities and for the prices set forth on Schedule 2, attached hereto. In order to receive the prepaid runtime pricing contained on schedule 2, Licensee must prepay for its runtime licenses at the prices set forth on schedule 2 prior to Deployment of the Application Software. To select a prepaid Deployment option, Licensee shall send LEAD a purchase order for Licensed Filter runtime licenses covering the desired number of copies of the Application Software before making the Deployments covered by the purchase order, and LEAD will generate an invoice covering the prepaid copies. During the term hereof, Licensee may, from time to time, issue multiple purchase orders for multiple quantity orders.

    (c) Server Licenses. In lieu of purchasing runtime licenses, Licensee has the option of purchasing Server Licenses in certain circumstances. If the Application Software will be installed and executed solely at the server level (no Software is distributed to client machines, such as a control distributed in a CAB file or .DLL distributed to a client machine for .NET web deployment), Licensee will have the option of purchasing a Server License for each server the Application Software is installed upon, and by purchasing a Server License, no additional runtime licensing will be required for the computers that are connected to the server. (Servers with more than 2 CPUs will require a Server License for each additional CPU or pair of CPUs.) If the number of connected computers does not justify purchasing a Server License, Licensee has the option of selecting licensing based on sections 2(b) and (c) above. For example, if Licensee installs the Application Software on a server and only ten (10) computers are connected to the server, Licensee may purchase ten (10) Stand Alone runtime licenses and will not be required to purchase a Server License. On the other hand, if the Application Software is installed on a server that is connected to one thousand (1000) computers and Licensee purchases a Server License, Licensee will not be required to purchase runtime licenses for the 1000 computers that are connected to the server. Server Licenses may be purchased at the prices set forth below.

  3. Reporting and Payment. Licensee agrees to maintain full, clear and accurate records as to all Deployments of the Application Software. Licensee will submit to LEAD, within thirty (30) days of the close of each calendar quarter, a report setting forth the number of Deployments of Application Software made during such quarter, and accompanying such report will be a check in the amount of runtime licensing that is due, if any. If no Deployments have been made during said quarter, Licensee will provide a certification so stating. Licensee shall keep adequate records to accurately determine the payments due under this Agreement. LEAD shall have the right, no more than once during any calendar year, to have an independent certified public accountant or other disinterested third party inspect the relevant records of Licensee on thirty (30) business days notice and during regular business hours to verify the reports and payments required to be made hereunder. Should an underpayment in excess of five percent (5%) be discovered, Licensee shall pay the cost of the audit. If Licensee is more than thirty (30) days late with any payment of amount due hereunder, interest will accrue from the date due until paid at the lesser of (i) 1.5% per month or (ii) the maximum rate of interest permitted by law. All amounts due hereunder are based on United States currency.

  4. New Versions; Upgrades. Minor version updates to the Software (e. g. LEADTOOLS version 15.1, 15.2 etc.) are provided to Licensee free of charge via LEADs web site. Licensee may license major new versions of the Software (e. g. LEADTOOLS version 16, 17 etc.) by purchasing a development license to the new version at LEADs then prevailing upgrade price. No additional runtime licensing is required for updates and upgrades to the Application Software distributed to users of the Application Software for which runtime licenses have been paid and accounted for hereunder unless a major new version of the Software is included in the upgrade. If a major new version of the Software is included in an upgrade to the Application Software, each user that is upgraded will be considered to be a new Deployment for purposes of runtime license payment and reporting hereunder. Any prepaid runtime licenses that have not been deployed at the time Licensee takes a license to a major new version of the Software will be carried forward and may be applied to Deployments of Application Software made with the major new version of the Software. Licensee will be under no obligation to update previously deployed user or client licenses with the new version of the Application Software that includes the major new version of the Software.

  5. Third Party Patents; Rights of Content Owners. Certain technologies such as MPEG 2, MPEG 4 and H.264 are subject to third party patents, including patents managed by MPEG LA and Via Licensing. LEAD has obtained a patent license from MPEG LA and Via Licensing which covers LEAD’s distribution of its products. LEAD’s license does not extend to Licensee’s products. Licensee is responsible for obtaining any and all third party patent licenses for the deployment and distribution of the Application Software, including any licenses required by MPEG LA and Via Licensing, and will indemnify and hold LEAD harmless from any and all patent claims asserted against LEAD which arise by virtue of Licensee’s distribution or deployment of the Application Software. Additionally, Licensee agrees that it will not use the Software or Application Software for any unlawful purpose, including without limitation, for copying, distributing, broadcasting or publishing the copyrighted works of any third party without a proper license, and Licensee will indemnify and hold LEAD harmless from any and all claims asserted against LEAD as the result of any wrongful actions taken by Licensee.

LEAD and Licensee have caused this Agreement to be executed in their names by the following authorized representatives.

LEAD TECHNOLOGIES, INC. | _______________________________________________
 | (Print Your Company Name Here)
By:_____________________________(SEAL) | By:_______________________________________ (SEAL)
 | (Authorized Signature)
Title:________________________ ___ | Title:______________________________________
Date:______________________ | Date:_____________________

Schedule 1

List of Licensed Filters

to be included with Application Software

Direct Show Filters:

Codecs:

Schedule 2

Licensed Component Runtime Pricing

Option 1 - Per Copy Pricing Model

The basic licensing model requires that a runtime license be purchased for each “Deployment” of the Application Software. A “Deployment” of Application Software includes: (i) each copy of the Application Software installed by customer for internal use and (ii) each copy of the Application Software distributed to third parties by customer and its resellers/distributors. If the Application Software is installed on a network or server by customer or any of customer’s licensees, a runtime license is required for each computer that is connected to the network or server having access to the Application Software. Customers have the option of purchasing runtime licenses on a nonprepaid “trailing” basis or may purchase runtime licenses in prepaid quantity blocks at a substantial discount:

Quantity Prepaid

Price Per Copy

Minimum Prepayment

50+

100+

250+

500+

1,000+

5,000+

10,000+

Option 2 – Server License – Third Party Client Software

For customers developing Application Software to be installed on a server that will reside solely on the server but which may be accessed by multiple users who are using third party software (software that does not include any of the libraries included in the LEAD SDK), these customers will have the option of purchasing Server Licenses for each server the Application Software is installed upon and by purchasing a server license, no additional licensing will be required for the computers accessing the Application Software residing on the server.

LEAD Software

Price Per Server

Notes:

  1. Application Software containing multiple filters and codecs will require a runtime license for each codec/filter included with the Application Software.

  2. If Licensed Components includes more than one individual Direct Show Filter, a runtime license is required for each Direct Show Filter included with the Application. Software. For example, if each copy of the Application Software includes 3 individual Direct Show filters, then a distribution of 5 copies of the Application Software requires 15 runtime licenses for individual Direct Show filters.

  3. Volume purchases are not cumulative. If Licensee purchases 100 prepaid licenses at the applicable price and later purchases 50 prepaid licenses, the second purchase will be at the quantity 50 pricing level.


LEAD DICOM Reader Module

LEAD DICOM Reader

The LEAD DICOM Reader contains a DirectShow Ò filter that allows DICOM files to be played. The LEAD DICOM Reader contains the following components:

Video Filters

LEAD DICOM Reader

You need to unlock the LEAD DICOM Reader to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview. .


LEAD DICOM Writer Module

The LEAD DICOM Writer Module contains a DirectShow Ò filter that allows files to be converted to DICOM files. The LEAD DICOM Writer Module contains the following components:

Video Filters

LEAD DICOM Writer

You need to unlock the LEAD DICOM Writer Module to use the above filters and codecs in RELEASE mode. For more information, refer to LEAD DirectShow Modules Evaluation Mechanism.


LEAD H.263 Video Codec Module

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEAD H.263 Video Codec Module

H.263 is an ITU standard, designed for low bit rate communications such as video-conferencing and video-telephony applications. At the same time it can be used for a wide range of bit rates and not just low bit rates. H.263 is a hybrid of interframe compression that makes use of temporal redundancy and intraframe transform coding to use spatial redundancy as a compression advantage. Accordingly, a superior compression ratio can be achieved in comparison to other video codecs.

The LEAD H.263 codec is a high quality lossy interframe DirectShow Ò and Video for Windows (VfW) codec with a quality and compression ratio comparable to MPEG-4. It can be used for a range of applications including video-conferencing, Internet video or surveillance and monitoring. The LEAD H.263 codec is suitable for videos captured from cameras as well as video screen captures. This video codec registers into the Windows® collection of multimedia drivers and integrates with any application using DirectShow and Microsoft Video for Windows®. Existing video software, such as Windows® Media Player® and Ulead Media Studio® can utilize this codec to play, create, convert and edit.

The LEAD H.263 Video Codec Module contains DirectShow Ò filters and codecs that allows an H.263 file to be played, or files with other file formats to be converted to H.263 files.

Key features of the LEAD H.263 Video Codec:

  • Interframe compression comparable to MPEG-4.

  • Rate control algorithm based on the TMN8 which is suitable for videophone applications.

  • The encoder accepts RGB24 and RGB32 formats.

  • Decoder can produce RGB24, RGB32 YUY2, RGB555 and RGB565 formats.

  • Codec implements all elements and functionality of ITU-T H.263+, plus

    • Deblocking Filter Mode (Annex J).

    • Unrestricted Motion Vector (Annex D).

    • Advance Intra Coding Mode (Annex I)

    • Advance Prediction Mode (Annex F)

    • Modified Quantization Mode (Annex T)

    • Alternative Inter VLC Mode (Annex S)

  • Supports any video dimension.

  • Employs half pixel precision for motion compensation.

  • Unrestricted motion vectors.

This product includes parts of the following features:

Image Compression

Files and File Formats

For more details on this product, refer to:

www.leadtools.com/SDK/Multimedia/Multimedia-h263-codec.htm

This product may be added to:

LEADTOOLS Multimedia API and COM PI and COM

LEAD Video Codec is a trademark of LEAD Technologies, Inc. Adobe Premier is a trademark of Adobe Systems Incorporated. Ulead Media Studio is a trademark of Ulead Systems, Inc. Windows™ and Windows™ Media Player are either a trade mark or a registered trademark of Microsoft Corporation.

The LEAD H.263 Video Codec Module contains the following components:

  • Video Encoder

    • LEAD H.263 Video Encoder

  • Video Decoder

    • LEAD H.263 Video Decoder

  • Multiplexers and Demultiplexers

    • LEAD ISO Multiplexer

    • LEAD ISO Demultiplexer

You need to unlock the LEAD H.263 Video Codec Module to use the above filters and codecs in RELEASE mode. For more information, refer to LEAD DirectShow Modules Evaluation Mechanism.


LEAD MCMP-MJPEG Video Codec Module

LEAD MCMP-MJPEG Video Codec Module

The LEAD MCMP-MJPEG Video Codec Module contains DirectShow Ò filters and codecs that allow CMP files to be played, or files with other file formats to be converted to CMP files. The LEAD MCMP-MJPEG Video Codec Module contains the following components:

Codec

LEAD MCMP/MJPEG Codec

You need to unlock the LEAD MCMP-MJPEG Video Codec Module to use the above filters and codecs in RELEASE mode. For more information, refer to LEAD DirectShow Modules Evaluation Mechanism.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.


LEAD MCMW Video Codec Module

LEAD MCMW Video Codec Module

The LEAD MCMW Video Codec Module contains DirectShow Ò filters and codecs that allow CMW files to be played, or files with other file formats to be converted to CMW files. The LEAD MCMW Video Codec Module contains the following components:

Video Encoders

LEAD CMW Video Encoder

Video Decoders

LEAD CMW Video Decoder

You need to unlock the LEAD MCMW Video Codec Module to use the above filters and codecs in RELEASE mode. For more information, refer to LEAD DirectShow Modules Evaluation Mechanism.

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.


LEAD MJPEG2000 Video Codec Module

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEAD MJPEG2000 Video Codec Module

The LEAD MJPEG2000 Video Codec Module provides DirectShow Ò filters and codecs that allow MJ2K files to be played, or other files converted to MJ2K files. The LEAD MJPEG2000 Video Codec Module contains the following components:

Video Encoders

LEAD MJ2K Video Encoder

Video Decoders

LEAD MJ2K Video Decoder

You need to unlock the LEAD MJPEG2000 Video Codec Module to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.


LEAD MPEG-2 Video Codec Module

A COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.COmpressor combined with a DECompressor, or encoder and a decoder, which allows you to both compress and decompress that same data.

Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.

Also known as a decompressor, this is a module or algorithm to decompress data.

LEAD MPEG-2 Video Codec Module

The LEAD MPEG-2 Video Codec Module contains DirectShow Ò filters and codecs that allow MPEG-2 files to be played, or files with other formats converted to MPEG-2 files. The LEAD MPEG-2 Video Codec Module contains the following components:

Video Encoders

LEAD MPEG-2 Video Encoder

Video Decoders

LEAD MPEG-2 Video Decoder

Multiplexers

LEAD MPEG-1 Multiplexer

LEAD MPEG-2 Multiplexer

Demultiplexers

LEAD MPEG-2 Program Demultiplexer

Audio Encoders

LEAD AC3 Audio Encoder

LEAD MPEG Audio Encoder

You need to unlock the LEAD MPEG-2 Video Codec Module to use the above filters and codecs in RELEASE mode. For more information, refer to Evaluation Mechanism Overview.