Play movies, videos, or image sequences
implay function to open the Video Viewer app, which plays MATLAB® movies, videos, or image sequences (also called image stacks). Using Video
Viewer you can select the movie or image sequence that you want to play, jump to a
specific frame in the sequence, change the frame rate of the display, or perform other
viewing activities. You can open multiple Video Viewers to view different movies
The figure shows the Video Viewer app containing an image sequence.
implay opens the Video Viewer app. To select the movie or
image sequence that you want to play, use the Video Viewer File
implay( opens the Video Viewer
app, displaying the content of the file specified by
The file can be an Audio Video Interleaved (AVI) file. The Video Viewer reads one
frame at a time, conserving memory during playback. The Video Viewer does not play
implay( opens the Video Viewer app,
displaying the first frame in the multiframe image specified by
implay(___, specifies the
frame rate at which you want to view the movie or image sequence.
Animate a sequence of images.
load cellsequence implay(cellsequence,10);
Visually explore a stack of MRI images.
load mristack implay(mristack);
Play an AVI file.
filename— File name
File name of AVI file, specified as a character vector or string scalar.
I— Multiframe image sequence
Multiframe image sequence, specified as one of the following.
A MATLAB movie structure
A binary or grayscale image sequence, specified as an m-by-n-by-1-by-k array or an m-by-n-by-k array
A truecolor (RGB) image sequence, specified as an M-by-N-by-3-by-K array.
I can be numeric but
preferred. The actual data type used to display pixels may differ from the
source data type.
fps— Frames per second
20(default) | positive number
Frame rate, in frames-per-second, specified as a positive number. If
omitted, the Video Viewer uses the frame rate specified in the file or the
You can also open the Video Viewer app through the Apps tab. Navigate to the Image Processing and Computer Vision group and click Video Viewer.