In this example, you use the From Multimedia File source block to import a video stream into a Simulink® model and the To Video Display sink block to view it. This procedure assumes you are working on a Windows platform.
You can open the example model by typing
Run your model.
View your video in the To Video Display window that automatically appears when you start your simulation.
Note: The video that is displayed in the To Video Display window runs at the frame rate that corresponds to the input sample time. To run the video as fast as Simulink processes the video frames, use the Video Viewer block.
You have now imported and displayed a multimedia file in the Simulink model. In the Export to Video Files example you can manipulate your video stream and export it to a multimedia file.
The block parameters in this example were modified from default values as follows:
|From Multimedia File|
Use the From Multimedia File block to import the multimedia file into the model:
By default, the Number of times to
play file parameter is set to
|To Video Display|
Use the To Video Display block to view the multimedia file.
Set this parameter from the Settings menu of the display viewer.
You can locate the Model Configuration Parameters by selecting Model Configuration Parameters from the Simulation menu. For this example, the parameters on the Solver pane, are set as follows:
Stop time =