Author Topic: Increase MAX_PRECREATE_FILES to allow longer raw takes  (Read 4831 times)

Frank7D

  • Senior
  • ****
  • Posts: 457
Increase MAX_PRECREATE_FILES to allow longer raw takes
« 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:

Code: [Select]
/* 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:

Code: [Select]
#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.

dubzeebass

  • Senior
  • ****
  • Posts: 360
Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
« Reply #1 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.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
« Reply #2 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.
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Frank7D

  • Senior
  • ****
  • Posts: 457
Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
« Reply #3 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.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
« Reply #4 on: December 18, 2014, 06:43:44 PM »
How to do what? Format it into exFat?
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Frank7D

  • Senior
  • ****
  • Posts: 457
Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
« Reply #5 on: December 19, 2014, 04:17:13 PM »
Sorry for the lack of clarity.

I meant increasing MAX_PRECREATE_FILES.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Increase MAX_PRECREATE_FILES to allow longer raw takes
« Reply #6 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