Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Need to read large video files into Matlab

Subject: Need to read large video files into Matlab

From: Portia

Date: 19 Jul, 2010 17:54:05

Message: 1 of 4

Hello,

Hopefully someone can help me with this since I've tried everything. I have a lot of video files that are all between 150 and 160 MB large (.avi). I need to be able to play these files within a GUI that I am building.

I have tried aviread, mmreader, etc. and I continue to get an "out of memory" error. I have used MPEG StreamClip to try and decrease the size of the files. They play fine when opened outside of Matlab but inside matlab the implay/mplay commands result in a video with lines going through it (from interleaving i think).

Is there any way to make this work? As stated I have tried reading in each frame with mmreader per the example in the Matlab help and have tried aviread.

thank you,

Portia

Subject: Need to read large video files into Matlab

From: Sean

Date: 19 Jul, 2010 19:32:06

Message: 2 of 4

"Portia " <portiaerin@yahoo.com> wrote in message <i223ft$dd8$1@fred.mathworks.com>...
> Hello,
>
> Hopefully someone can help me with this since I've tried everything. I have a lot of video files that are all between 150 and 160 MB large (.avi). I need to be able to play these files within a GUI that I am building.
>
> I have tried aviread, mmreader, etc. and I continue to get an "out of memory" error. I have used MPEG StreamClip to try and decrease the size of the files. They play fine when opened outside of Matlab but inside matlab the implay/mplay commands result in a video with lines going through it (from interleaving i think).
>
> Is there any way to make this work? As stated I have tried reading in each frame with mmreader per the example in the Matlab help and have tried aviread.
>
> thank you,
>
> Portia

One way would be to use the second input to aviread(file_name,INDEX) to read in smaller chunks at a time. You could then convert data types to ones that use a smaller memory footprint or downsample your movie.

Subject: Need to read large video files into Matlab

From: Casey

Date: 27 Aug, 2010 01:12:07

Message: 3 of 4

The only problem is with the new version of Matlab, every time you use aviread (so if you read the video in with a loop) you get an error message that aviread will be obsolete in a future release.

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i2297l$lcg$1@fred.mathworks.com>...
> "Portia " <portiaerin@yahoo.com> wrote in message <i223ft$dd8$1@fred.mathworks.com>...
> > Hello,
> >
> > Hopefully someone can help me with this since I've tried everything. I have a lot of video files that are all between 150 and 160 MB large (.avi). I need to be able to play these files within a GUI that I am building.
> >
> > I have tried aviread, mmreader, etc. and I continue to get an "out of memory" error. I have used MPEG StreamClip to try and decrease the size of the files. They play fine when opened outside of Matlab but inside matlab the implay/mplay commands result in a video with lines going through it (from interleaving i think).
> >
> > Is there any way to make this work? As stated I have tried reading in each frame with mmreader per the example in the Matlab help and have tried aviread.
> >
> > thank you,
> >
> > Portia
>
> One way would be to use the second input to aviread(file_name,INDEX) to read in smaller chunks at a time. You could then convert data types to ones that use a smaller memory footprint or downsample your movie.

Subject: Need to read large video files into Matlab

From: Martin Skodacek

Date: 25 Sep, 2011 13:30:31

Message: 4 of 4

Hello I have the same problem reading big videofiles (big means around 4000 frames).
I both tried everything a both wrote token ring to read 100 frames and get create a variable composed of each time 100 frames during all cycles, but without success.

If anyone has nice solution, please let me know.
Thank you. Martin


"Portia" wrote in message <i223ft$dd8$1@fred.mathworks.com>...
> Hello,
>
> Hopefully someone can help me with this since I've tried everything. I have a lot of video files that are all between 150 and 160 MB large (.avi). I need to be able to play these files within a GUI that I am building.
>
> I have tried aviread, mmreader, etc. and I continue to get an "out of memory" error. I have used MPEG StreamClip to try and decrease the size of the files. They play fine when opened outside of Matlab but inside matlab the implay/mplay commands result in a video with lines going through it (from interleaving i think).
>
> Is there any way to make this work? As stated I have tried reading in each frame with mmreader per the example in the Matlab help and have tried aviread.
>
> thank you,
>
> Portia

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us