필터 지우기
필터 지우기

Why doesn't VideoReader(filename) return?

조회 수: 3 (최근 30일)
asaf benjamin
asaf benjamin 2021년 3월 31일
댓글: asaf benjamin 2021년 8월 9일
I'm runnin the following code:
v = VideoReader('video.mp4')
on a video that plays with no problem in my media player, but the function just "hangs", i.e. doesn't return at all. I can't even pause execution or kill it with Ctrl+C, I have to force the whole Matlab session to end while potentially losing unsaved work.
Trying to debug this and 'stepping in' whenever poosible, I get to line 271 (function 'open' in the script
'C:\Program Files\MATLAB\R2020b\toolbox\shared\asynciolib\+asyncio\Channel.m')
% Gain exclusive access of the device.
obj.ChannelImpl.open(options);
which doesn't return. Matlab version is 2020b. Any help would be highly appreciated.
  댓글 수: 4
asaf benjamin
asaf benjamin 2021년 8월 4일
This issue happens with several videos (but not all videos, of course). An example video can be found here. Thanks!
asaf benjamin
asaf benjamin 2021년 8월 9일
I can now confirm that, not only does the video play with no problem in any standard media player, but it is also read with no problem in Open CV, simply using:
vidcap = cv2.VideoCapture(vid_name)
success, image = vidcap.read()
I'd prefer to use Matlab for this, but if there's no solution to the problem I guess I'd have to move to Python instead...

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by