Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

MCS version 1.1.4 onwards (compatible with MCM 6.3.8 onwards) enables the user to crop a section of the Video that can be viewed on the Output Tile while monitoring.

Follow the steps below to crop the Video Source on the Tile using API 5.0. Please use the refresh token Authorization specified here for API 5.0 on MCS.

Before you proceed, please ensure you have added the source and configured the output encoder. For viewing the video on the Tile, please refer to Viewing the Output Mosaic on MCS

  1. You can use the GET API with UUID to get the details of the tile to which you have assigned the source to be cropped.

    GET: https://192.168.10.53/api/5.0/tiles/config/d39750f6-ab81-4870-8eb5-5134574f9c9f

    Response

    {
        "data": {
            "uuid": "d39750f6-ab81-4870-8eb5-5134574f9c9f",
            "label": "tile_beforecrop",
            "created": "2024-01-31T07:45:03.460Z",
            "modified": "2024-01-31T07:47:28.301Z",
            "content_type": "Channel",
            "min_width": 32,
            "min_height": 32,
            "default_width": 300,
            "default_height": 200,
            "description": "description of the tile",
            "objects": [
                {
                    "type": "Video",
                    "left": {
                        "pixels": 0,
                        "percentage": 0
                    },
                    "right": {
                        "pixels": 0,
                        "percentage": 29
                    },
                    "top": {
                        "pixels": 0,
                        "percentage": 0
                    },
                    "bottom": {
                        "pixels": 0,
                        "percentage": 21
                    },
                    "max_width": {
                        "pixels": null,
                        "percentage": 100
                    },
                    "max_height": {
                        "pixels": null,
                        "percentage": 100
                    },
                    "alignment": "Top Left",
                    "index": 1,
                    "crop": {
                        "left": {
                            "percentage": 0
                        },
                        "right": {
                            "percentage": 0
                        },
                        "top": {
                            "percentage": 0
                        },
                        "bottom": {
                            "percentage": 0
                        }
                    }
                }
            ]
        },
        "metadata": {}
    }

View the source before cropping on Output encoder

image-20240131-124500.png

  1. In POSTMAN under the BODY section, edit the percentage under the crop section shown below using PUT command.

    PUT https://192.168.10.53/api/5.0/tiles/config/d39750f6-ab81-4870-8eb5-5134574f9c9f

image-20240131-121827.png

BODY

{
    "data": {
        "label": "tile_aftercrop",
        "content_type": "Channel",
        "min_width": 32,
        "min_height": 32,
        "default_width": 300,
        "default_height": 200,
        "description": "description of the tile",
        "objects": [
            {
                "type": "Video",
                "left": {
                    "pixels": 0,
                    "percentage": 0
                },
                "right": {
                    "pixels": 0,
                    "percentage": 29
                },
                "top": {
                    "pixels": 0,
                    "percentage": 0
                },
                "bottom": {
                    "pixels": 0,
                    "percentage": 21
                },
                "max_width": {
                    "pixels": null,
                    "percentage": 100
                },
                "max_height": {
                    "pixels": null,
                    "percentage": 100
                },
                "alignment": "Top Left",
                "index": 1,
                "crop": {
                    "left": {
                        "percentage": 30
                    },
                    "right": {
                        "percentage": 25
                    },
                    "top": {
                        "percentage": 35
                    },
                    "bottom": {
                        "percentage": 20
                    }
                }
            }
        ]
    },
    "metadata": {}
}


Response

{
    "data": {
        "uuid": "d39750f6-ab81-4870-8eb5-5134574f9c9f",
        "label": "tile_aftercrop",
        "created": "2024-01-31T07:45:03.460Z",
        "modified": "2024-01-31T12:23:13.586Z",
        "content_type": "Channel",
        "min_width": 32,
        "min_height": 32,
        "default_width": 300,
        "default_height": 200,
        "description": "description of the tile",
        "objects": [
            {
                "type": "Video",
                "left": {
                    "pixels": 0,
                    "percentage": 0
                },
                "right": {
                    "pixels": 0,
                    "percentage": 29
                },
                "top": {
                    "pixels": 0,
                    "percentage": 0
                },
                "bottom": {
                    "pixels": 0,
                    "percentage": 21
                },
                "max_width": {
                    "pixels": null,
                    "percentage": 100
                },
                "max_height": {
                    "pixels": null,
                    "percentage": 100
                },
                "alignment": "Top Left",
                "index": 1,
                "crop": {
                    "left": {
                        "percentage": 30
                    },
                    "right": {
                        "percentage": 25
                    },
                    "top": {
                        "percentage": 35
                    },
                    "bottom": {
                        "percentage": 20
                    }
                }
            }
        ]
    },
    "metadata": {}
}
image-20240131-124039.png

  • No labels