Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Configuration

Ian Auty edited this page Apr 23, 2018 · 29 revisions

Introduction

Debugging

When in debug mode, MMALSharp will print messages to the console output during image capture. The messages are helpful to indicate any potential issues during capture.

MMALCameraConfig.Debug = true;

If further debugging is required, you can enable the native MMAL debugging logs as seen below:

  1. In the /boot/config.txt file, add the following: start_debug=1
  2. Prior to running MMALSharp, run export VC_LOGLEVEL=mmal:trace
  3. Capture image using MMALSharp
  4. Run sudo vcdbg log msg and sudo vcdbg log assert

Logging

MMALSharp uses the NLog library to provide logging. When using MMALSharp, it will print logs to the console window and also to a physical log file. By default, the log file is saved to the directory that your application is running from. If you wish to change the log location, you can do this by changing the value of MMALLog.LogLocation.

Resolution

Changes the resolution of outputted images. The camera module has a pre-defined set of sensor modes which it will use when capturing images. Don't worry if the resolution you choose does not match any of the sensor modes - the GPU ISP will scale the image on your behalf.

Image Resolution

    <tr><th>Default Value</th><td><tt>Resolution.As5MPixel</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>Resolution.As8MPixel</tt>, <tt>Resolution.As7MPixel</tt>,
            <tt>Resolution.As6MPixel</tt>, <tt>Resolution.As5MPixel</tt>,
            <tt>Resolution.As4MPixel</tt>, <tt>Resolution.As3MPixel</tt>,
            <tt>Resolution.As2MPixel</tt>, <tt>Resolution.As1MPixel</tt>,
            <tt>Resolution.As03MPixel</tt>, <tt>Resolution.As720p</tt>,
            <tt>Resolution.As1080p</tt>, <tt>Resolution.As1440p</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.StillResolution = new Resolution(640, 480);</pre>
        <pre>MMALCameraConfig.StillResolution = Resolution.As5MPixel;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.StillResolution

Video Resolution

    <tr><th>Default Value</th><td><tt>Resolution.As1080p</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>Resolution.As8MPixel</tt>, <tt>Resolution.As7MPixel</tt>,
            <tt>Resolution.As6MPixel</tt>, <tt>Resolution.As5MPixel</tt>,
            <tt>Resolution.As4MPixel</tt>, <tt>Resolution.As3MPixel</tt>,
            <tt>Resolution.As2MPixel</tt>, <tt>Resolution.As1MPixel</tt>,
            <tt>Resolution.As03MPixel</tt>, <tt>Resolution.As720p</tt>,
            <tt>Resolution.As1080p</tt>, <tt>Resolution.As1440p</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.VideoResolution = new Resolution(640, 480);</pre>
        <pre>MMALCameraConfig.VideoResolution = Resolution.As1080p;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.VideoResolution

Sharpness

Changes the Sharpness of an image.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>0 - 100</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.Sharpness = 50;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.Sharpness

Contrast

Changes the Contrast of an image.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>0 - 100</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.Contrast = 50;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.Contrast

Brightness

Changes the Brightness of an image.

    <tr><th>Default Value</th><td><tt>50</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>0 - 100</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.Brightness = 70;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.Brightness

Saturation

Changes the Saturation of an image.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>0 - 100</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.Saturation = 50;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.Saturation

ISO

Changes the ISO setting used by the sensor. Relates to the amount of time the sensor is exposed to light. A lower value means the sensor will be exposed for longer. The Shutter Speed will automatically adjust based on the ISO value committed.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>0 (auto) or 100 - 800</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.ISO = 100;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.ISO

Exposure Compensation

Change the Exposure Compensation of the sensor - doing so will produce a lighter/darker image beyond the recommended exposure.

    <tr><th>Default Value</th><td><tt>0</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>-10 - 10</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.ExposureCompensation = 10;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.ExposureCompensation

Exposure Mode

Configure the Exposure Mode used by the sensor.

    <tr><th>Default Value</th><td><tt>MMAL_PARAM_EXPOSUREMODE_T.MMAL_PARAM_EXPOSUREMODE_AUTO</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_PARAM_EXPOSUREMODE_AUTO, // auto: use automatic exposure mode MMAL_PARAM_EXPOSUREMODE_NIGHT, // night: select setting for night shooting MMAL_PARAM_EXPOSUREMODE_NIGHTPREVIEW, MMAL_PARAM_EXPOSUREMODE_BACKLIGHT, // backlight: select setting for backlit subject MMAL_PARAM_EXPOSUREMODE_SPOTLIGHT, MMAL_PARAM_EXPOSUREMODE_SPORTS, // sports: select setting for sports(fast shutter etc.) MMAL_PARAM_EXPOSUREMODE_SNOW, // snow: select setting optimised for snowy scenery MMAL_PARAM_EXPOSUREMODE_BEACH, // beach: select setting optimised for beach MMAL_PARAM_EXPOSUREMODE_VERYLONG, // verylong: select setting for long exposures MMAL_PARAM_EXPOSUREMODE_FIXEDFPS, // fixedfps: constrain fps to a fixed value MMAL_PARAM_EXPOSUREMODE_ANTISHAKE, // antishake: antishake mode MMAL_PARAM_EXPOSUREMODE_FIREWORKS // fireworks: select setting optimised for fireworks

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.ExposureCompensation = MMAL_PARAM_EXPOSUREMODE_T.MMAL_PARAM_EXPOSUREMODE_AUTO;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.ExposureCompensation

