Save mode

From edgertronic high speed video camera
Revision as of 16:32, 16 January 2019 by Matter (talk | contribs)
Jump to: navigation, search

This feature is supported in Software Version 2.4 and later

Save modes

The camera supports three save modes: Auto, Review and Background. Auto will automatically save after the capture(s) and is a good choice when using the camera manually. Review allows you to trim the captured video so only the portion of interest is saved in the movie file. Background allows you to continuously capture videos while those videos already captured are saved in the background without interrupting your ability to capture additional videos.

Save mode Description
Auto User sets the multishot count to the number of videos to be captured and then camera will automatically save the videos once the number of trigger events matches the multishot count.
Review When the user has captured all the events of interest, the user can review the captured fames and adjust some settings and the start and end frame to save, before saving a video.
Background After a video is captured, the camera allows another video to be captured while captured video is being saved. You can continue to capture videos until the camera's memory (either 8GB or 16GB, depending on model) is full of unsaved video frames.

You select the Save Mode in the Settings modal, as shown in Figure XXX.

Automatic capture then save mode

Automatic capture then save is the default camera Save Mode setting. Out of the box, a new edgertronic camera is pre-configured to allow you to trigger the camera and then the camera encodes the captured frames into a video file and saves the file to the SD card. This is a simple use model to understand and works well when learning to take high speed videos.

The simplest camera operation is continuously filling the pretrigger buffer with video frames while waiting for a trigger event. Once triggered, the camera fills the post trigger buffer and automatically saves the captured frames to a file. When Shot Count, the camera repeats the pretrigger fill, trigger, post trigger fill process until all buffers are filled, then automatically saves each captured video one by one. When configured for Save Mode set to Auto, the user control is simply to create a trigger event. With a Shot Count greater than one, additional user controls are available as described below.

Automatic capture then save allows you to capture several videos back to back and then save them. This is useful for capturing events where live preview is important, like when the camera focus needs to be adjusted between triggers. When capturing, the web UI displays the frames being captured. When saving, the web UI display the frames being saved.

Setting the Shot Count

Frame rate, duration, and resolution settings effect how many videos you would can take in one burst before saving the captured video frames. A 16GB DDR memory camera can hold twice as many unsaved frames as an 8 GB DDR memory camera. The camera defaults to Shot Count set to one. To find out how many videos can be captured before the camera fill all available frame buffer memory, clear the Shot Count field in the Settings tab and press the tab key. The actual column will be updated to display the maximum number of videos that can be captured using the current settings before the camera DDR memory is full.

Capturing videos

Trigger the camera as normal. As long as there is another video capture buffer available, you can immediately trigger the camera again after the camera has filled the post-trigger buffer. Once all available buffers have been filled (as set via Shot Count), the camera will automatically starting saving all the captured video frames. This may take a few minutes so sit back and relax.

Cancelling trigger

If you have triggered the camera and decide you do now want to keep the video, you can cancel the trigger so the capture buffer currently being filled will be available to hold frames from another trigger. Cancel the trigger while the post-trigger buffer is being filled by pressing the red X in the button box in the web user interface.

Discarding all unsaved video data

If one or more trigger events occurs and you do not want to save the captured video data, invoke press the wrench in the button box to bring up a dialog and confirm you want to discard all unsaved videos.

Saving captured videos

When all capture buffers have been filled, the camera will automatically start saving the captured video frames in each buffer. The video from each capture buffer is saved to a different file, as well as the metadata file associated with the video being saved. When saving a captured video, each filename will also contain the trigger number, such as for the third trigger, the filename might be slomo_1413060071_3.mov. If you have triggered one or more video captures and want to save them without having to fill all the rest of the capture buffers, you can press the blue save icon in the button box.

Trimming save in progress

While the camera is saving a captured video, it is possible to stop saving the remaining unsaved portion of the video currently being saved by pressing the orange trim icon in the button box. If there is another captured video that hasn't been saved yet, then after the camera finishes trimming the current video, it will automatically start saving the next unsaved video. You can again trim the next video being saved. If you want to also trim the front of the captured video before saving, then set the Save Mode to Review before save.

Trimming save in progress and discarding all unsaved captured videos

In a similar fashion, you can trim the save in progress and discard the captured videos in the unsaved buffers by pressing the red X icon in the button box and confirming you want to discard the rest of the unsaved videos.

Downloading saved videos

You can download the saved video files by browsing to the storage directory and clicking on the video or metadata file you want to view.

For SD card storage, browse to:

For USB storage, browse to:

For default file naming, the video files will all have the same prefix but the end of the video will have a number ranging from 1 to X (the number of videos you took with the multishot function).

Another easy way to download videos to a Linux, Mac or Windows PC is to use WebDAV.

Review then save mode

You can review a video before saving, allowing you to trim the uninteresting beginning and end of your captured video. There are also some settings you can change after the video has been captured, including ISO and the text that is overlaid on each video frame. You can even save the same video multiple times, selection different regions to save.

Another camera mode of operation is review. The user can capture one or more videos, then review each a video setting the starting and ending frame for selective saving a region of the video. Once the user is done reviewing and saving selected regions of the captured videos, the user can again run the camera to restart the pretrigger fill, trigger, post trigger fill process. In the review mode of operation, the camera allows videos to be reviewed after all multi-shot buffers are filled instead of automatically saving all captured frames for all captured videos. In a similar way, with multi-shot enabled, an additional user control is to allow the captured buffers be reviewed without having to fill all the multi-shot buffers.

