Is it possible to view multiple videos at the same time (and being able to process it with custom code)?
2 views (last 30 days)
vidObj = VideoReader('homer1.mp4');
vidObj2 = VideoReader('homer2.mp4');
while hasFrame(vidObj) && hasFrame(vidObj2)
vidFrame = readFrame(vidObj);
vidFrame2 = readFrame(vidObj2);
I'd like to be able to read two video files, process them in real time and show them in seperate figures. The code above does not really work (I get the error message:"Error using VideoReader/initReader (line 734) Failed to initialize internal resources."), but I'm sure there are better methods to watch videos. What is the best way to show such videos (while they are processed)? I attached the video files to this question.
Thanks in advance
Mahesh Taparia on 7 Oct 2021
Edited: Mahesh Taparia on 7 Oct 2021
You can combine the frames of both the videos and visulaize them in loop using imshow function. For example, consider the below example:
v = VideoReader('xylophone.mp4');
frame = readFrame(v);
I = [frame frame];
Hope it help!