Context:
I want to get a series of JPEG images from the Image Server by specifying different times, so for example I may call the Goto endpoint 6 times, with 6 different values of typically 1000ms apart from each other…to get 6 different images of course.
My testing environment is XProtect Essential+ 2020 R2.
Problem:
The endpoint call is successful and I get a valid response, but the problem is that the content-type is always application/x-genericbytedata-octet-stream
This what my connect request looks like:
<?xml version="1.0" encoding="UTF-8"?>
<methodcall>
<requestid>0</requestid>
<methodname>connect</methodname>
<username>dummy</username>
<password>dummy</password>
<cameraid>${cameraID}</cameraid>
<alwaysstdjpeg>yes</alwaysstdjpeg>
<connectparam>id=${cameraID}&connectiontoken=${token}</connectparam>
<clientcapabilities>
<privacymask>no</privacymask>
<privacymaskversion>0</privacymaskversion>
<multipartdata>no</multipartdata>
</clientcapabilities>
<transcode>
<allframes>no</allframes>
<width>640</width>
<height>480</height>
<keepaspectratio>no</keepaspectratio>
<allowupsizing>yes</allowupsizing>
</transcode>
</methodcall>
And the goto request itself:
<?xml version="1.0" encoding="UTF-8"?>
<methodcall>
<requestid>1</requestid>
<methodname>goto</methodname>
<time>${milisecondsSinceUnixEpoch}</time>
<compressionrate>75</compressionrate>
</methodcall>
Given all these parameters, the docs seem to suggest that I’ll always get an image/jpeg response, not application/x-genericbytedata-octet-stream.
I also confirmed that the response is not JPEG by checking the first two bytes of the body (for JPEGs they should always be 0xFF and 0xD8, which they are not in my case).
The response is always something like this:
ImageResponse
RequestId: 1
PrivacyMask: none
Prev: 1605662176129
Current: 1605662176129
Next: 1605662176169
Content-length: 67073
Content-type: application/x-genericbytedata-octet-stream
…rest of binary data
Perhaps I’m missing something?


