Display, Stream, and Preview Videos
View Streaming Video in MATLAB
Basic Video Streaming
Use the video player
System object when you require a simple video display in MATLAB® for streaming video.
Code Generation Supported Video Streaming Object
Use the deployable video player
vision.DeployableVideoPlayer System object as a
basic display viewer designed for optimal performance. This object
supports code generation on all platforms.
Preview Video in MATLAB
Use the Image Processing Toolbox™ Video Viewer app to view videos directly from file or from variables in the MATLAB workspace. The app is a full featured video player with toolbar controls. The app also offers access to tools that enable you to modify the appearance of the video and to inspect the data in a region of the image in finer detail.
You can open several instances of the Video Viewer app simultaneously to view multiple video data sources at once. You can also dock the apps in the MATLAB desktop. Use the figure arrangement buttons in the upper-right corner of the Sinks window to control the placement of the docked players.
View Video in Simulink
Code Generation Supported Video Streaming Block
Use the To Video Display block in your Simulink® model as a simple display viewer designed for optimal performance. This block supports code generation for the Windows® platform.
Simulation Control and Video Analysis Block
Use the Video Viewer block when you require a wired-in video display with simulation controls in your Simulink model. The Video Viewer block provides simulation control buttons directly from the player interface. The block integrates play, pause, and step features while running the model and also provides video analysis tools such as pixel region viewer.
View Video Signals Without Adding Blocks
The Video Viewer app enables you to view video signals in Simulink models without adding blocks to your model. You can open several instances of the app simultaneously to view multiple video data sources at once. You can also dock these apps in the MATLAB desktop. Use the figure arrangement buttons in the upper-right corner of the Sinks window to control the placement of the docked apps.
Set Simulink simulation mode to
Normal to use
Video Viewer. The app does not work when you use
Accelerating Simulink Models.
implayto view a Simulink signal:
Open a Simulink model.
Open the Video Viewer app by typing
implayon the MATLAB command line.
Run the Simulink model.
Select the signal line you want to view.
On the Video Viewer toolbar, select File > Connect to Simulink Signal .
The video appears in the player window.
You can use multiple Video Viewer apps to display different Simulink signals.
During code generation, the Simulink Coder™ does not generate code for the Video Viewer app.