The HTML5 Overlay plugin brings browser-based graphics into a Medialooks Video SDK pipeline. It renders an HTML page with the SDK's Chromium Embedded Framework (CEF) runtime and composites the result over your video. Use it for lower thirds, tickers, scorebugs, titles, dashboards and other animated graphics.
You can load your own HTML/CSS/JavaScript, or design graphics visually in MLCG Editor and load the editor's published output URL. Your MPlatform or MFormats application remains responsible for video playback, processing and output.
Capabilities and integration points
The plugin is an embeddable browser renderer and video compositor, not a standalone graphics scheduler. Use the following map to choose the API needed by your application; the installed samples provide working implementations of these integration points.
| Capability | Typical use | API or guide |
|---|---|---|
| Load a hosted page, local file or HTML string | Use an existing web overlay, an application-generated page or a locally deployed graphics package. |
BrowserPageLoad, BrowserHtmlDisplay; browser control. |
| Render web graphics and animation | Build lower thirds, tickers, charts, scoreboards and interactive dashboards with HTML/CSS/JavaScript, SVG, Canvas or supported WebGL content. | The page owns its design and animation; browser capabilities depend on the bundled CEF runtime. See browser options. |
| Composite into an SDK video pipeline | Add the same HTML rendering stage before preview, recording, streaming or device output. | MPlatform PluginsAdd; MFormats IMFProcess.ProcessFrame; code below. |
| Position, resize, fade and crop the overlay | Place a full-frame transparent design or a smaller web panel over video without changing the source media. |
dst.x/y/w/h, dst.alpha, crop, zoom, transparency; composition properties. |
| Update the loaded page | Apply application data to your own DOM or call a page-defined update function without navigating again. |
BrowserJavascriptExecute, BrowserCSSSet; application-to-page control. |
| Exchange application and page events | Report resource readiness, UI actions or page-defined state to C#; forward supported host events to JavaScript. |
OnEventSafe, cef_plugin.put_event, set_on_event; events and readiness. |
| Expose host frame information and images to a page | Display timecode/host metadata or consume an image deliberately supplied by the host. |
cef_plugin.set_on_frame, parse_parameters, set_on_image; frame and image callbacks. |
| Read or write selected host properties from a page | Connect trusted page code to a controlled set of host settings or metadata. |
cef_plugin.props_get/props_set; host-property bridge. Property reads are synchronous; keep them out of animation loops. |
| Forward pointer and keyboard input | Embed an interactive web control in a video application, with explicit preview-to-page coordinate mapping. |
BrowserMouseClick/Move/Wheel, BrowserKeyEvent; input forwarding. |
| Navigate and manage browser lifetime | Reload a page, go back/forward, stop navigation, and close the renderer during controlled teardown. |
BrowserCommand, BrowserClose, load events; lifecycle guidance. |
| Configure storage, diagnostics and browser behavior | Use a deliberate cache/profile location, collect CEF logs, inspect a development page and configure supported browser options. |
PropsSet/PropsGet; CEF configuration recipes. |
| Control browser-page audio | Keep visual-only overlays silent or configure an HTML-media page deliberately. |
cef.mute_audio; page audio and capabilities. This is separate from source audio and preview monitoring; verify audio in the final SDK output. |
| Generate a video source from HTML | Use the page itself as a live source instead of compositing it over another source. | Medialooks WebCapture through MLive/MFLive; HTML5 as a video source. |
| Use visually authored, remotely controlled graphics | Design in MLCG Editor, load its output URL, then change session data and animation through REST. | MLCG workflow and samples; MLCG.RestControl. This is optional; your page does not have to use MLCG. |
Integration boundaries: a browser navigation or REST response is not a painted-frame acknowledgement. Page animation does not automatically follow source-video pause or seek. WebGL enablement is not a guarantee that the complete SDK path is GPU-only or reaches a particular frame rate. Web APIs, web-media codecs, protected playback and third-party site behavior depend on the bundled runtime and the page; do not assume compatibility with every feature of desktop Chrome.
1. Before you start
- Install and register the corresponding MPlatform or MFormats SDK, including the HTML5 Overlay plugin and matching CEF runtime. Normal SDK and plugin licensing applies.
- The walkthrough below uses the installed x64 samples. For your own application, match the SDK/runtime architecture.
- To build the C# examples, reference
MPLATFORMLibfor MPlatform orMFORMATSLibfor MFormats. Do not mix their types or lifecycle models. Building the MLCG HTML REST samples also requires Visual Studio/MSBuild, .NET Framework 4.7.2 targeting tools and NuGet restore. - Make the page, fonts, images and other dependencies accessible from the machine running the SDK application. For MLCG workflows, that includes the MLCG service, normally
https://cg.medialooks.com.
The default installation folders are C:\Program Files (x86)\Medialooks\MPlatform SDK and C:\Program Files (x86)\Medialooks\MFormats SDK. The paths below use those defaults; adjust them if you selected a different installation folder.
A remote URL supplies the page, assets and control data; the SDK's browser runtime renders that page on the SDK machine. In the MLCG sample workflow, source-video playback remains in the Video SDK application.
Load pages you own or trust. Page JavaScript runs in the SDK browser, and the application bridge can expose host operations. Keep control credentials outside page URLs and injected scripts.
2. Try a URL in the installed SDK sample
You do not need to write HTML or C# to try the plugin. Open a video in the corresponding SDK sample, enter https://www.medialooks.com and enable HTML overlay.
MPlatform: Playlist Sample x64
Launch Playlist Sample x64 from the SDK shortcuts, or open:
C:\Program Files (x86)\Medialooks\MPlatform SDK\Samples Advanced\C#\Playlist Sample\bin\x64\Debug\Playlist Sample.exe
- Click Add File and select a video file.
- Click Play and confirm that the video appears in the preview.
- In the URL field beside HTML overlay, enter
https://www.medialooks.com. - Enable HTML overlay. The sample loads the website and composites it into the playlist's video.
- To load a different URL while the overlay is enabled, edit the URL and press Enter. Disable HTML overlay to remove it.
Playlist Sample x64 with the Medialooks website displayed as a smaller panel over the video. Destination width and height are 45%, with a 5% inset, configured through Props.
Source project:
C:\Program Files (x86)\Medialooks\MPlatform SDK\Samples Advanced\C#\Playlist Sample\Playlist Sample.csproj
MFormats: File Playback Sample x64
Launch File Playback Sample x64 from the SDK shortcuts, or open:
C:\Program Files (x86)\Medialooks\MFormats SDK\Samples\C#\Sample File Playback\bin\x64\Debug\Sample File Playback.exe
- Click Load File and select a video file.
- Click Play and confirm that the video appears in the preview.
- In the URL field beside HTML overlay, enter
https://www.medialooks.com. - Enable HTML overlay. The sample processes video frames through the plugin before sending them to preview.
- When the overlay is already enabled, press Enter after changing the URL. Disable HTML overlay to remove it.
File Playback Sample x64 with the website at 45% destination width and height, configured through Props. Screenshots show the installed SDK samples; minor UI details can vary by release.
Video in both screenshots: Big Buck Bunny, Blender Foundation, CC BY 3.0.
Source project:
C:\Program Files (x86)\Medialooks\MFormats SDK\Samples\C#\Sample File Playback\Sample File Playback.csproj
Why does the website cover the video? A normal website has an opaque background; this is expected. Click Props beside the HTML controls. In the properties list, double-click a property's value, enter the new value and press Enter. Set dst.w and dst.h to 45% for a smaller panel; optionally set dst.x and dst.y to 5% to move it away from the top-left edge. A transparent lower-third page leaves the rest of the picture visible without this resize.
You can enter another page URL, including YouTube, in the same field. External sites may require consent or login and may restrict autoplay or playback; use the Medialooks website for the first navigation test, and your own graphics/output URL for an on-air overlay.
3A. MPlatform: the integration in code
The Playlist sample attaches the HTML5 plugin to an MPlaylist object. With videoPath, pagePathOrUrl (for example, https://www.medialooks.com) and a valid preview HWND supplied by your application:
using MPLATFORMLib;
var source = new MPlaylistClass();
var overlay = new MFOverlayHTMLClass();
var preview = new MPreviewClass();
MItem item;
int index = -1; // Append to the playlist.
source.PlaylistAdd(null, videoPath, "", ref index, out item);
System.Runtime.InteropServices.Marshal.ReleaseComObject(item);
source.PluginsAdd(overlay, 0);
overlay.PropsSet("transparency", "true");
overlay.BrowserPageLoad(pagePathOrUrl);
preview.PreviewWindowSet("", previewWindowHandle);
preview.PreviewEnable("", 1, 1);
preview.ObjectStart(source);
source.FilePlayStart();
The same principle applies to an MFile or MLive pipeline: attach the plugin to the source whose frames your downstream receiver consumes.
3B. MFormats: the integration in code
MFormats uses an application-owned frame loop. Create the reader, plugin and preview once, then pass each input frame through the plugin before sending the result to the receiver:
using MFORMATSLib;
var reader = new MFReaderClass();
var overlay = new MFOverlayHTMLClass();
var preview = new MFPreviewClass();
reader.ReaderOpen(videoPath, "");
overlay.PropsSet("transparency", "true");
overlay.BrowserPageLoad(pagePathOrUrl);
preview.PreviewWindowSet("", previewWindowHandle);
preview.PreviewEnable("", 1, 1);
The following is one iteration of an existing, cancellable worker loop—not a loop to run on the UI thread. Handle end-of-file and application shutdown in the owner of that loop.
MFFrame input = null;
MFFrame processed = null;
try
{
// Wait for the next frame on the playback worker.
reader.SourceFrameGet(-1, out input, "");
if (input != null)
{
int framesRemaining;
((IMFProcess)overlay).ProcessFrame(
input, out processed, out framesRemaining, "");
preview.ReceiverFramePut(processed ?? input, 5000000, "");
}
}
finally
{
// These frame references are owned by this iteration.
if (processed != null && !ReferenceEquals(processed, input))
System.Runtime.InteropServices.Marshal.ReleaseComObject(processed);
if (input != null)
System.Runtime.InteropServices.Marshal.ReleaseComObject(input);
}
-1 uses an unlimited source wait. Keep frame acquisition off the UI thread and retain the sample's shutdown/source-close handling; a cancellation flag alone cannot interrupt a blocked call. These fragments show the integration points, not a complete application. Create the browser once, not for every video frame.
4. Use your own graphics or MLCG Editor
Replace the test website URL with your HTML graphics URL or a local HTML file. For a transparent overlay, the page's CSS background must be transparent; enabling plugin transparency does not remove a website's own opaque background.
To design graphics visually, use MLCG Editor. Publish a session and copy its HTML output URL, not the editor or Library URL. The MLCG HTML REST samples demonstrate real templates, editable data and animation controls. The optional C# REST client changes session data and animation; it does not render video.
5. Prepare before going on air
BrowserPageLoad starts loading the page. Returning from that call, or receiving a page-load event, does not prove that every font/image is ready or that an exact video frame has been painted.
- For your own page, send a custom ready event after the resources and application state you require are ready. See Browser control and events.
- For MLCG, use the complete sample's prepare-hidden → scene/resource-ready → one REST Restart → reveal workflow. Avoid an autoplay start immediately followed by a second restart.
- Keep page loading, HTTP calls and UI work out of synchronous media callbacks. Serialize SDK control operations on the application's SDK owner.
When closing, stop new work and drain in-flight operations before detaching/closing the browser. Close receivers before their source, release every owned frame, and release the COM objects your application owns. Never close or final-release the plugin from its own synchronous callback.
6. Match the page to the video canvas
The plugin composites into video frames, not the preview window's desktop size. Match the page's design canvas and the video format used before HTML composition. The MLCG samples fit sources to HD1080 with aspect-preserving letterboxing before applying graphics.
Use plugin properties for destination placement, opacity, crop or zoom when required. For a full-frame overlay, a typical explicit placement is:
overlay.PropsSet("dst.x", "0%");
overlay.PropsSet("dst.y", "0%");
overlay.PropsSet("dst.w", "100%");
overlay.PropsSet("dst.h", "100%");
For exact options, scope and initialization timing, use the properties reference. Changing an HWND's size alone does not correct an incorrect media canvas.
Troubleshooting your first overlay
| Symptom | Check first |
|---|---|
| Video plays, but graphics are missing | The plugin is on the consumed video path; the URL is an output page; page resources are accessible; the overlay is visible and has finished application-level preparation. |
| A rectangle hides the video | The HTML/CSS background and output background are transparent, and the design is an overlay rather than an opaque fullscreen card. |
| Position or scale is wrong | The design resolution, converted video format, destination rectangle and page zoom—not only preview-window dimensions. |
| REST connects, but no sessions appear | The token can access published sessions. An account's design Library and its published sessions are different lists. |
| Updates appear in other outputs too | MLCG data/animation commands address a shared session. Use separate sessions or private Demo instances for independent operators. |
| Animation and video pause differently | Browser/REST animation and the source-video clock are separate. Loading a page does not automatically provide frame-accurate synchronization. |
Continue with your workflow
- Design with MLCG Editor and try the SDK samples
- Control MLCG graphics from C# with the REST client
- Control your own HTML page and exchange events
- Configure HTML5 Overlay properties
- Use HTML5 as a video source
Explore the MLCG template gallery for real default designs, animated previews and editable-content examples.
Still have questions?
Tell us what didn’t work or what you’d like clarified.