Show video in App designers

7 vues (au cours des 30 derniers jours)
Le Dinh Minh Nhat
Le Dinh Minh Nhat le 25 Juin 2021
Réponse apportée : evaydh le 27 Juin 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.

Réponse acceptée

Mohammad Sami
Mohammad Sami le 25 Juin 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.
  2 commentaires
Le Dinh Minh Nhat
Le Dinh Minh Nhat le 25 Juin 2021
Thank you for your suggestion. I just want to show the video in figure. I will try to use uihtml and reply you later
Fahad Halawani
Fahad Halawani le 22 Mai 2022
Was this possible? I am finding difficulty implementing this to my app

Connectez-vous pour commenter.

Plus de réponses (1)

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


En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by