not enough memory to open

Getting to know the proggram and lunching new movie and new code.
all the documents are on separate hard disk, the proggram is on my mac - while trying to open short movie reciving the error "not enough memory to open this file in the editror"

1 commentaire

Walter Roberson
Walter Roberson le 13 Juin 2020
What are you trying to do with the movie? The command you used is trying to invoke the editor on the raw file, not read the frames as audio or video.

Connectez-vous pour commenter.

Réponses (1)

Rafael S.T. Vieira
Rafael S.T. Vieira le 4 Juin 2020
Modifié(e) : Rafael S.T. Vieira le 4 Juin 2020

0 votes

Please, check the file size and your available RAM. After, run the Activity Monitor to see what happens (command + space keys, and type Activity Monitor). If possible, post a screenshot of the Activity Monitor while opening the file.

8 commentaires

koral hadad
koral hadad le 4 Juin 2020
the file size is 500 MB, how can I find my available RAM?
Rafael S.T. Vieira
Rafael S.T. Vieira le 4 Juin 2020
Modifié(e) : Rafael S.T. Vieira le 4 Juin 2020
The Activity Monitor shows us the available RAM. Please, see the screenshot bellow. I have 8 GB of RAM, MATLAB is using about 1GB of RAM. In total, my mac is using 6.72 GB. Try closing all other apps if you find yourself in the same situation (for instance I could close Firefox and Google Chrome for freeing mem).
koral hadad
koral hadad le 4 Juin 2020
thnaks so much for your help.
Even after closing all the programs posiible -
still getting the same message that there is not enough memory available for 15000 frames and cant open the video file on the program.
screen shot attached
Rafael S.T. Vieira
Rafael S.T. Vieira le 5 Juin 2020
Modifié(e) : Rafael S.T. Vieira le 5 Juin 2020
Glad to help. You should be able to open a 500 MB video with 3 GB of free mem. Your video is probably compressed, which means 500MB is not its real size. When we open a video in MATLAB, it is decompressed and transformed into a data matrix. For instance, I have an MP4 video with 25 MB that becomes 4GB of data in MATLAB. See below:
The movie resolution is 640*360, with 3 channels of color (RGB), and 6672 frames (or images). The duration of the movie is 4:38 min (278 seconds) with 24 fps; 6672 frames.
This means 640*360*3*6672 = 4611686400 bytes or 4.29 GB. And sure enough, if I check System Monitor, MATLAB is now using 5 GB of RAM:
Please, check these parameters from your video: resolution, colors, and the number of frames (duration and fps) and verify its real size. You can use command + I keys with the video in the QuickTime player to find them. Post the video attributes here, maybe that's the problem. (Video players have other strategies to open large videos, but they also decompress them.)
koral hadad
koral hadad le 6 Juin 2020
Now Im understand.
so done the calculaion, almost 7 GB!
Its means my free 3GB are not enough.
Is there any solution for that kind of problem?
Rafael S.T. Vieira
Rafael S.T. Vieira le 6 Juin 2020
Modifié(e) : Rafael S.T. Vieira le 6 Juin 2020
There are four possible solutions:
1) Buy more RAM if possible. If I were you, I would upgrade to 16 GB or 32 GB of RAM (to be on the safe side); or
2) Split the video into 3 videos of approximately the same duration (or 9 videos if that doesn't work); or
3) Convert the video to grayscale (if it is in color); or
4) Lower its resolution by half in each dimension (making it a 720 x 540 video).
For option 2, you can use the QuickTime player, trimming the video with command + T keys. For options 2, 3, and 4, you can use the free software ffmpeg (https://ffmpeg.org/); a command-line tool (install it with Homebrew https://treehouse.github.io/installation-guides/mac/homebrew , and then use $brew install ffmpeg):
$ ffmpeg -ss 00:00:00 -t 00:50:00 -i input.mp4 -acodec copy -vcodec copy part1.mp4 # option 2
$ ffmpeg -i input.mp4 -vf format=gray output.mp4 # option 3
$ ffmpeg -i input.mp4 -vf scale=720:540 output.mp4 # option 4
Or you can also go after another video editing software to make these changes.
koral hadad
koral hadad le 13 Juin 2020
thank you so much for your help!!!!!
so greatful.
Rafael S.T. Vieira
Rafael S.T. Vieira le 13 Juin 2020
No problem, but could you please mark the question as answered? :)

Connectez-vous pour commenter.

Produits

Version

R2017b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by