Exposure Metering Mode

Configure the exposure metering mode to be used by the camera. The metering mode determines how the camera measures exposure.

    <tr><th>Default Value</th><td><tt>MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_MATRIX

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.ExposureMeterMode = MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.ExposureMeterMode

Spot metering MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT:

With spot metering, the camera will only measure a very small area of the scene and ignores everything else. On the Raspberry Pi camera, this will be the very centre of the image.

Average metering MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE:

Using this metering mode, the camera will use the light information coming from the entire scene. It does not focus on any particular area of the scene.

Matrix metering MMAL_PARAM_EXPOSUREMETERINGMODE_T.MMAL_PARAM_EXPOSUREMETERINGMODE_MATRIX:

Matrix metering works by dividing the entire frame into multiple "zones" which are then analysed on an individual basis for light and dark tones.

Sources: https://photographylife.com/understanding-metering-modes https://en.wikipedia.org/wiki/Metering_mode#Spot_metering

Automatic white balance mode

Configure the Auto White Balance to be used by the camera

    <tr><th>Default Value</th><td><tt>MMAL_PARAM_AWBMODE_T.MMAL_PARAM_AWBMODE_OFF</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_PARAM_AWBMODE_OFF, // off: turn off white balance calculation MMAL_PARAM_AWBMODE_AUTO, // auto: automatic mode(default) MMAL_PARAM_AWBMODE_SUNLIGHT, // sun: sunny mode(between 5000K and 6500K) MMAL_PARAM_AWBMODE_CLOUDY, // cloud: cloudy mode(between 6500K and 12000K) MMAL_PARAM_AWBMODE_SHADE, // shade: shade mode MMAL_PARAM_AWBMODE_TUNGSTEN, // tungsten: tungsten lighting mode(between 2500K and 3500K) MMAL_PARAM_AWBMODE_FLUORESCENT, // fluorescent: fluorescent lighting mode(between 2500K and 4500K) MMAL_PARAM_AWBMODE_INCANDESCENT, // incandescent: incandescent lighting mode MMAL_PARAM_AWBMODE_FLASH, // flash: flash mode MMAL_PARAM_AWBMODE_HORIZON // horizon: horizon mode

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.AwbMode = MMAL_PARAM_AWBMODE_T.MMAL_PARAM_AWBMODE_AUTO;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.AwbMode

Image effects

Apply effects to the resulting image. Some effects may not be applicable depending on the firmware version.

    <tr><th>Default Value</th><td><tt>MMAL_PARAM_IMAGEFX_T.MMAL_PARAM_IMAGEFX_NONE</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_PARAM_IMAGEFX_NONE, // none: no effect (default) MMAL_PARAM_IMAGEFX_NEGATIVE, // negative: invert the image colours MMAL_PARAM_IMAGEFX_SOLARIZE, // solarise: solarise the image MMAL_PARAM_IMAGEFX_POSTERIZE, // posterise: posterise the image MMAL_PARAM_IMAGEFX_WHITEBOARD, // whiteboard: whiteboard effect MMAL_PARAM_IMAGEFX_BLACKBOARD, // blackboard: blackboard effect MMAL_PARAM_IMAGEFX_SKETCH, // sketch: sketch effect MMAL_PARAM_IMAGEFX_DENOISE, // denoise: denoise the image MMAL_PARAM_IMAGEFX_EMBOSS, // emboss: emboss the image MMAL_PARAM_IMAGEFX_OILPAINT, // oilpaint: oil paint effect MMAL_PARAM_IMAGEFX_HATCH, // hatch: hatch sketch effect MMAL_PARAM_IMAGEFX_GPEN, // gpen: graphite sketch effect MMAL_PARAM_IMAGEFX_PASTEL, // pastel: pastel effect MMAL_PARAM_IMAGEFX_WATERCOLOUR, // watercolour: watercolour effect MMAL_PARAM_IMAGEFX_FILM, // film: film grain effect MMAL_PARAM_IMAGEFX_BLUR, // blur: blur the image MMAL_PARAM_IMAGEFX_SATURATION, // saturation: colour saturate the image MMAL_PARAM_IMAGEFX_COLOURSWAP, // colourswap: not fully implemented MMAL_PARAM_IMAGEFX_WASHEDOUT, // washedout: not fully implemented MMAL_PARAM_IMAGEFX_COLOURPOINT, // colourpoint: not fully implemented MMAL_PARAM_IMAGEFX_COLOURBALANCE, // colourbalance: not fully implemented MMAL_PARAM_IMAGEFX_CARTOON // cartoon: not fully implemented

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.ImageFx = MMAL_PARAM_IMAGEFX_T.MMAL_PARAM_IMAGEFX_PASTEL;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.ImageFx

