How exactly does the video record feature work?

So I am starting a video recording app and I am looking for some info. Reading the post on the corona website about the tutorial explains in detail how to use the media.captureVideo() record feature but not exactly how it works. Does it save all the video in a cache and then write the file to disk once it is complete? or does it write every frame as it goes? Reason I ask is I am looking to erase video that is more then 30 seconds. Corona has a max limit you can set so say it gets to thirty seconds it stops recording but I am trying to do is record say for 30 seconds and then erase the old stuff, so say you record for two total minutes, then once you are done you will have the most recent 30 seconds saved. Does anyone know how to do this ? and if not any info on how the function works so I can better figure it out. Thanks!

There are no API calls that would allow this but native video editing code exists. If you have Enterprise, you could try and adapt some native code to crop everything but the last 30 seconds. Worst comes to worst, you could simply shoot a 30 second video.

Well yeah I could shoot a 30 second video but that’s not what I am trying. I am wondering how to only save the last 30  seconds of a recording. If it is impossible to edit video before saving is it possible to cut video at a certain point after it is saved?

The createVideo() is pretty simple and has no editing features.  You can record it and play it.  That’s the limits of what you can do. 

Rob

There are no API calls that would allow this but native video editing code exists. If you have Enterprise, you could try and adapt some native code to crop everything but the last 30 seconds. Worst comes to worst, you could simply shoot a 30 second video.

Well yeah I could shoot a 30 second video but that’s not what I am trying. I am wondering how to only save the last 30  seconds of a recording. If it is impossible to edit video before saving is it possible to cut video at a certain point after it is saved?

The createVideo() is pretty simple and has no editing features.  You can record it and play it.  That’s the limits of what you can do. 

Rob