| MATLAB Function Reference | ![]() |
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 quotes.
Note mmfileinfo can be used only on Microsoft® Windows® and Macintosh® operating systems. |
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 | |
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.
Field | Description |
|---|---|
Text string, indicating the video format | |
Height of the video frame | |
Width of the video frame |
This example gets information about the contents of a file containing audio data.
info = mmfileinfo('my_audio_data.mp3')
info =
Filename: 'my_audio_data.mp3'
Duration: 1.6030e+002
Audio: [1x1 struct]
Video: [1x1 struct]
To look at the information returned about the audio data in the file, examine the fields in the Audio structure.
audio_data = info.Audio
audio_data =
Format: 'MPEGLAYER3'
NumberOfChannels: 2
Because the file contains only audio data, the fields in the Video structure are empty.
info.Video
ans =
Format: ''
Height: []
Width: []
![]() | mlock | mmreader | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |