How to get recordings from Recording Server using Protocol Integration?

Right now we are struggling with showing recorded footage. With live view it’s not happening at all, in fact live view is working pretty fine.

Apparently, methods to consume live view and recorded footage are different, with the last one forcing us to request a new image permanently.

Let me show you some lines code from Milestone documentation that will help us to be more clear.

When we want to require live view, we use the following method. In this case, once we request it through the socket, live images keep coming continuously, without any need to send the request again. So it seems to be simple as that, you request Live View, and images start to be coming until the user stop it.

<?xml version="1.0" encoding="UTF-8"?>1liveno75

On the other hand, once we want to play recorded footage (based on alarms), we use the following request. As you may see, this request is different from the one above and include some variables that will change as the recording move forward. For example, ${countReq} is a variable that is incremented one by one (1, 2, 3, 4, …. ) per request we send to obtain a recording period. It didn’t keep coming like the case for live view, in this case we need to request image by image.

<?xml version="1.0" encoding="UTF-8"?>${countReq}goto${centerTime}75no

We are experiencing some problems with these recorded footage.

  • First of all, we are seeing that countReq starts over and over again, let’s says it goes like 2,3,4,5,6 and then starts again 2,3,4,5,6, and it keep happening that way. As you may guess, it’s not the expected beheavior so the video play is not good at all.
  • On the other hand, we are requesting this images in a really short period of time, let’s say that we are doing twice per milisecond, which seems a lot of request. At this point I am not sure if this frecuency is or not supported by recording server or if it’s only affecting our application.

Having said all that, and sorry for this long explanation, I would like to know if you are able to help us to better understand what are happening us and why we are experiencing those things that I’ve mentioned above.

We would really appreaciate your help.

Thanks in advance.

Regards.

Pablo.

You might already know this TCP Video Viewer sample but let me tell you about the sample - https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/tcpvideoviewer/readme.html&tree=tree_3.html

This sample shows how to utilize the Image Server protocol to retrieve a sequence of images, so I hope it helps you.

Hint: It might be a good idea to use “next” instead of “goto” for your inspiration..

Hi Rie Kito, I hope you are doing well!

I am Lautaro Müller, in charge of the development of the application that we are carrying out together with Pablo Baustian.

The example you mentioned is the one we are currently using (TCP Video Viewer). Could you explain us what is the difference we would find when using “next” instead of “goto”? The hint was not clear.

Thanks in advance and greetings.

Lautaro.

We run into another problem, the image of the first request is successfully obtained, but then when we add the RequestId (adding from to 1) and AlarmTime (adding 80/120), obtaining a request like this:

'<? xml version = "1.0" encoding = "UTF-8"?>

3

goto

1626870527515

100

no

\r\n\r\n’

The following images are partially received, that is, with faults:

What could be the reason?

Again thank you very much.

Lautaro.

Here is the list of requests reference, please read this -

https://doc.developer.milestonesys.com/html/reference/protocols/imageserver_request_response.html

Does unmodified TCP Video Viewer sample work properly? Can you please test it?

https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/tcpvideoviewer/readme.html&tree=tree_3.html

Hi Rie, I hope you are well.

We managed to get the images correctly.

How are images sent to the player? Convert images to video and then send or send image by image?

It’s frame by frame. The sample tells you how to do it, so please explore the sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/tcpvideoviewer/readme.html&tree=tree_3.html

Hi Rie! Good day.

We are about to implement two-way audio (send and receive), to be able to open a channel, not only to reproduce an audio but also to be able to speak and at the same time be able to listen.

  1. What is the best way to implement this?
  2. Could you give me some tips?
  3. Do you have any examples and documentation?

In the SDK, we find an example called VideoViewer2WayAudio, is that exactly what we need to implement, could you give us an example with Protocol Integration?

I think you opened a new thread and I very much approve of opening new threads for new subjects..

https://developer.milestonesys.com/s/question/0D53X00008spyAtSAI/what-is-the-best-way-to-bring-twoway-audio