Show video in App designers

6 views (last 30 days)
Le Dinh Minh Nhat
Le Dinh Minh Nhat on 25 Jun 2021
Answered: evaydh on 27 Jun 2022
Hi, I read a lot of answer how to show video in App designer. I want to show it in UI Figure not popup a new figure.
Would you mind have a look to my code and give me some suggestions ?
% Callbacks that handle component events
methods (Access = private)
% Image clicked function: Image
function ImageClicked(app, event)
vidObj = VideoReader('testvideo.mp4');
vidObj.CurrentTime = 0;
while hasFrame(vidObj)
vidFrame = readFrame(vidObj);
image(vidFrame, "Visible","on")
%imshow(vidFrame, "Parent",ax);
Thank you very much.

Accepted Answer

Mohammad Sami
Mohammad Sami on 25 Jun 2021
Do you need to get the frames of the video for some reason. If not I propose you use uihtml to display the video instead.
The example on how to do this is available in the uihtml documentations here.
Fahad Halawani
Fahad Halawani on 22 May 2022
Was this possible? I am finding difficulty implementing this to my app

Sign in to comment.

More Answers (1)

evaydh on 27 Jun 2022
Try using uiimage to play video and timer to control video playback. Don't worry. Mainstream computer configurations are sufficient.


Find more on Image Preview and Device Configuration in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!