Callback functions for displaying videos
显示 更早的评论
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 个评论
Mohammad Sami
2020-1-6
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
2020-1-6
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Video Formats and Interfaces 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
