Both MPlatform and MFormats SDKs provide MCCDisplay to draw Closed Captions over video. MCCDisplay can also preview reader-decoded ASS/SRT text subtitles, preserving Unicode characters such as Cyrillic.
Use an SDK license that includes the Closed Captions option. Unicode subtitle preview uses the same caption-license checks. Availability depends on the installed reader and MCCDisplay components; confirm that your SDK package includes Unicode subtitle preview.
The caption preview looks like:

Select the source and subtitle track
Select an ASS/SRT subtitle track on the reader or source file. MCCDisplay controls how the selected data is displayed; its channel, cc_service, and cc_track properties do not select a file's subtitle language.
| SDK and owner | Configurable selection | Read-only track count |
|---|---|---|
| MFormats: MFReader | subtitle_track |
info::subtitle_tracks |
| MPlatform: MFile | file::subtitle_track |
file::info::subtitle_tracks |
For a single track, use its zero-based index: 0 means the first subtitle track, not a particular language. The built-in selection default is -1, which disables subtitle-track decoding. Choose a valid track for the opened file, preferably before playback or frame retrieval. In a playlist, configure the relevant file item's subtitle selection.
MPlatform SDK
Add MCCDisplay as a plugin to your connected source. This C# fragment assumes m_objFile is an existing, opened MFile and selects its first subtitle track before playback:
using MPLATFORMLib;
var ccDisplay = new MCCDisplayClass();
ccDisplay.PropsSet("subtitle_text", "true");
m_objFile.PropsSet("file::subtitle_track", "0");
m_objFile.PluginsAdd(ccDisplay, 0);For a playlist, attach the plugin to the existing playlist instead:
m_objPlaylist.PluginsAdd(ccDisplay, 0);The connected source sends frames through the plugin automatically. Retain the plugin while it is attached. When finished, stop playback, remove it with PluginsRemove(ccDisplay) on the object to which it was added, then release your plugin COM reference. Close and release application-owned sources through their normal lifecycle.
MFormats SDK
Process each acquired frame before sending it to an output such as MFPreview. The following fragments use MFORMATSLib and System.Runtime.InteropServices. The application supplies inputPath and an existing configured preview.
Create the reader and plugin once, outside the frame loop:
var reader = new MFReaderClass();
var ccDisplay = new MCCDisplayClass();
ccDisplay.PropsSet("subtitle_text", "true");
reader.ReaderOpen(inputPath, "subtitle_track=0");Use this block for each iteration of your existing playback loop. The application handles cancellation, end of media, and retrieval errors around the loop.
MFFrame sourceFrame = null;
MFFrame modifiedFrame = null;
try
{
reader.SourceFrameGet(10000000, out sourceFrame, "");
int framesRest;
ccDisplay.ProcessFrame(sourceFrame, out modifiedFrame,
out framesRest, "");
if (modifiedFrame != null)
preview.ReceiverFramePut(modifiedFrame, 10000000, "");
}
finally
{
if (modifiedFrame != null)
Marshal.ReleaseComObject(modifiedFrame);
if (sourceFrame != null)
Marshal.ReleaseComObject(sourceFrame);
}The wait arguments above are one second in 100-nanosecond units. Once the loop has stopped, call reader.ReaderClose() and release the reader and MCCDisplay COM references in application cleanup, including error paths. The application remains responsible for its preview object's lifecycle.
The processed frame contains the drawn overlay. Send that frame to the intended output; sending the original frame bypasses the displayed result. Likewise, placing MCCDisplay on an MPlatform source affects that source's downstream video.
Unicode subtitle preview
For reader-decoded ASS/SRT text, the reader preserves Unicode text alongside the caption data. With subtitle_text=true, MCCDisplay uses that text in preference to CEA-608/708 rendering. This preserves Cyrillic without changing cc_codepage. Between subtitle cues, an empty text snapshot keeps the preview clear instead of falling back to synthesized CEA-608 text.
If a frame has no Unicode text snapshot, MCCDisplay uses cc_type to select CEA-608 or CEA-708. To explicitly preview caption data even when Unicode subtitle text is available, disable text preference:
ccDisplay.PropsSet("subtitle_text", "false");
ccDisplay.PropsSet("cc_type", "708");
ccDisplay.PropsSet("cc_service", "1");Explicit cc_type=teletext selection takes precedence over Unicode text preference. It displays the OP-47 Teletext page supplied by the reader or capture path.
Unicode text preview is a video overlay, not Unicode encoding into CEA-608. ASS override styling is flattened; configure the preview appearance with MCCDisplay properties and cc_style.
MCCDisplay object properties
Set these properties directly on the MCCDisplay instance with PropsSet, without a file:: prefix. Configure them before attaching the plugin or processing frames. The plugin also reads display settings while processing subsequent frames.
ccDisplay.PropsSet("face", "Arial");
ccDisplay.PropsSet("cc_style", "align='center' vert-align='top'");At creation, MCCDisplay loads settings from HKEY_CURRENT_USER\SOFTWARE\Medialooks\MCCDisplay. Existing registry settings can override the built-in defaults below. Use explicit PropsSet calls when your application requires a particular setting.
Display and caption selection
All entries in this table are configurable; reset is a one-shot command.
| Property | Type / built-in default | Meaning and scope |
|---|---|---|
show_subtitles |
Boolean / true
|
Enables subtitle, caption, and XDS drawing. Set to false to hide the overlay. |
subtitle_text |
Boolean / true
|
Prefer available Unicode ASS/SRT text over CEA-608/708. False restores caption selection through cc_type. Explicit Teletext selection takes precedence. |
cc_type |
String / 608
|
608, 708, or teletext. Unicode text preference can override 608/708 selection. |
channel |
Numeric string / 1
|
CEA-608 channel, 1–4. This is not a file subtitle-track index. |
cc_service |
Integer / 1
|
CEA-708 caption service, 1–63. Value 0 enables the legacy all-services mode. |
cc_track |
String / empty | CEA-708 input selection: ATSC for GA94 data or CDP for Caption Distribution Packets. Empty allows both available inputs. |
cc_codepage |
Integer / 0
|
CEA-708 P16 character decoding. Zero uses CDP-based Korean selection when available, otherwise UTF-16BE. A nonzero Windows code page overrides that selection. See below. |
xds_duration |
Double, seconds / -1.0
|
XDS information retention/display duration: 0 disables XDS output; -1 retains information without an age limit; positive values specify seconds. XDS is not drawn in Teletext mode. |
reset |
Boolean command / not set | Set true to clear retained caption, XDS, and Teletext state on the next processed frame. The command is then removed. |
Appearance
These properties are configurable strings, except for the numeric outline width. cc_style overrides the base appearance settings for Unicode text and CEA-608/708. For additional formatting parameters, see text formatting options.
| Property | Built-in default | Meaning |
|---|---|---|
cc_style |
Empty | Text-formatting parameter list for subtitle/caption drawing, such as align and vert-align. |
xds_style |
Empty | Separate text-formatting parameter list for XDS information. |
color |
white |
Base text color. Accepts named colors or hexadecimal ARGB colors. |
face |
Consolas |
Font face. Choose an installed font containing the required characters. Teletext also uses this font setting. |
bg-color |
Empty | Text background color, using named or hexadecimal ARGB colors. In Unicode text preview the background follows the text runs rather than filling the whole safe area. |
outline |
Not set | Numeric text outline width, in units of 1/240 of the text renderer's drawing height. Zero disables the outline. |
outline-color |
Not set | Text outline color when an outline is enabled. |
Unicode subtitles are centered horizontally at the bottom by default, inside a safe area inset by 7% from each edge. To move them to the top while retaining that inset:
ccDisplay.PropsSet("cc_style", "align='center' vert-align='top'");The alignment values used here are left, center, and right horizontally, and top, center, and bottom vertically. CEA-608/708 use their caption layout; the Unicode safe-area description does not define their placement.
Character encoding for CEA-708
cc_codepage affects P16 characters in CEA-708 caption data. It does not repair a file's Unicode subtitle track, change CEA-608 character mapping, or change the standard CEA-708 G0–G3 character sets.
With the default value 0, P16 uses UTF-16BE unless matching Korean CDP service information selects the legacy Korean encoding described below. This is metadata-based selection, not detection from the text or selection of the system ANSI code page.
| Value | Encoding | Use and limitations |
|---|---|---|
0 |
Automatic Korean CDP selection; otherwise UTF-16BE | Default. Without a matching legacy Korean service descriptor, interprets P16 as a big-endian Unicode code unit. |
932 |
Windows-932 / Shift-JIS | Japanese legacy double-byte characters. |
936 |
Windows-936 | Simplified Chinese legacy double-byte characters. |
949 |
Windows-949 / Unified Hangul Code | Korean legacy KS X 1001-compatible byte pairs. |
950 |
Windows-950 / Big5 | Traditional Chinese legacy double-byte characters. |
1361 |
Johab | Korean Johab byte pairs. |
20932 |
EUC-JP | Japanese two-byte EUC-JP characters. |
51949 |
EUC-KR | Korean EUC-KR byte pairs. |
1251 |
Windows-1251 | Not suitable for Cyrillic P16 decoding through the legacy conversion path: that path expects two input bytes to produce one character. |
65001 |
UTF-8 | Can convert a complete two-byte UTF-8 sequence within one P16 command. Three- and four-byte sequences are not supported by this conversion path. |
Nonzero values are Windows code page identifiers and require the corresponding encoding to be available in the operating system. The table provides examples, not a fixed enumeration. Legacy conversion consumes a P16 byte pair whose first byte is nonzero and must produce one UTF-16 character; a pair beginning with zero is interpreted directly.
For example, to force Korean legacy P16 decoding rather than Unicode subtitle preview:
ccDisplay.PropsSet("subtitle_text", "false");
ccDisplay.PropsSet("cc_type", "708");
ccDisplay.PropsSet("cc_service", "1");
ccDisplay.PropsSet("cc_codepage", "949");Automatic encoding selection for Korean CEA-708 captions
With cc_codepage=0, MCCDisplay reads valid CDP caption-service information. For a matching digital service whose language is kor (case-insensitive), it uses the korean_code flag:
| korean_code | Selected encoding |
|---|---|
0 |
KS X 1001, decoded using Windows code page 949 |
1 |
UTF-16BE |
ccDisplay.PropsSet("subtitle_text", "false");
ccDisplay.PropsSet("cc_type", "708");
ccDisplay.PropsSet("cc_service", "1");
ccDisplay.PropsSet("cc_codepage", "0");Other services use UTF-16BE, which is also the fallback until matching service information arrives. The detected encoding is remembered per service until its descriptor is updated or the caption source is reset. A nonzero cc_codepage overrides automatic selection.
This mechanism requires valid CDP service information. It does not guess an encoding from caption text and does not provide general encoding detection for GA94-only sources without that metadata. It affects P16 characters only.
Still have questions?
Tell us what didn’t work or what you’d like clarified.