Have connected to server using Protocol Integration. Made live request. But image cannot be viewed after saving.

I have a JAVA project from where followed the below steps to get the live stream of camera from the server. But after saving the image stream from the server, the image is not view able.

Please find the below steps followed :

  • Issued methodcall connect request to server and received successful response
  • Issued methodcall live request to server and started receiving successful response.
  • For testing purpose, once the first ImageResponse is received from server, saved the binary data (after an emtpy live just after the ImageResponse header) and continued to save the data until “\r\n\r\n” to a file
  • The saved file cannot be rendered by image viewer.

Please suggest.

Sometimes the data is encapsulated with Generic Byte Data header.

What I suggest is that you take a look at the TCP Video Viewer sample and how it handles the data based on situation and server product.

This reminds me, there is a new improved version of the sample.. http://download.milestonesys.com/MIPSDK/Samples/protocol_MIPSDK2019R1_BetaSamples.zip