Examples of when review then save mode can be useful include:

  • Immediate viewing: In some cases you might not want to save the frames at all. Instead, you may want to view the video frames as soon as possible then take action based on what was observed. Example of this include adjusting camera settings before taking the real high speed video, using high speed videography to improve your golf swing or verify a piece of equipment being manufactured is operational.
  • Selecting a region of capture video to save: When reviewing a captured video, you can pick the starting and ending frames to save so your high speed video files only contain the portion of the capture video that is of interest.
  • Imaging processing: The edgertronic high speed camera can be viewed as a video source (really a source of image frames), allowing the imaging processing software to receive, via the camera's network connection, a series of video frames.

When the camera is set to review then save mode, you can review the captured video, saving just the portion of the video that is of interest.

Background save mode

Capturing video frames is much, much faster than the time it takes to encode video frames. If you are capturing regular events, such as a baseball pitches, you can focus on capturing the events of interest, with the camera encoding and saving the videos in the background. If your camera has sufficient memory, you will always be able to trigger. If the camera memory becomes full of unsaved captured videos, then triggering is disabled until the current video being saved is done.

When the camera is set to background save mode, you can continue to capture new events while the camera is encoding and saving the already captured videos in the background.

Web User Interface support for save mode

The captured video review feature can be enabled or disabled using the camera's web U.I. When disabled, the camera automatically saves captured videos when the configured number of multishot buffers are filled. When review is enabled, the camera does not automatically save videos. Instead, after one or more videos have been captured to multishot buffers, a review bar is shown below the video window. The review bar has two markers, one for setting the starting frame and the other to set the last frame. As long as you have are dragging one of the markers, the frame associated with that marker position is displayed.

You can also select which captured video to review by setting the multishot buffer value.

Once you have set the starting frame and end frame markers, you can save the selected region by pressing the save icon. The filename of the video, and associated metadata file, is modified to include the start and end frame number. This allows you to save different segments of a the same captured video buffer to different files. An example would be a captured video buffer containing two lightning strikes. You might save the first lightning strike to one file and save the second lightning strike to another files.

When you are done reviewing the videos, you can discard all captured video frames and capture more videos by clicking on the run icon.

CAMAPI support for save mode

Auto save mode, review before save mode, and background save mode are supported by camera configuration settings, the camera state machine, and camera status information that can be retrieved.

The active save mode is set when invoking the run() CAMAPI method, by including in the requested settings dictionary the requested_save_mode key set to 0 for auto, 1 for review, and 2 for background save mode.

There are several dictionary keys in the camstatus dictionary returned by calls to the get_camstatus() CAMAPI method:

Key Value
data type
Example
value
Description
save_state integer 1 - idle
5 - saving
9 - interrupted
State of the saving state machine. If there is no captured video to be saved, the state will be idle and the save_buffer, save_level, and save_time will be meaningless. Interrupted means more video file storage (SD card, USB storage, or network storage) is needed to finish saving the captured videos.
save_buffer integer 1 The number of the buffer being saved. The first buffer captured after a call to run() is buffer number 1.
save_level integer 0 .. 100 The percentage saved of the save_buffer video.
unsaved_count integer 7 Number of captured buffers that have not been saved.
save_time integer 4 Approximate number of minutes for all of the unsaved videos to saved. Applies to the current video being saved in review before save mode or all the captured, but not yet saved videos in auto save mode or background save mode.

CAMAPI support for review before save

Camapi-states-review-with-test-labels.png

Review and selective save are supported by the camera by means of the REVIEW state in the camera's state machine, as shown to the right.

Controlling frames being reviewed

When the camera is in the REVIEW state, the review_frame() CAMAPI method allows the camera to be configured to read out captured video frames at a specified rate, from the specified start frame to the specified end frame. The review() method also allow you to control if you want the camera to continuously loop, sending the selected region of frames over and over. If you want to lock step control the camera so you get exactly one frame per review() invocation, set the start and end frame to the same value and the frame rate to zero.

Saving reviewed video

When you ready to save a captured video and the camera is in the REVIEW state, use the selective_save() CAMAPI method. When the save is complete, the camera will return to the REVIEW state.

Capturing new video when review is complete

When you no longer need the captured video frames and want to capture new video, invoke the run() CAMAPI method.

Implementation details

  • The metadata file contains items that refer to the video captured to the buffer. This includes the camera settings, and the capture information capture buffer number, frame count, pre-trigger frames, trigger time, and trigger delay. Be aware that a selective save may mean the file doesn't contain the trigger frame.
  • For selective save, two additional metadata values indicate which region of the captured video buffer was saved in the file. These two fields are first saved frame and last saved frame.
  • To allow different regions of the same captured video buffer to be saved to files, videos saved using selective save will include the frist and last saved frame in the filename in the form:

slomo_$EPOC_$BUFFER_frames_$START_to_$END.mov.

  • The start frame number and end frame number are index based on the trigger frame being frame 0. This means the start and end frames will be negative numbers if the frames of interest occurred before the trigger event.
  • Using selective save, the user can save the same captured video twice; once with overlays on and again with overlays off.