Colour effects

Allows a user to change the colour of an image (CIE 1960), e.g. U = 128, V = 128 will result in a greyscale (monochrome) image.

    <tr><th>Default Value</th><td><tt>Disabled</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>U and V value range (0 - 255)</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>

MMALCameraConfig.ColourFx = new ColourEffects { U = 128, V = 128, Enable = true };

Instance property MMALCameraConfig.ColourFx

Rotation

Rotate the resulting image.

    <tr><th>Default Value</th><td><tt>0</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>0, 90, 180, 270</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.Rotation = 90;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.Rotation

Flip image

Flip the resulting image.

    <tr><th>Default Value</th><td><tt>MMAL_PARAM_MIRROR_T.MMAL_PARAM_MIRROR_NONE</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_PARAM_MIRROR_NONE, MMAL_PARAM_MIRROR_VERTICAL, MMAL_PARAM_MIRROR_HORIZONTAL, MMAL_PARAM_MIRROR_BOTH

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.Flips = MMAL_PARAM_MIRROR_T.MMAL_PARAM_MIRROR_VERTICAL;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.Flips

Zoom (Region of interest)

Zoom in on the resulting image to produce a Region of Interest.

    <tr><th>Default Value</th><td><tt>Disabled</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>
                X, Y, Height and Width parameters must be less than 1.0.
            </tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>

MMALCameraConfig.ROI = new Zoom { X = 0.5, Y = 0.5, Height = 0.1, Width = 0.1 };

Instance property MMALCameraConfig.ROI

Shutter speed

Adjust the shutter speed, this setting adjusts the length of time that the sensor is exposed to light. A fast shutter speed will reduce the length of time it is exposed to light.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>
                0 - 6000000 (8000000 on v2 module)
            </tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.ShutterSpeed = 1000000;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.ShutterSpeed

There is an upper limit of 6000000us (6000ms, 6s), past which operation is undefined.

Automatic white balance - Red gains

Sets red AWB gains to be applied. Only applies when AwbMode is disabled.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>
                TODO
            </tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.AwbGainsR = 2;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.AwbGainsR

Automatic white balance - Blue gains

Sets blue AWB gains to be applied. Only applies when AwbMode is disabled.

    <tr><th>Default Value</th><td><tt>0 (auto)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>
                TODO
            </tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.AwbGainsB = 2;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.AwbGainsB

Dynamic range compression

Dynamic range compression increases the range of dark areas and decreases brighter areas, which helps improve the resulting image in low light areas.

    <tr><th>Default Value</th><td><tt>MMAL_PARAMETER_DRC_STRENGTH_T.MMAL_PARAMETER_DRC_STRENGTH_OFF</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_PARAMETER_DRC_STRENGTH_OFF MMAL_PARAMETER_DRC_STRENGTH_LOW MMAL_PARAMETER_DRC_STRENGTH_MEDIUM MMAL_PARAMETER_DRC_STRENGTH_HIGH

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.DrcLevel = MMAL_PARAMETER_DRC_STRENGTH_T.MMAL_PARAMETER_DRC_STRENGTH_MEDIUM;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.DrcLevel

Statistics pass

Displays the exposure, analogue and digital gains, and AWB settings used.

    <tr><th>Default Value</th><td><tt>false</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>true</tt>, <tt>false</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.StatsPass = true;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.StatsPass

Annotation

Allows annotation to be applied to the resulting image.

Enable annotation

    <tr><th>Default Value</th><td><tt>false</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>true</tt>, <tt>false</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.EnableAnnotate = true;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.EnableAnnotate

Customise annotation options

    <tr><th>Default Value</th><td><tt></tt></td></tr>
    
    <tr><th>Properties</th>
        <td>
            <tt>CustomText</tt>, <tt>TextSize</tt>, <tt>TextColour</tt>, <tt>BgColour</tt>,
            <tt>ShowShutterSettings</tt>, <tt>ShowGainSettings</tt>,
            <tt>ShowLensSettings</tt>, <tt>ShowCafSettings</tt>,
            <tt>ShowMotionSettings</tt>, <tt>ShowFrameNumber</tt>,
            <tt>ShowBlackBackground</tt>, <tt>ShowDateText</tt>,
            <tt>ShowTimeText</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>

