Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: Frank7D on July 18, 2014, 06:56:59 PM

Title: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: Frank7D on July 18, 2014, 06:56:59 PM
Not sure if this is the right place to request this, but:

When shooting raw/mlv, ml creates 10 empty files as placeholders to be used as needed while recording, files 2-10 coming into play for longer takes where spanned files are necessary (due to fat32 file size limitation of 4 GB).

If a take requires more than these 10 files (40 GB), the recording stops. This limits the length a raw take can be, depending on data rate (frame rate and frame size).

Recently I ran into this limitation while recording a long number from a live musical production. I was shooting at 1792x1008 23.976 fps with sound and got 9 min 22 sec before recording stopped with the message "unable to open file."

The number of files appears to be set with the variable MAX_PRECREATE_FILES in mlv_rec.c.

I found this:

/* pre-create that number of files befroe recording starts so that file catalog doesnt have to get updated while recording */
#define MAX_PRECREATE_FILES 10


I am thinking it would be good to allow for ~128 GB. That would fill up the largest currently used card, and would allow about 25 min of 1920x1080 raw video (no sound).

So 128 GB / 4 GB = 32 files, and the new code would be:

#define MAX_PRECREATE_FILES 32

I was thinking of attempting this myself, but I ran into some difficulty getting set up.

Any comments welcome; thank you.
Title: Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: dubzeebass on December 17, 2014, 09:48:24 PM
Admins ... does this limitation go away if I use ExFAT since it doesn't need to use 10 files? I had this same thing happen today during a speech.
Title: Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: DeafEyeJedi on December 17, 2014, 11:05:46 PM
exFat is such a lifesaver and also it should keep it all in one MLV file... Per take that is.
Title: Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: Frank7D on December 18, 2014, 06:20:42 PM
I would still like to try to do this when I get a chance to figure out how to compile, but if anyone else can jump in and do it, that would be great.
Title: Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: DeafEyeJedi on December 18, 2014, 06:43:44 PM
How to do what? Format it into exFat?
Title: Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: Frank7D on December 19, 2014, 04:17:13 PM
Sorry for the lack of clarity.

I meant increasing MAX_PRECREATE_FILES.
Title: Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
Post by: dmilligan on December 19, 2014, 06:29:58 PM
make your change like you have it in the OP and type 'make zip' from the platform directory of the appropriate camera

if you need more help refer here:
http://www.magiclantern.fm/forum/index.php?topic=991.0