Introduction
LEAD Technologies has been winning awards for its DirectShow
Multimedia SDKs for over a decade and has leveraged its expertise to provide
the same world-class SDK for Microsoft Media Foundation. LEADTOOLS Version 18
makes it easy to add multimedia playback, capture and conversion functionality
with high level, programmer friendly objects and classes.
In addition to the top-notch development interfaces for C++
and .NET, LEADTOOLS Multimedia 18 includes codecs, media sources, media sinks,
processing transforms and more. Boasting outstanding quality, compression and
speed, LEADTOOLS is the complete package for all of your Multimedia development
needs.
Key Media Foundation Capture and Convert Features in LEADTOOLS Multimedia SDKs
-
Capture in HD from any device including capture cards, cameras,
TV Tuners, live web streams and more
-
Convert and save captured data in real time directly to file,
memory, or create live streams for the public Internet or encrypted networks
-
Use LEAD’s advanced encoders, decoders, media sources and media
sinks for the market’s best performance, quality and compression
-
MPEG-4
-
MPEG-2
-
h.264
-
h.263
-
AAC
-
AC3
-
AMR
-
MKV
-
MXF
-
ISO
-
OGG
-
Process the audio/video data with LEAD’s Media Foundation Transforms
-
Video Stabilizer
-
Deinterlace
-
Resize
-
Rotate
-
Text Overlay
-
Video Callback
-
Volume
-
High level .NET and C/C++ interfaces for 32 and 64 bit
development
The Media Foundation Code
LEADTOOLS includes high level controls that do all the hard
work of constructing the necessary topologies (or graphs if you are using the
DirectShow version) for capturing and converting audio/video data. They also
both come with live preview windows and callback events to monitoring the
progress and other control states.
Capture
There are many ways to capture audio and video, and
LEADTOOLS supports them all. Whether you are capturing from a webcam, microphone,
IP camera, television signal, or even a military-grade UAV, LEADTOOLS only
requires a few lines of code.
_capturectrl.VideoDevices[0].Selected = true;
_capturectrl.TargetFormats.Selection = (int)TargetFormatType.MP4;
_capturectrl.TargetFile = "capture.mp4";
TargetVideoFormats targetvideoformats =
_capturectrl.TargetFormats[TargetFormatType.MP4].VideoFormats;
targetvideoformats.Selection = targetvideoformats.IndexOf(
Constants.MEDIASUBTYPE_H264);
_capturectrl.Preview = true; _capturectrl.UseTimeLimit = true;
_capturectrl.TimeLimit = 10; _capturectrl.StartCapture(CaptureMode.Video);
Convert
Similarly, converting a multimedia file is as simple as
setting the source file, destination file, and output settings.
_convertctrl.SourceFile =
@"C:\LEADTOOLS Multimedia 18\Media\DaDa_H264.mp4";
_convertctrl.TargetFormat = TargetFormatType.WMV;
_convertctrl.TargetFile = "DaDa.wmv";
TargetVideoFormats targetvideoformats =
_convertctrl.TargetFormats[_convertctrl.TargetFormat].VideoFormats;
targetvideoformats.Selection = targetvideoformats.IndexOf(
Constants.WMMEDIASUBTYPE_WMV3 + "/MP");
TargetAudioFormats targetaudioformats =
_convertctrl.TargetFormats[_convertctrl.TargetFormat].AudioFormats;
targetaudioformats.Selection = targetaudioformats.IndexOf(
Constants.WMMEDIASUBTYPE_WMAudioV8);
_convertctrl.Preview = true;
_convertctrl.StartConvert();
Download the Full Media Foundation Capture and Convert Example
You can download a fully functional demo which includes the
features discussed above. To run these examples you will need the following:
Support
Need help getting this sample up and going? Contact
our support team for free technical support! For pricing or licensing
questions, you can contact our sales team (sales@leadtools.com)
or call us at 704-332-5532.