Rank: 82 based on 470 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.

Professional Interests:

 

Watch this Author's files

 

Files Posted by Micah 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 write avi asf wmv wma..., graphics import, graphics export, movie 97 51
  • 4.81818
4.8 | 14 ratings
12 Nov 2009 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert ffgrad unable open th..., hi have you tried to ..., mmreadffgrabmacox, data import 349 288
  • 4.77011
4.8 | 90 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... 24 3
  • 3.0
3.0 | 2 ratings
Comments and Ratings by Micah 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's Files View all
Updated File Comment by Comments Rating
09 Feb 2012 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert Luengo, Cris

Works straight out of the box. Simply fantastic, as I've had so many headaches trying to read video data in MATLAB on Linux!

06 Feb 2012 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert robert, myriam

No its ok
I1=video.frames(100).cdata;

06 Feb 2012 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert robert, myriam

hello
once we have the structure "video" how to access each of the frames?
For example if I want to work on Frame 1 then 2 etc. what is the command?
thank you

19 Jan 2012 mmwrite write AVI/ASF/WMV/WMA file from movies read by mmread Author: Micah Richert Schoeberlein, Howard

I'm having trouble getting mmwrite to work. I get errors looking for a module in mmwrite.mexw64: "??? Invalid MEX-file 'U:\MATLAB\MovieTest\mmwrite\mmwrite.mexw64': The
specified module could not be found." I added the path via addpath. Any ideas?

Thanks,
Howard

09 Jan 2012 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert Baijal, Siddharth

i have problem in using this command...
the following error is generated when i use it:-
   "??? Index exceeds matrix dimensions."
please tell me where am i wrong

Top Tags Applied by Micah
graphics export, graphics import, data import, hi have you tried to execute the mex file in mac snow leopard, play movies mmread movie
Files Tagged by Micah 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 write avi asf wmv wma..., graphics import, graphics export, movie 97 51
  • 4.81818
4.8 | 14 ratings
12 Nov 2009 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert ffgrad unable open th..., hi have you tried to ..., mmreadffgrabmacox, data import 349 288
  • 4.77011
4.8 | 90 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... 24 3
  • 3.0
3.0 | 2 ratings

Contact us at files@mathworks.com