Synthetic video for transcoder

Overview

The Synthetic Video feature in the Injector ensures continuous video output, regardless of the presence or absence of a valid video input signal. This guarantees that the video output stream remains uninterrupted at all times.

Functionality

When enabled, the Injector generates an H.264 video stream using a provided bitmap image. The generated video serves as a fallback mechanism in cases where the primary video source is unavailable. This functionality is particularly useful in maintaining a stable video stream in scenarios where a loss of input video could disrupt downstream processing.

Bitmap Image Requirements

  • The Injector requires a bitmap (BMP) file as the source image.
  • PNG, JPEG, or other compressed formats are not supported.
  • Ensure the resolution of the bitmap matches the desired output resolution to avoid unintended scaling.

Operating Modes

The Synthetic Video feature can be used in both:

Video Pass-Through Mode
- If the original video input is present, the Injector passes it through unchanged.
- If the original video input is lost, the Injector seamlessly switches to the synthetic video output generated from the bitmap.

Video Transcoding Mode
- The Injector transcodes incoming video as per the defined settings.
- If the input video is lost, it automatically transitions to the synthetic video without interruption.

Scenarios

There are two main scenarios where synthetic video is utilized:

Stream Interruption

A valid video stream was previously present but has been lost due to signal loss, hardware failure, or another issue.
The Injector detects the loss and seamlessly transitions to synthetic video, ensuring uninterrupted output.

No Input Stream from the Beginning

No valid video input is available when the Injector starts.
The Injector immediately generates and outputs synthetic video, ensuring that there is always an active stream.

Configuration

To enable the Synthetic Video feature, provide the Injector with a valid bitmap file and configure the system to activate synthetic video generation when required. Ensure that:
- The bitmap is accessible to the Injector at runtime.
- The output resolution and encoding settings match the intended use case.

Injector configuration:

  • MaxCapturedVideoResolution property must be set
  • The method TranscodeIncomingVideo (VideoEncodePropsWr props) must be called.
  • VideoEncodePropsWr props, the following must be set:
  • Set IsEnabled to true.
  • NoSourceTimeoutMsec
  • NoSourceBitmapFileName

EncodingParams:
- Width and Height - must be set
- Set FrameRateEnforcement to FrameRateEnforcementWr.FrameRateEnforcement_AsMin
- FrameRate must be set

If RTP Extension is needed, must configure the following params:
- StoredInputInfoFileName property must be set to an XML defining the pins (AV1 and Private data).
- StoredInputInfoIsReadOnly must be set to true

Sample XML file:

<MediaTypes>
    <MediaType>
        <Pid>1</Pid>
        <MajorType>{73646976-0000-0010-8000-00AA00389B71}</MajorType>
        <SubType>{31305641-0000-0010-8000-00AA00389B71}</SubType>
        <FixedSizeSamples>1</FixedSizeSamples>
        <SampleSize>65536</SampleSize>
    </MediaType>
    <MediaType>
        <Pid>2</Pid>
        <MajorType>{e436eb83-524f-11ce-9f53-0020af0ba770}</MajorType>
        <SubType>{ACE20434-F7E9-4C0F-9744-259EEB1E9826}</SubType>
        <FixedSizeSamples>1</FixedSizeSamples>
        <SampleSize>65536</SampleSize>
    </MediaType>
</MediaTypes>

Use Cases

  • Uninterrupted Streaming: Ensures that video output always exists, even if the input source fails.
  • Failover Mechanism: Provides a fallback video stream for mission-critical applications.
  • Signal Loss Handling: Avoids blank frames or loss of video in cases of signal disruption.

This feature enhances the robustness of the Injector, making it suitable for applications requiring high availability and reliability in video processing environments.