Documentation Center

  • Trial Software
  • Product Updates


Class: VideoReader

Query property values for video reader object


Value = get(obj,Name)
Values = get(obj,{Name1,...,NameN})
allValues = get(obj)


Value = get(obj,Name) returns the value of the property with the specified Name for object obj.

Values = get(obj,{Name1,...,NameN}) returns the values of the specified properties in a 1-by-N cell array.

allValues = get(obj) returns a scalar structure that contains the values of all properties of obj. Each field name corresponds to a property name.

get(obj) displays all property names and their current values.

Input Arguments


VideoReader object created by the VideoReader function.


String enclosed in single quotation marks that specifies a VideoReader property.

Output Arguments


String containing the value associated with the specified VideoReader property.


Cell array containing the values associated with the specified VideoReader properties. Values is a row vector, with one column for each property.


Scalar (1-by-1) structure array that contains the values of all properties of VideoReader object obj.


expand all

Display All Object Properties

Display all properties of an object associated with the example file, xylophone.mp4.

xyloObj = VideoReader('xylophone.mp4');
General Settings:
    Duration = 4.7000
    Name = xylophone.mp4
    Path = matlabroot\toolbox\matlab\audiovideo
    Tag = 
    Type = VideoReader
    UserData = []

  Video Settings:
    BitsPerPixel = 24
    FrameRate = 30
    Height = 240
    NumberOfFrames = 141
    VideoFormat = RGB24
    Width = 320

Store Specific Object Properties

Create a 1-by-3 cell array that contains the values of the Height, Width, and NumberOfFrames properties of an object associated with xylophone.mp4.

xyloObj = VideoReader('xylophone.mp4');
xyloSize = get(xyloObj, {'Height','Width','NumberOfFrames'})
xyloSize = 

    [240]    [320]    [141]


To access a single property, you can use dot notation. Reference each property as though it is a field of a structure array. For example, find the value of the NumberOfFrames property for object xyloObj (as created in the Examples):

numFrames = xyloObj.NumberOfFrames;

This command is exactly equivalent to:

numFrames = get(xyloObj, 'NumberOfFrames');

See Also


Was this topic helpful?