Failed to get thumbnail from Mobile server with error code 32 or 43

Our web application encounter an intermittent issue when call below function to request thumbnail from mobile server. Sometimes it is failed and returns error code 32 or 43. We double checked and confirm the input parameter and video recording data is no issue. Would you please help to advise anything we can do to investigate and solve the issue? Thanks.

GetThumbnailByTime

Input parameter

Time: workstation system current time

SeekType: TimeOrBefore or TimeBefore

Milestone system version: 2021R1

Hi Zhang,

Error code 32 signals that there’s no recordings at the time requested. Double check that your camera is recording. One problem might be the time zone - make sure that you’re taking into consideration that when you’re converting local time to Epoch.

Error code 43 is trickier and I don’t have an clear answer why you’re getting it.

Try explicitly providing dimensions of the thumbnail (DestWidth and DestHeight) and make sure they do not exceed the original camera resolution. Let me know if that helps.

Br,

Nikolay

Thank you very much for reply. We have double checked recording data and the input parameter, and confirm they are no problem. It is an intermittent issue, and frequently occurred when camera PTZ moving.

May I know what is the searching range when set SeekType as TimeBefore or TimeAfter? It seems the parameter is not working in case missing recording data. Thanks.

Searching range is irrelevant, you’ll always get the nearest frame possible (depending on the search direction - before or after). The only problem comes when there’s no recordings at all - in such case you’ll get error code 32 (NoRecordingsFound).

If you need a screenshot at a particular time with absolutely no deviation, you shall specify SeekType=Time.

If you need the closest screenshot before a given time, you should set SeekType=BeforeTime.

If you need a particular time or the closest time before it, you should provide SeekType=TimeOrBefore.

Similarly for TimeAfter and TimeOrAfter.

I hope it’s a bit clearer now.

Thank you for your clarification. Please refer to the sample screenshot attached. We try to capture the snapshot at the time nearby a bookmark. It is successful at 4:47:24pm, but failed at 4:47:19pm. After double check, we find around 7 seconds video data is missed although the recording data status bar looks quite good. The missed video data is from 4:47:15pm to 4:47:22pm.

As you explained, we also expect the mobile server can return the image at 4:47:14pm when app put the input parameter as 4:47:19pm because the SeekType is set as TimeOrBefore. Unfortunately mobile server return error code 32. Please help to advice. Thanks.

I don’t have a simple answer to that so here’s several additional questions:

- What is the value of your Time parameter in this case (in Epoch format)?

- Do you get the same result when you call GetThumbnailByTime and you provide Time=4:47:15pm (and SeekType=Time)? What about 4:47:14pm?

Regarding the error code 43, our application does not set image size at input parameter (DestWidth and DestHeight), so mobile server return the image with the original resolution.

Is it possible that one of your input parameters is quite long?

Please provide the exact call to our API or preferrably even a WireShark trace so I can see both the request and response.

After we upgrade the Mobile SDK version 2021R1, seem the error code 32 and 43 issue could be solved, but we encounter a new issue, sometime mobile server will return error code 23. Would you please give us some suggestion?

Previous Mobile SDK version is 2019R2, seems the input parameter SeekType, Image size is not working for this function even we have added them into the connection file. Is it possible to keep this version and add the input parameter to reset the seek type and image size? Because some function, such as live video, is not working properly after SDK version upgrading. Thanks.

Hi again,

SDK version should always match Mobile Server version, otherwise various things may not work. So upgrading the SDK to 2021R2 is the right choice for you, since your Mobile Server is also 2021R1.

Now let’s discuss error code 23 (NotAllowedInThisState). Is this returned by GetThumbnail call? If so - it means you haven’t opened a video stream for this camera before requesting the thumbnail.

If you have problems with live video (which is definitely not normal), please open a new forum thread and we’ll try to help.

Noted. Thank you very much for your support.