MMALCameraConfig.Annotate = new AnnotateImage { ShowDateText = true, ShowTimeText = true };

Instance property MMALCameraConfig.Annotate

Encoding

In MMALSharp, certain Components provide the ability to have their encoding type and pixel format changed, namely the Camera, Encoder/Decoder, Splitter and Resizer components.

A user is able to change the encoding type and pixel format used by a Component by using one of the Encoding formats available in the MMALSharp.Native.MMALEncoding class.

To change the encoding of the Camera component, there are specific MMALCameraConfig properties that you can adjust prior to initialising the Camera component, i.e prior to calling MMALCamera.Instance. The encoding type set against these properties will dictate which raw encoding type is used when sending data from the camera sensor.

MMALCameraConfig.StillEncoding
MMALCameraConfig.StillSubFormat

MMALCameraConfig.VideoEncoding
MMALCameraConfig.VideoSubformat

MMALCameraConfig.PreviewEncoding
MMALCameraConfig.PreviewSubformat

For all other components, the encoding type is specified when configuring the output port of your respective downstream component, i.e when calling ConfigureOutputPort.

Video specific configuration

Video stabilisation

Enables video stabilisation support when recording video

    <tr><th>Default Value</th><td><tt>true</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>true</tt>, <tt>false</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.VideoStabilisation = true;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.VideoStabilisation

Rate control

Not supported by firmware however code present.

Intra refresh period (GoP)

H.264 encoding only

Every intra refresh period, H.264 video uses a complete frame (I-frame) which subsequent frames are then based upon. This setting specifies the number of frames between each I-frame. A higher value will reduce the size of the resulting video, and a smaller value will result in a less error prone stream.

    <tr><th>Default Value</th><td><tt>-1 (disabled)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.IntraPeriod = 1;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.IntraPeriod

Video profile

Sets the encoding profile.

    <tr><th>Default Value</th><td><tt>-1 (disabled)</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>MMAL_VIDEO_PROFILE_T.MMAL_VIDEO_PROFILE_H264_HIGH</tt>, <tt>MMAL_VIDEO_PROFILE_T.MMAL_VIDEO_PROFILE_H264_MAIN</tt>,
            <tt>MMAL_VIDEO_PROFILE_T.MMAL_VIDEO_PROFILE_H264_EXTENDED</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.VideoProfile = MMAL_VIDEO_PROFILE_T.MMAL_VIDEO_PROFILE_H264_HIGH;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.VideoProfile

Video level

Sets the encoding level.

    <tr><th>Default Value</th><td><tt>MMAL_VIDEO_LEVEL_T.MMAL_VIDEO_LEVEL_H264_4</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <pre>

MMAL_VIDEO_LEVEL_H264_1 MMAL_VIDEO_LEVEL_H264_1b MMAL_VIDEO_LEVEL_H264_11 MMAL_VIDEO_LEVEL_H264_12 MMAL_VIDEO_LEVEL_H264_13 MMAL_VIDEO_LEVEL_H264_2 MMAL_VIDEO_LEVEL_H264_21 MMAL_VIDEO_LEVEL_H264_22 MMAL_VIDEO_LEVEL_H264_3 MMAL_VIDEO_LEVEL_H264_31 MMAL_VIDEO_LEVEL_H264_32 MMAL_VIDEO_LEVEL_H264_4 MMAL_VIDEO_LEVEL_H264_41 MMAL_VIDEO_LEVEL_H264_42

    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.VideoLevel = MMAL_VIDEO_LEVEL_T.MMAL_VIDEO_LEVEL_H264_42;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.VideoLevel

Valid values: See MMALSharp.Native.MMALParametersVideo.MMAL_VIDEO_LEVEL_T

MMALCameraConfig.MMALParametersVideo.MMAL_VIDEO_LEVEL_T.MMAL_VIDEO_LEVEL_H264_4;

Inline headers

When enabled, the stream will include PPS and SPS headers on every I-frame. Certain streaming methods require this to be enabled e.g. Apple HLS.

    <tr><th>Default Value</th><td><tt>false</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>true</tt>, <tt>false</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.InlineHeaders = true;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.InlineHeaders

Inline Motion Vectors

When enabled, Inline Motion Vector headers will be produced. These Vectors display motion occurred between frames.

    <tr><th>Default Value</th><td><tt>false</tt></td></tr>
    
    <tr><th>Possible Values</th>
        <td>
            <tt>true</tt>, <tt>false</tt>
        </td>
    </tr>
    
    <tr><th>How to Set:</th><td>
        <pre>MMALCameraConfig.InlineMotionVectors = true;</pre>
    </td></tr>
</tbody>
Instance property MMALCameraConfig.InlineMotionVectors
Clone this wiki locally