[jit.qt.record] how to NOT save a recorded movie if duration is less then a minute?

    Aug 09 2015 | 9:13 pm
    Hello Maybe the solution is simple, maybe not, but for now i don't find a good working solution. In a project movies are recorded when a visitor triggers a sensor. But if the visitor stays less then a minute the recording has to stop and the movie not saved on the hard disc. That is the hard part, the rest is working like a charm, the problem with [jit.qt.record] is; ones you send a (stop) message it saves the movie.
    If possible i use only standard Max MSP Jitter objects and i don't wanna to delete the "less then one minute" movies every time after they have been saved. That's the unstable solution. This project is already an old patch using Soft VNS, where this problem doesn't exist. But now, during redoing this old patch in Max 6 it doesn't work anymore because [jit.qt.record] doesn't support "deleting" and not saving a movie. Soft VNS isn't compatible with Max 6 or my computer anymore.
    Is there a way to stop and meanwhile not save a movie when it's less then a minute, with [jit.qt.record]?

    • Aug 10 2015 | 7:45 am
      How about routing some kind of timer or counter so that if a stop message is sent before one minute is up, [jit.record] records the next file with the exact same file name as the previous (less than one minute) file?
    • Aug 10 2015 | 8:07 pm
      I don't think that's possible, when the stop message is send the movie is saved on the HD. Also i need the file name with date and time.
    • Aug 11 2015 | 12:55 pm
      Here's what I was was thinking in the above post. I've found that max readily records over movie files if the name is the same. Less than one minute movies will be recorded but then recorded 'over' again at the next write message. I can't help you with date and time on the file names though.
    • Aug 12 2015 | 8:33 pm
      @SID: It's not ideal but while i search for another solution i will use the overwrite. The project needs date and time in the movie filename.
      @who pass by: Is there a not documented message to [jit.qt.record] to not save a movie or another solution?
    • Aug 15 2015 | 4:43 am
      I tried using the [Date] object to report date and time information and combined those into the file name, but that would prevent the 'overwriting' method in the above patch. As far as I my max skills are concerned, you've got a choice between overwriting short files without date and time, or including the date and time and keeping the short files. Sorry bud.
      From what I could tell, there isn't a 'do not save' message for [jit.record]. The 'write' message creates the file and can't be undone.
      You could try capturing to a buffer and then not write short files from there, but that would give you a time limit on how long your patch records your visitors. See Zach's patch on https://cycling74.com/forums/capture-video-to-a-buffer-then-shuttle-around-in-it/ to get a good starter into buffers.
    • Aug 15 2015 | 8:46 am
      Thanks. But all this i know already and the patch is working since 2004; date and time info in filename, and one so on ... I have already tested capture into buffer but sometimes the recorded movies are more then 7 minutes and there's a lot of switching with the movies. So, that brings the patch in an unstable manner. But i will try to get the buffer way stable because it seams the only solution for the moment.
      Still now, SoftVNS seams to be an impressive piece of code. :-) But pity there aren't since a long time, and it seams there will be no more updates.
    • Aug 16 2015 | 1:54 pm
      What's the specific reason to have the date and time in the filename? Could it be stored in a JSON file?
      that way, your movie can have a generic file-name (and can be overwritten) and all the associated metadata (time/date) is stored within the JSON file.
    • Aug 17 2015 | 7:50 pm
      What about deleting it using [shell]?
    • Aug 18 2015 | 8:37 am
      @greg: Yes, it could also be stored in a text file but all this are not nice solutions that i will use if i found no better one. Using the overwrite methode with a generic file-name and then storing in a text file to recall, in a patch that's already extensive and has to run every day for a month, seams asking for trouble. :-) @musinou: Tried that, but same for what i explain to greg, not stable enough to keep it running for long time. When there are a lot of visitors the patch and system will get it to difficult. I can't take that risk.
      Anyway, i will try to run a few days "the overwrite with a generic file-name methode" in a text file and see what happens.
      But still open for other solutions, thanks.
    • Aug 19 2015 | 8:31 pm
      Maybe some kind of routine at the end of the day, or when not much is happening?