Skip to main content

How To Obtain and Utilize the Video Sub-Stream && Image Snapshots of MXnet 1G Endpoints on an AC-MXNET-CBOX-B/HA

How To: Obtain a MXnet 1G Endpoint's video sub-stream URL && Image Snapshots to be utilized by Third Party Devices This document describes how to obtain a URL that allows access to the Motion JPEG video sub-stream generated by a V2 encoder or ...

Written by Isaiah

How To: Obtain a MXnet 1G Endpoint's video sub-stream URL && Image Snapshots to be utilized by Third Party Devices

This document describes how to obtain a URL that allows access to the Motion JPEG video sub-stream generated by a V2 encoder or decoder, as well as the method for utilizing a URL to download static image snapshots of V2 endpoints, and V1 encoders.

Note: This only applies to AC-MXNET-CBOX-B/HA version V4.21 or higher, and only with MXnet V2 endpoints (both encoders AND decoders) for the video sub-stream. This feature is not applicable on AC-MXNET-CBOX hardware, and video sub-streams are not supported on V1 endpoints.
​


​

How to Grab the URL of a V2 Encoder's MJPEG Sub-Stream

Through MENTOR (note: Encoders only as of 1-22-26)

Step One: Log into the MENTOR interface of the CBOX-HA.
​

Step Two: Navigate to the AUTO-MATRIX page.
​

Step Three: For the desired encoder, double click on the encoder’s image preview on the left side of the page.
​

Step Four: On the expanded image preview window that populates, right click the preview and select “copy image address”.
​


​

Sub-stream URL Breakdown and Construction

In the above example, the URL that was copied from the V2 encoder is shown below:

The URL can be broken down to the following parameters:

http://{CBOX IP Address}:{Device Port Number / 10085}/?action=stream&w={Width, up to 1280}&h={height, up to 720}&bw={Bandwidth allocation(in kbps)}&as=0&dev={Endpoint MAC Address}&ip={Endpoint IP Address}&port=8080

​

Knowing these parameter values, a user can build a URL to access a V2 endpoint's sub-stream without manually copying from the CBOX, as well as build a sub-stream URL to access the sub-stream of a V2 decoder.

Note: An endpoint's port number and an encoder/decoder's IP address could be dynamically changed if the device is power cycled at a point in time. For a more permanent URL to utilize, it is recommended that the Device Port Number parameter is replaced with 10085, and the Encoder/decoder can be statically assigned an IP address (even if still on a link-local/APIPA IP scheme).
​

Obtaining the video sub-stream of an MXnet V2 Decoder

A preview sub-stream can also be viewed from an MXnet V2 Decoder. Utilizing the information above, populate the {Endpoint MAC Address} and {Endpoint IP Address} parameters with the relevant MAC/IP Information from a V2 decoder. For example, if a CBOX has an IP address of 192.168.1.222, and the desired V2 decoder has a MAC address of 188A6A024990 as well as an IP address (NOTE: set to static to ensure a permanent sub-stream URL) of 169.254.5.89, then the video sub-stream URL would be constructed as follows (using the default values for width/height/bandwidth):
​
​http://192.168.1.222:10085/?action=stream&w=960&h=540&fps=30&bw=8000&as=0&dev=188A6A024990&ip=169.254.5.89&port=8080

The MAC Address and IP address of the desired V2 decoder can be quickly obtained by viewing the CONFIGURE page, navigating to the OUTPUTS/DECODERS/DISPLAYS subtab, and viewing the IP ADDRESS / MAC ADDRESS columns.

​

Using the sub-stream outside of the CBOX

Paste the copied URL (or modified URL based on the description above) wherever is desired, such as VLC media player, a supported Control System, or a new web browser tab. The preview sub-stream will populate as long as said software or device can establish a network connection to the AC-MXNET-CBOX-HA.


​

Image Snapshots

A static .JPG image snapshot can also be downloaded from a V2 Endpoint. To obtain an image snapshot, the following URL will need to be used:
​

NOTE: This URL is only for V2 Endpoints. See the next section for the URL for V1 encoder's image snapshots.
​
​

http://{CBOX IP Address}:10085/?action=snapshot&w={Width}&h={Height}&q={Quality}&as=0&dev={DeviceMAC}&ip={DeviceIP}&port=8080​

  • {Width} == Desired Width in pixels for the image to be downloaded. Maximum is 1920. Default value is 1024.

  • {Height} == Desired Height in pixels for the image to be downloaded. Maximum is 1080. Default value is 576.

  • {Quality }== Overall quality of the image. Maximum parameter value is 100. Default is 60.
    ​

  • {DeviceMAC} == Device MAC address of the desired V2 endpoint. Can be read using the CBOX API command "config get devicelist", or "config get device info {Encoder/Decoder_CustomName}".
    ​

  • {DeviceIP} == Device IP Address of the desired V2 endpoint. Can be read using the CBOX API command "config get devicelist", or "config get device info {Encoder/Decoder_CustomName}".

    • NOTE: To save programming resources, it is recommended to set the endpoint's IP address to static if image previews are being pulled outside of the CBOX, or the IP address will need to be periodically queried to safeguard the event that the encoder or decoder's IP address changes (such as after a power cycle if self-sign IPs are used).
      ​

A URL example with the appropriate parameter values is shown below:
​

http://192.168.1.222:10085/?action=snapshot&w=1920&h=1080&q=100&as=0&dev=188A6A0251DD&ip=169.254.244.20&port=8080

​

If the parameter values above are simply placed with "x", default values will be used instead. For example, the URL below will automatically download a 1024x576, 60% quality image from the target V2 endpoint:

The constructed image URL can then be utilized as needed outside of the CBOX.

V1 Encoder Image Snapshot

NOTE: Image snapshots are only supported for V1 Encoders.

V1 Encoder's static image snapshots can be grabbed in a similar manner to V2 encoders, but the URL is slightly different. A .BMP image file will be automatically downloaded as well. Example template URL Below:

  • {CBOXIP} == IP address of the target AC-MXNET-CBOX-HA.

  • {DeviceMAC} == MAC Address of the target V1 Encoder.

  • {DeviceIP} == IP Address of the target V1 Encoder.

  • {EpochTimeStamp} == current date/time stamp, in UNIX EPOCH format. A unique UNIX epoch timestamp is required for dynamic image captures from V1 Encoders.

Example URL with the appropriate parameter values:
​


​

The constructed image URL can then be utilized as needed outside of the CBOX.

Did this answer your question?