Advice on VideoReader including missing codec

I have some mpeg videos that I would like to scroll through, and export/crop individual frames for inclusion in a report. I do not have any image processing toolboxes.
  1. Is VideoReader the right tool, or overkill? I just need illustrative pictures at known times of interest. However, I must do this for many videos.
  2. VideoReader returns the following error to readerobj = VideoReader('2_1017.mpg'): The file requires the following codec(s) to be installed on your system: MPEG-2. Do I just install a codec pack like this one or is there more to it? Why do I need an additional codec if Windows Media Player can play this file on my Windows 7 machine?

 채택된 답변

Walter Roberson
Walter Roberson 2012년 9월 26일

0 개 추천

VideoReader() is probably the right tool.
You might have to install codecs if you are running MATLAB in 32 bit mode when your existing codecs are 64 bit, or vice versas.

댓글 수: 4

K E
K E 2012년 9월 26일
편집: K E 2012년 9월 26일
Fabulous. When I switched to 32-bit mode MATLAB I can read in the video. Then is there any reason to use 64-bit mode MATLAB and tackle the codec issue, if reading/processing is fast enough and I don't need to do this every day?
As long as you won't need more than a few gigabytes of memory, 32bit should be fine (and fast!). However, video processing could easily require more than this so beware.
K E
K E 2012년 9월 26일
편집: K E 2012년 9월 26일
Thanks so much Walter and Sean. This really saved me some grief. Once I started playing with the images in MATLAB, I thought of some image processing that would be helpful now that I have the capability...
K E
K E 2012년 9월 28일
편집: K E 2012년 9월 28일
If anyone has a similar problem in future, this answer shows the steps I took to be able to read the file into 64-bit MATLAB, which turned out to be necessary due to the file size.

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

추가 답변 (0개)

카테고리

제품

질문:

K E
2012년 9월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by