MLive and MFLive can read Linear Timecode (LTC) from an audio signal and apply the decoded timecode to the live frames. LTC can be received from an external WASAPI device, an internal DirectShow audio device, an ASIO device, or an embedded audio channel of SDI live source. AJA capture devices can also read LTC directly from their reference input.
Enable LTC
Enable LTC decoding on the live object:
// MPlatform SDK
(m_objMLive as IMProps).PropsSet("object::ltc.enabled", "true");
// MFormats SDK
(myLiveSource as IMProps).PropsSet("ltc.enabled", "true");When ltc.enabled is true, the SDK reads LTC using the source selected by ltc.audio_source. The default source is external_device.
LTC properties
| Property | Default | Description |
|---|---|---|
ltc.enabled |
false |
Enables LTC decoding. |
ltc.sync |
false |
Waits for a newly decoded LTC value for up to 500 ms. When false, the maximum wait is half of the video-frame duration. |
ltc.audio_source |
external_device |
Selects the audio source:
|
ltc.audio_device |
Empty | Name of the WASAPI, DirectShow, or ASIO device. It is not used for embedded. |
ltc.audio_channel |
0 |
Zero-based audio channel containing LTC. Used with embedded, internal_device, and asio_device. One LTC signal is decoded from one channel. |
Use the object:: prefix for these properties when working with MPlatform MLive. MFormats MFLive uses the property names as shown in the table.
External WASAPI audio device
This is the default mode. With an empty ltc.audio_device, the default external audio device is used. To select another WASAPI device, set its name explicitly.
// MPlatform SDK
(m_objMLive as IMProps).PropsSet("object::ltc.enabled", "true");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_source", "external_device");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_device", audioDeviceName);
// MFormats SDK
(myLiveSource as IMProps).PropsSet("ltc.enabled", "true");
(myLiveSource as IMProps).PropsSet("ltc.audio_source", "external_device");
(myLiveSource as IMProps).PropsSet("ltc.audio_device", audioDeviceName);Enumerate available external audio devices as described in External audio for live sources. In this mode, LTC is read from the first device channel.
Internal DirectShow audio device
Use internal_device to read LTC from the audio input selected as an internal MLive/MFLive audio device (eMFDT_Audio). Set both the device name and the zero-based LTC channel.
// Example: read LTC from channel 8 of a DirectShow audio device
(m_objMLive as IMProps).PropsSet("object::ltc.enabled", "true");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_source", "internal_device");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_device", "My DirectShow Audio Device");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_channel", "8");ASIO device
Use asio_device to read LTC from an ASIO capture device. Pass the display name returned by the SDK device list, including the (ASIO) suffix.
// Example: read LTC from channel 8 of an ASIO device
(m_objMLive as IMProps).PropsSet("object::ltc.enabled", "true");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_source", "asio_device");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_device", "Dante Virtual Soundcard (x64) (ASIO)");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_channel", "8");Embedded live audio
Use embedded when LTC is carried in the audio embedded in the incoming SDI live signal. No separate audio device is opened; select only the zero-based embedded audio channel.
// Example: read LTC from embedded audio channel 8
(m_objMLive as IMProps).PropsSet("object::ltc.enabled", "true");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_source", "embedded");
(m_objMLive as IMProps).PropsSet("object::ltc.audio_channel", "8");AJA LTC at the reference input
AJA capture devices that support LTC on their reference input provide a hardware timecode path. This path is configured on the AJA capture device itself and does not use ltc.enabled or ltc.audio_source.
Set aja.timecode_source to ref_ltc after selecting the AJA live device. The default value, embedded, reads the timecode embedded in the incoming video signal.
// MPlatform SDK
(m_objMLive as IMProps).PropsSet("object::aja.timecode_source", "ref_ltc");
// MFormats SDK
(myLiveSource as IMProps).PropsSet("aja.timecode_source", "ref_ltc");Connect the LTC signal to the AJA card reference input. The card must support LTC input on that port. If no LTC is present on the reference input, the AJA capture path falls back to embedded input timecode.
Channel numbering
ltc.audio_channel is zero-based: 0 is the first audio channel, 1 is the second, and so on. The property accepts one channel number only. If the selected channel is outside the available audio-channel range, LTC cannot be decoded.
Switching sources at runtime
LTC properties can be changed while the live object is running. When the source type changes, the SDK stops the previous LTC reader and creates the reader required by the newly selected source. If the selected device cannot be opened or started, ltc.enabled is set to false to prevent repeated start attempts on every frame.