Video files app designer

조회 수: 3 (최근 30일)
T.A.S.
T.A.S. 2018년 7월 2일
답변: Aniket 2024년 11월 21일
How do I add an option to upload video files to app designer?
  댓글 수: 1
Kevin Chng
Kevin Chng 2018년 9월 3일
편집: Kevin Chng 2018년 9월 3일
Hi, I'm looking at this solution as well.
However, I found an alternative way to do it.
v = VideoReader('song.mp4');
while hasFrame(v)
readFrame(v);
numFrames = numFrames + 1;
end
for i=1:1:length(v)
frame = read(v,iter2);
imshow(frame,'Parent',app.UIAxes2);
drawnow;
end
you may use button or axes to host image.

댓글을 달려면 로그인하십시오.

답변 (1개)

Aniket
Aniket 2024년 11월 21일
Hi @T.A.S.,
Video files can be uploaded to App Designer using "uigetfile" function. It opens a modal dialog box that lists files in the current folder. To ensure that user can upload video files only, the "filter" argument can be used as follows:
videoFilter = {'*.mp4;*.avi;*.mov;*.mkv'};
% Open the file selection dialog
[filename, pathname] = uigetfile(videoFilter, 'Select a Video File');
This function returns file name which can be used further according to the requirements.
You can know more about "uigetfile" function using this documentation:
Hope this helps you!

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by