Rank: 190 based on 455 downloads (last 30 days) and 3 files submitted
photo

Micah Richert

E-mail
Company/University
Salk Institute, UCI

Personal Profile:

I am a Neuroscientist and I program for fun.


 

Watch this Author's files

 

Files Posted by Micah Richert View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 May 2010 mmwrite write AVI/ASF/WMV/WMA file from movies read by mmread Author: Micah Richert graphics import, graphics export, write avi asf wmv wma..., movie, not a function 82 53
  • 4.83333
4.8 | 15 ratings
12 Nov 2009 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert data import, mmreadffgrabmacox, ffgrad unable open th..., ami 336 308
  • 4.72816
4.7 | 108 ratings
29 Apr 2008 mmplay replacement for the movie command and play movies read by mmread Author: Micah Richert graphics import, graphics export, play movies mmread mo... 37 4
  • 3.0
3.0 | 2 ratings
Comments and Ratings by Micah Richert View all
Updated File Comments Rating
23 Nov 2011 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert

Hi Kevin,,

Sorry for the delayed reply. I'm not sure why struct returned by mmread doesn't work for you, specifically v.nrFramesTotal. if nrFramesTotal is positive it is the number of frames in the video, if it is negative then the video doesn't report the total number of frames and nrFramesTotal is estimated from the frame rate and duration of the video. So, the following code should work for you:

v = mmread('somevideo.mpg',1);
if v.nrFramesTotal > 0
vlast = mmread('somevideo.mpg',v.nrFramesTotal);
else
% estimated last frame, try reading past the end of the video, after which nrFramesTotal will be accurate.
vlast = mmread('somevideo.mpg',-v.nrFramesTotal*1.01);
vlast = mmread('somevideo.mpg',v.nrFramesTotal);
end

Hope this helps,
Micah

23 Nov 2011 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert

Hi Jennifer,

You have a few options. One is to use 64 bit Matlab (on a 64 bit machine with lots of memory). Another option is to read the video in small chunks and down sample the images so that they take up less memory. The final option is to use the processFrame.m interface, type "help processFrame" for more information.

Best,
Micah

17 Mar 2011 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert

Hi Chris,

640x480 uncompressed video requires 640*480*3 bytes per frame or just under 1Mb of memory. If you capture for 2 minutes at 20fps that is 640*480*3*20*120 or 2.2Gb of memory. So, it is of no wonder that you are getting out of memory errors; also 2Gb is the most memory 32-bit Matlab can allocate.

To get around these issues, either read the video in smaller chucks or use the processFrame interface. Or use mmreader since you are using a newer version of Matlab.

Best,
Micah

24 Nov 2010 mmwrite write AVI/ASF/WMV/WMA file from movies read by mmread Author: Micah Richert

Hi Huang,

Wow, that is a huge amount of data (about 3.5G of memory). I'll have to research that problem more. But as a work around, why not use the 'continue' option with mmwrite to process smaller blocks, maybe 1 minute long segments?

I hope that helps,
Micah

23 Nov 2010 mmwrite write AVI/ASF/WMV/WMA file from movies read by mmread Author: Micah Richert

Hi Huang,

Can you include the actual error message when it crashes? Also, are you using 32 or 64 bit Matlab?

Best,
Micah

Comments and Ratings on Micah Richert's Files View all
Updated File Comment by Comments Rating
08 Nov 2014 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert a g

Hi when I want to run this error is showed. I use full path name for FileName as Yao Zhang said but it doesn't work.

Undefined function 'FFGrab' for input arguments of type 'char'.

Error in mmread (line 146)
FFGrab('build',filename,fmt,double(disableVideo),double(disableAudio),double(trySeeking));

14 Oct 2014 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert Jochen

23 Sep 2014 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert bindu reddy

hey
i am writing a program in which i have used mmreader to read videofile. i know want to take first 5 frames of the video and then take the histogram of the individual frame.
can u please help me out with this program

04 Jun 2014 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert Yao Zhang

Very powerful function. I already have succeeded in running it. To those people who has the problem like: "undefined function FFGrab or mexDDGrab for input char", you can just try to use full path name for FileName.

10 Mar 2014 mmwrite write AVI/ASF/WMV/WMA file from movies read by mmread Author: Micah Richert John

It works ok but there is a hitch. When I changed the audio (from an array) and called mmwrite to write the video, it changed the audio values. I used the values 1:10240 as audio and attempted to write them to a video file. It wrote the video frames but the audio was completely different.

Contact us