Callback functions for displaying videos
Mostrar comentarios más antiguos
I am making a GUI in Matlab using AppDesigner. It displays a video after pressing the push button. This video is already stored in a folder and I am reading it first and then playing it. But the problem is "The video is displayed in a different window". How can I display the video in the same window where push button was pressed. I am attaching here the piece of code used as callback function for dispalying window.
function ButtonPushed(app, event)
app1.VFR= vision.VideoFileReader('newfile.avi');
app1.VPR = vision.VideoPlayer;
% Play video. Every call to the step method reads another frame.
while ~isDone(app1.VFR)
frame = step(app1.VFR);
step(app1.VPR,frame);
end
end
Please suggest a way for this. In case anyone need details regarding the problem please leave a comment.
2 comentarios
Mohammad Sami
el 6 de En. de 2020
If you have the latest version of Matlab and your videos are mp4 standard, you can use the uihtml element to embed your video as an html.
The html tags for embedding a video can be seen here.
NAVNEET NAYAN
el 6 de En. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Video Formats and Interfaces en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
