MJPEG Stream Behavior
Feature Description
The MJPEG Stream behavior allows the user to decode and play an MJPEG video stream. The MJPEG Stream behavior uses the onboard JPEG Decoder hardware to decode the JPEG frames and display them on a bitmap node.
Refer to the Video Format Conversion documentation to convert any video to MJPEG format.
Supported Platforms
At present, the Motion JPEG decoder is exclusively supported on the Infineon Traveo 2 platform.
Limitations
The Motion JPEG Decoder Behavior currently has the following limitations.
- The video file must be included as part of the asset and cannot be provided to the hardware dynamically through communication interfaces at runtime.
- Check the JPEG Bitmap Converter documentation for the supported pixel formats.
Enabling the JPEG Decoder feature
If the MJPEG Decoder Behavior is being used, ensure that the JPEG Decoder feature has been enabled in the CMAKE options. While generating the project for target, turn on the CMAKE flag CGIDEVICE_TRAVEO2_JPEG_DECODER_ENABLED or add this flag to the toolchain file.

How to use the Motion - JPEG Decoder
- Import the video as raw resource: Using the import menu select “Import Raw Resources”. This ensures that the video is available in its original format for further processing.

- Add the Bitmap node: Add a bitmap node to a 2D scene.
- Add the Behavior to a Bitmap Node: Place the Motion - JPEG Decoder behavior onto a Bitmap Node in the scene.

- Set the Resource Candera Name: Paste the Candera Name of the raw MJPEG video into the ResourceCanderaName property using the steps below.
Step 1: Copy the Candera Name of the raw MJPEG video from the Solution Explorer under the Asset properties of the JPEG resource.

Step 2: Paste the Candera Name into the ResourceCanderaName property of the Motion - JPEG Decoder Behavior in the Properties panel.

-
Playing in Loop: The video can be configured to play continuously in a loop, if required.
- Initial State: The initial playback state of the video can be selected from the dropdown menu, as shown below.

- Frame Rate: Ensure that the frame rate is set to match the actual frame rate of the imported MJPEG video.

The properties for the Motion JPEG Decoder behavior are bindable and therefore can be modified at runtime as well.