Video overlay configuration

From edgertronic high speed video camera
Jump to navigation Jump to search
Video overlay is supported in 2.2.0 and later releases.


Description

The edgertronic camera supports modifying the pixels in each video frame to overlay text and graphics. The video frames with the overlay applied are then encoded into a video file. To keep from obscuring the captured video, a black border is added to the bottom of each video frame with the overlay being displayed in the black border region.

When enabled, video overlay adds the note text and the frame number to each video frame. The trigger frame number is zero, pre-trigger frames have a negative number and frames captured after the trigger have a positive number.

Customization

Video overlay is supported using two custom GStreamer elements:

  • border
  • emboverlay

The border element supports XXX parameters and the emboverlay element supports 19 parameters. Because of the general purpose nature of GStreamer, you can do just about anything you want with overlays. Becuase of the general purpose nature of GStream, it is difficult to get correct.

Since video overlay is supported by GStreamer, all customization is done in the GStreamer pipeline file.

Pipeline file

There are two defined names you can include in each section of your customized pipeline files.

Name Description
border String containing all parameters and values that is used by the GStreamer border element. The supported parameters are listed below. An equal sign (no spaces) separate the parameter name from its value. parameter name, value pairs are separated by whitespace.
overlay_text String containing GStreamer emboverly element parameters and values relating to text content and rendering. CAMAPI first processes the string to replace fields with camera configuration values.

An equal sign (no spaces) separate a parameter name from its value. Parameter name, value pairs are separated by white space.

overlay_logo String containing GStreamer emboverly element parameters and values relating to graphics logo rendering.
overlay_time String containing GStreamer emboverly element parameters and values relating to time content and rendering.
overlay_frame_number String containing GStreamer emboverly element parameters and values relating to frame numbering rendering.
overlay_notes String containing GStreamer emboverly element parameters and values relating to notes rendering.

Overlay string syntax

An equal sign (no spaces) separate a parameter name from its value. Parameter name, value pairs are separated by whitespace. You can escape a character (such as the space character) using a backslash. Use two percent (%) signs instead of one.

overlay_settings

The defined parameters for controlling which camera settings are included and how they are rendered includes:

Name Type Data
Range
Example Value Description
settings-text string &f\ fps String to be rendered with substitutions for various camera settings.
settings-offseth integer -frame width .. frame width 100 Horizontal location to start overlay placement.
settings-offsetv integer -frame width .. frame width -100 Vertical location to start overlay placement.
settings-font-height integer -frame width .. frame width 60 Font size (REVISIT: explain units).
setting-scolor integer -frame width .. frame width 0xFF0000 24 bit color value in the format 0xRRGGBB.
enable-settings boolean true .. false true

The defined 'settings-text camera settings variables include:

Variable Camera Setting
&d Trigger date (DD-MMM-YY)
&t Trigger time (HH-MM-SS)
&T Trigger time (seconds since Jan 1, 1970)
&i Sensitivity (ISO)
&s Shutter
&f Frame rate
&S Sub-sampling
&o Overclock
&e Extended dynamic range
&g Genlock
&b Multishot buffer
&n Serial number
&N Name of file
&F Scaled font size
&x Camera calculated x (horizontal) position
&y Camera calculated y (vertical) position


Example settings string:

 &f\ fps\ \ &b\ buffer

Example configuration strings

The follow examples can be included in your custom GStream pipeline files.

Control the placement and size of the notes text. A negative vertical offset means from the bottom of the video frame.

 emboverlay=text-offseth=100 text-offsetv=-100 text-font-height=60 text-color=0xFF0000 enable-text=true

border parameters

TBD