필터 지우기
필터 지우기

VideoReader performance on OSX is stellarly slow

조회 수: 2 (최근 30일)
Kenz
Kenz 2012년 2월 23일
답변: MF 2017년 11월 24일
Anytime I need to use VideoReader, I get horrid performance out of read(). We're talking about .3-.4s per frame. This is for opening mp4 files, so I initially thought this had something to do with keyframes. However, if I use the read() function to get several hundred images at once, it's actually a teensy bit slower than if I use read to get each sequential image, so this isn't a solution.
Does anyone have any ideas? On Windows is it just as bad, or is this a Mac-only thing?
  댓글 수: 2
M. A. Hopcroft
M. A. Hopcroft 2013년 5월 28일
Same experience on Ubuntu with R2012a and avi files using the xvid codec. No solution as yet.
Julien
Julien 2014년 1월 7일
Same problem on R2013b, it is a problem that has still not be solved. For a 2.3 Mb video, 383 frames takes 306 seconds, this is quite painfull

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

답변 (3개)

Ben
Ben 2012년 5월 23일
i'm having similar problems. for a 400 MB .mov/mpeg4 file on a fedora linux box, readerobj = VideoReader(filename) takes several minutes. so does info=mmfileinfo(filename). on the other hand, Quicktime will display the first frame and the frame size, rate, and duration almost immediately. it is as if matlab is reading the entire file, not just the header.
why is matlab so slow? are there any work arounds?

Justin Elstrott
Justin Elstrott 2013년 11월 18일
I have the same issue on a Mac running Matlab 2011b. VideoReader hangs after loading ~3000 frames of an XVID encoded .AVI file.

MF
MF 2017년 11월 24일
I have experienced the same problem and found the tip posted below that helped me solved the issue. Source: https://www.mathworks.com/help/vision/ref/vision.videofilereader-system-object.html)
Video Reading Performance on Windows Systems: To achieve better video reader performance on Windows for MP4 and MOV files, MATLAB uses the system's graphics hardware for decoding. However, in some cases using the graphics card for decoding can result in poorer performance depending on the specific graphics hardware on the system. If you notice slower video reader performance on your system, turn off the hardware acceleration by typing:
matlab.video.read.UseHardwareAcceleration('off')
Hardware acceleration can be reenabled by typing:
matlab.video.read.UseHardwareAcceleration('on')

카테고리

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