Main Content

Read and Display YCbCr Video from File

This example shows you how to read video frames from a multimedia file as their luma and chrominance components, and then display them.

Example Model

Open the Simulink® model.

modelname = 'ex_blkToVideoDisplayYCbCr.slx';

The model reads an input video file using a From Multimedia File block with these parameters:

  • File nameviptrain.avi

  • Output color formatYCbCr 4:2:2

The model displays the video frames using a To Video Display block with the Input Color Format parameter set to YCbCr 4:2:2. The Y port of each block represents the luma component and the Cb and Cr ports represent the blue-difference and red-difference chrominance components, respectively, of the input video frames.

Simulate the Model

Run the model. The model displays the video frames in a viewer window.