How to post video data to a videoTopic REST url

I’m trying to push video into XProtect over the AI bridge, I have got the REST url for the videoTopic successfully and can see the virtual device in the management server etc.

But I can’t find any documentation on what the format of the REST request should be to post the video data. My video is h264.

Thanks

Hi,

You need to point to the broker port in the machine that contains the AiBridge Linux Machine.

Here’s a template of what the URL should look like, replace the values between curly brackets

POST http://{AIBHost}:8382/video/{topicId}/{videoTopicName}/h264/{cameraId}_{streamId}?ts={current time in miliseconds}&sync={current time in miliseconds}&seqnum={number of the sequence of the image}

As an example, here’s the URL:

POST http://AIBHost:8382/video/8e9b42c7-31b4-488d-a7c0-dc594eb2d351/anonymized/h264/371fb22d-cdff-4590-b038-fce2de33f970_28dc44c3-079e-4c94-8ec9-60363451eb40?ts=1716817807425&sync=1716807803588&seqnum=596

The image is in the body in a bytes array and the MIME type is application/octet-stream.

Hope this helps,

Jaume

thanks for the reply, I was just having another look at this. To make things simpler I’ve switched the format to MJPEG.

What format is the byte array supposed to be, RGB pixels or a jpeg image?

I don’t get any errors on the POST and the system monitor says the virtual camera is running at 10fps as expected. The images are blank when I view them or try to record them.