Video SDK gives you two programming interfaces to the same media engine: MFormats and MPlatform. Both play files and streams, capture from devices, send video to SDI, NDI and other outputs, and record or stream. They differ in who drives the video: your code or the SDK objects.
Two ways to move frames
In MFormats your application moves every frame. It takes a frame from a source with
SourceFrameGet and gives it to one or more receivers with ReceiverFramePut, in a loop that runs
in your own thread. Between the two calls you can read, change or replace the frame. You decide the timing and what
happens with each frame.
In MPlatform you connect objects and let them run. A receiver starts on a source with
ObjectStart(source), and from then on the SDK moves the frames in its own threads, keeps the timing, and
reports what happens through events. Playlists, mixers and switching between sources are ready objects.
Objects
| Task | MFormats | MPlatform |
|---|---|---|
| Play a file or a network stream | MFReader |
MFile |
| Capture from a device (SDI, HDMI, NDI, webcam) | MFLive |
MLive |
| Show video in a window | MFPreview |
built into every source: PreviewWindowSet, PreviewEnable
|
| Send video to a device (SDI, NDI and others) | MFRenderer |
MRenderer |
| Record to a file or stream to the network | MFWriter |
MWriter |
| Play a list of files and live sources | your code | MPlaylist |
The frames are the same in both interfaces: an MPlatform frame from an event is also an MFormats frame
(IMFFrame), so frame metadata, captions and the other side data work the same way.
Which one to choose
- Choose MFormats when you need each frame in your code: custom processing, your own timing, frame-accurate control, or integration into an existing pipeline.
- Choose MPlatform when you need playback, playlists, switching and mixing with little code, and events are enough to follow what happens.
Both SDKs are COM libraries for 32-bit and 64-bit Windows applications and work with C#, C++ and other languages that use COM. The examples in this section are in C#.
Without a license the SDK works in trial mode and draws a trial logo on the video. See Types of licenses.
Tutorials
Each tutorial builds a small Windows Forms application and can be done on its own.
| Step | MFormats | MPlatform |
|---|---|---|
| 1. Create a project and play a file | MFormats 1: Playing a file | MPlatform 1: Playing a file |
| 2. Capture from a device | MFormats 2: Capturing from a device | MPlatform 2: Capturing from a device |
| 3. Send video to a device | MFormats 3: Sending video to a device | MPlatform 3: Sending video to a device |
| 4. Record to a file | MFormats 4: Recording to a file | MPlatform 4: Recording to a file |
The SDK installs complete samples next to these tutorials: Samples\C# in the MFormats SDK folder and
Samples Basic\C# in the MPlatform SDK folder.
Still have questions?
Tell us what didn’t work or what you’d like clarified.