| Contents | Index |
info = mmfileinfo(filename)
info = mmfileinfo(filename) returns a structure, info, with fields containing information about the contents of the multimedia file identified by filename. The filename input is a string enclosed in single quotation marks.
If filename is a URL, mmfileinfo might take a long time to return because it must first download the file. For large files, downloading can take several minutes. To avoid blocking the MATLAB command line while this processing takes place, download the file before calling mmfileinfo.
The info structure contains the following fields, listed in the order they appear in the structure.
Field | Description |
|---|---|
String indicating the name of the file. | |
String indicating the absolute path to the file. | |
Length of the file in seconds. | |
Structure containing information about the audio data in the file. See Audio Data for more information about this data structure. | |
Structure containing information about the video data in the file. See Video Data for more information about this data structure. |
The Audio structure contains the following fields, listed in the order they appear in the structure. If the file does not contain audio data, the fields in the structure are empty.
Field | Description |
|---|---|
Text string, indicating the audio format. | |
Number of audio channels. |
The Video structure contains the following fields, listed in the order they appear in the structure. If the file does not contain video data, the fields in the structure are empty.
Field | Description |
|---|---|
Text string, indicating the video format. | |
Height of the video frame. | |
Width of the video frame. |
Display information about the demo file xylophone.mpg:
info = mmfileinfo('xylophone.mpg')
audio = info.Audio
video = info.VideoMATLAB returns:
info =
Filename: 'xylophone.mpg'
Path: [1x75 char]
Duration: 4.7020
Audio: [1x1 struct]
Video: [1x1 struct]
audio =
Format: 'MPEG'
NumberOfChannels: 2
video =
Format: 'MPEG1'
Height: 240
Width: 320where Path is system-dependent.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |