Author Topic: When recording stops prematurely, nine garbage files get written inexplicably  (Read 5548 times)

Thomas Worth

  • Member
  • ***
  • Posts: 194
Check this out:



This happened when recording stopped (on its own). I don't know if this was due to a card issue or something else, but there ya go.

beauchampy

  • Senior
  • ****
  • Posts: 302
This happens to me too when I encounter 'card full'.

Midphase

  • Hero Member
  • *****
  • Posts: 712
Same here when recording stops unexpectedly.

Midphase

  • Hero Member
  • *****
  • Posts: 712
Happened again yesterday when shooting on the 5D3 on my May 16th build. I got the error "Are you sure Card is ExFAT?" and in this case I am 100% sure the card was formatted as ExFAT.

Thankfully it appears the file integrity is fine.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
have a look at raw_video_rec_task() in mlv_rec.c

All these files are always created before recording starts (so that they can be used as soon as needed during recording). At the end of recording they are cleaned up if not used, but if recording stops unexpectedly they are not. This appears to be by design.

Code: [Select]
        /* delete all empty files */
        mlv_rec_precreate_cleanup(mlv_movie_filename, MAX_PRECREATE_FILES);

is before:
Code: [Select]
cleanup:
    /* signal that we are stopping */
    raw_rec_cbr_stopped();

    /*
    if(DISPLAY_REC_INFO_DEBUG)
    {
        NotifyBox(5000, "Frames captured: %d", frame_count - 1);
    }
    */
   
    if(show_graph)
    {
        take_screenshot(SCREENSHOT_FILENAME_AUTO, SCREENSHOT_BMP);
    }
    trace_flush(raw_rec_trace_ctx);

    free_buffers();

    /* count up take number */
    if(raw_tag_take)
    {
        raw_tag_take++;
    }

    hack_liveview(1);
    redraw();
    raw_recording_state = RAW_IDLE;
}

Frank7D

  • Senior
  • ****
  • Posts: 455
I was shooting mlv with 7D on 64 GB card
June 27, 2014 build
3x crop mode 1792x1008
mlv sound enabled
After 9 min 22 sec, recording stopped with the message "unable to open file."
Plenty of room left on card, so that's not the cause.

There were .MLV plus .M00-.M08 for a total of 10 spanned files (all more than 4 GB each).
This is the same number of files I see when I fill the card up completely, but in that case some are usually empty.

Given what dmilligan said above, I hypothesize that I ran out of "placeholder" files so the recording had to stop.
If that is the case, can we either increase the number of initial placeholder files to allow longer recording, or else create them as needed on the fly?

Frank7D

  • Senior
  • ****
  • Posts: 455
Looking through mlv_rec, I see MAX_PRECREATE_FILES (a variable?), but I don't see where it is defined. Outside the module? Sorry if this is off base, I'm not a C guy...

Edit: Here's something from mlv_rec.c

/* 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

Is it as simple as bumping that 10 up to something higher?

Frank7D

  • Senior
  • ****
  • Posts: 455
Can someone confirm my understanding of this situation is correct? I'd like to create a feature request if so.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Is it as simple as bumping that 10 up to something higher?
Yes

Frank7D

  • Senior
  • ****
  • Posts: 455
Yes

Thanks! Maybe I'll take a whack at it...

Thomas Worth

  • Member
  • ***
  • Posts: 194
have a look at raw_video_rec_task() in mlv_rec.c

All these files are always created before recording starts (so that they can be used as soon as needed during recording). At the end of recording they are cleaned up if not used, but if recording stops unexpectedly they are not. This appears to be by design.
Thanks. I'll have RAWMagic check for these files and ignore them if it finds them.