Timestamp synchronization problems

In Progress

Comments

9 comments

  • Avatar
    Andrey Terentyev

    Hello,

    > Can you explain why a similar problem arises?

    Let's go to specifics in order to understand the nature of the problem.

    > Our third-party system gets the same video stream as the plug-in.

    What does "the same video stream" mean? What is the metrics of sameness? How do you make sure it is the same? Please, elaborate how exactly your third-party system gets video stream from the server?

    > We send a coordinates of the bounding box and a timestamp of the frame on which the object are displayed

    How exactly do you send coordinates? What is the workflow? Where do you perform object recognition?

    > But the frame delay always turns out and the frame does not coincide with the object.

    What do you mean by "object"? What is it to you: something in the video stream to be interpreted like object or an "object" is the bounding box coordinates with attributes?  Could you describe step by step, how do you detect the frame does not coincide with the object?

    0
    Comment actions Permalink
  • Avatar
    Serhii Syrtsov

    Ok.

    The same stream means that the plug-in and the third-party system receive frames of the video stream via the same RTSP link. 

    Recognition of an object, for example, a license plate, takes place in a third-party system. The coordinates of the recognized license plate are sent to the plugin using an websocket message. This message also contains recognized number, make, model, year and timestamp of the moment of recognition license plate.

    As you can see timestamp from third-party system is incorrect for Meta VMS. But time on both systems is synchronized. And the result should be like that.

    I hope I clearly explained what the point is. Thanks.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    > The same stream means that the plug-in and the third-party system receive frames of the video stream via the same RTSP link.

    I see the Server receives video stream from GENERIC_RTSP source. Does your third party system pull RTSP from the Server?

    Does the Server have "Trust camera timestamp" set for this GENERIC_RTSP? (See screenshot)

    0
    Comment actions Permalink
  • Avatar
    Serhii Syrtsov

    Yes, our third party system pull RTSP from the Server. I tried to set a parameter "Trust camera timestamp", but that did not help.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello Serhii Syrtsov ,

    I'm sorry. My first response was a kind of irritated and picky. That was inappropriate. Please, accept my apologies.

    Thank you for clarification.

    For displaying a picture in right panel on metadata retrieval, GUI client uses /ec2/cameraThumbnail API in order to get a frame from the video archive. GUI client passes to API a frame timestamp, which is chosen from either

    • timestamp of best shot video frame, if it's set;
    • timestamp of the first frame of the track, if best shot is not set.

    I suppose in your case the best shot is not set.

    1. Let's assume, your third party application receives a frame with TS1 at the moment T1.

    2. The application processes the frame, generates metadata and sends it to a plugin on the Server.

    3. A plugin accept metadata corresponding to a frame with TS1 at the moment T2 packs to ObjectMetadataPacket and passes to the Server.

    Which timestamp do you set in ObjectMetadataPacket::setTimestampUs() at this point?

    Could you share the code?

    4. Server sends metadata to the GUI client.

    5. GUI client accepts metadata: frame, attributes etc. at the moment T3.

    I suppose, your plugin at step 4 sets current time, i.e. T2 as timestamp, not the TS1. T2 > TS1

    It this case GUI calls /ec2/cameraThumbnail with T2 as timestamp and gets a wrong frame, meaning the one not corresponding to T1.

    0
    Comment actions Permalink
  • Avatar
    Serhii Syrtsov
     
    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello,

    It seems ok, it depends on what is going on outside.

    Could you share your whole code, please? I'd like to build it in my lab and see what's going on inside.

    Just send me a link an archive to email.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi,

    I'm sorry for misleading you. I created a support ticket. Please, check your inbox.

    The solution will be posted here once problem is resolved.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi Serhii,

    According to your response in the ticket, you've found another way to integrated with Nx and no help is more needed yet.

    If you are ok with it, could you please share your solution in order other community participants could learn from it?

    0
    Comment actions Permalink

Please sign in to leave a comment.