VideoReader.getFileFormats
File formats that VideoReader
supports
Description
Examples
View the list of file formats that VideoReader
supports on your system.
fmts = VideoReader.getFileFormats()
Video File Formats: .avi - AVI File .mj2 - Motion JPEG2000 .ogg - OGG File .ogv - OGG Video
This output is for a specific Linux® system. Your results might differ.
Check whether VideoReader
can read AVI files on the current system.
fmtList = VideoReader.getFileFormats(); if any(ismember({fmtList.Extension},'avi')) disp('VideoReader can read AVI files on this system.'); else disp('VideoReader cannot read AVI files on this system.'); end
VideoReader can read AVI files on this system.
Create a dialog box that allows a user to select a video file interactively.
Get the supported file formats.
formats = VideoReader.getFileFormats()
Video File Formats: .asf - ASF File .avi - AVI File .m4v - MPEG-4 Video .mj2 - Motion JPEG2000 .mov - QuickTime movie .mp4 - MPEG-4 .mpg - MPEG-1 .wmv - Windows Media Video
This output is for a Windows® system. Your results might differ.
Convert the formats
array to a filter
list.
filterSpec = getFilterSpec(formats)
filterSpec = 10×2 cell array {'*.asf;*.avi;*.m4v;*.mj2;*.mov;*.mp4;*.mpg;*.wmv;'} {'All Video Files' } {'*.asf' } {'ASF File (*.asf)' } {'*.avi' } {'AVI File (*.avi)' } {'*.m4v' } {'MPEG-4 Video (*.m4v)' } {'*.mj2' } {'Motion JPEG2000 (*.mj2)' } {'*.mov' } {'QuickTime movie (*.mov)' } {'*.mp4' } {'MPEG-4 (*.mp4)' } {'*.mpg' } {'MPEG-1 (*.mpg)' } {'*.wmv' } {'Windows Media Video (*.wmv)'} {'*.*' } {'All Files (*.*)' }
filterSpec
is a cell array that includes 'All
Video Files'
in the first row, and 'All Files (*.*)'
in
the last row.
Create the dialog box using uigetfile
.
[filename,pathname] = uigetfile(filterSpec);
Output Arguments
Supported video file formats, returned as an array of audiovideo.FileFormatInfo
objects
with the following properties.
Extension | File extension. |
Description | Text description of the file format. |
ContainsVideo | Logical value that indicates whether VideoReader can
read video from this format. |
ContainsAudio | Logical value that indicates whether VideoReader can
read audio from this format. |
VideoReader
cannot always read a particular
video file even if getFileFormats
lists its format. For
more information, see Supported Video File Formats.
On Windows and UNIX® systems, the list of file formats
does not always contain all the formats that VideoReader
can
read on your system. getFileFormats
returns a platform-dependent,
static list of formats that VideoReader
can read
on most systems.
Version History
Introduced in R2010b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)