We’re currently writing a protocol integration to listen to metadata devices from ANPR cameras, such that we can extract the plates detected, alongside an image.
We’re using the ImageServer protocol to connect to the appropriate recording server, and listen for the metadata coming from the camera (Live on the metadata deviceId).
When we receive an ANPR event, we have then tried two approaches to returning the images:
- Using RecorderCommandService and JPEGGetAt on the CameraId that relates to that metadata
- Using ImageServer protocol, with GoTo (keyframesonly no) and on the connect - transcode all frames yes, and alwayssstdjpeg yes
Unfortunately, both of these approaches seem to give us just the keyframe from the camera for the timestamp of the ANPR read, which often gives us an image without the vehicle in it. We’re testing with Axis Q1700’s, and the keyframe interval is every 2 seconds.
Two questions:
- Is the correct approach to getting ANPR Metadata from a camera the way we’re doing it (via the recording server ImageServer protocol)? Or should we be talking to the event server?
- How can we get an image for the exact timestamp that triggered the metadata?
Thanks
Yes, the Event Server has no handling of the footage recorded in the Recording Server, so this is not an option.
I believe you should be able to. That you get only key frames seems a flaw. Please test. If you use the TCPVideoViewer sample unmodified and play back a sequence, do you get only key frames?
https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/tcpvideoviewer/readme.html&tree=tree_3.html
What product and version of XProtect is the VMS server?
Thanks Bo.
I have tried with the TCPVideoViewer but when compiling it on my dev machine and moving to a remote server running Milestone it crashes when clicking connect - any ideas?
As above, the issue seems to be that issuing the GoTo to a specific timestamp, returns the nearest-available keyframe.
In the sample image attached, we request a timestamp at 1670361165319, however get an image from 1670361165717 - the second timestamp is what is returned in the ImageResponse header “current”. The plate on the car that generated the ANPR read has already exited the frame.
When looking at the image that the camera sends directly (Axis supports HTTP POST, which includes an image in each read), that is the actual frame that generated the read.
I’m testing against XProtect Professional+ 2019 R3.
As you can see, getting the images from Milestone is a sub-par experience currently. If we can request the exact timestamp of the metadata event, I believe this will fix our problems.
Keen to hear your thoughts!
On this rather old VMS, did you install the cumulative patches? I did not find anything in the lists of solved issues that fits what you describe, yet we always recommend this.
https://supportcommunity.milestonesys.com/KBRedir?art=000034370&lang=en_US
In contradiction to our recommendation always to use the newest MIP SDK, perhaps you could try using the old MIP SDK and see if you can avoid the crash on the sample.
I did not ask but assume you use the newest. The older are not easy to find, as it is against recommendation to use them, but let me in this case lead you to 2019R3 - http://download.milestonesys.com/MIPSDK/MIPSDK_Installer_2019R2.msi
If you test with the Smart Client I assume you can single step and you can get the image you need manually, so that you can verify the footage is recorded, and not that it starts recording too late. (Recording rule that does not ensure it is recorded, but kicks in too late, would actually explain the issue.)
If you after the goto do a previous, do you get the previous key frame? Could be worth a test.
Try to use GetAtOrBefore, for me it’s working
Freddy