-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Providing Video file as sensor and with start time of the video #796
Comments
@divdaisymuffin Can you share the changes you made in mqtt2db.py? |
If you adjust the real_base here to be the video_base:
And change this to be:
I believe that should adjust the timestamps to be based on the video_base as opposed to the current time. This can be done in vaserving directly - but would have the same basic effect - is this the adjustment you already have made? If so can you give an example of the lag in bounding boxes in the visualization? |
Hi @nnshah1 The changes we made in mqtt2db.py are as follows for sync with video time : `if ("time" not in r) and ("real_base" in r) and ("timestamp" in r):
For recording time we made changes in upload.py: `if sensorType == 2:
|
@nnshah1 as you mentioned about video_base. From where we will get video_base? realbase we are getting in r object from pipeline.json, but I cant find any video_base there. |
|
try something like:
The timestamp will give the relative position of the event within the stream, and then adding in the base gives you the absolute time. |
I would first try to only modify mqtt2b and rec2b to update the timestamps and metadata getting published and leave upload alone - |
@nnshah1 Thanks for the suggestion, we will try this and get back to you |
@nnshah1 we have tried the suggestion and made changes accordingly in mqtt2db.py and rec2db.py. |
the timestamp is the number of nanoseconds since the stream started recording, thus it is a relative number and not an absolute. The absolute time is gotten by adding in the base (should be in nanoseconds since the epoch) to the timestamp. For recordings that start at a different base time - that should give the same result as you would want - i.e. using a different base captured in nanoseconds since the epoch would give you the correct timestamp. I would double check that your adding in the base as nanoseconds and then dividing back down to seconds before interpreting the timestamp. |
@nnshah1 your suggestion helped me a alot for creating recording with the given video start timestamp. I have taken second value after splitting the filename and added that into my startTime and taken that into ns, this change is been made into rec2db.py andi got exact time in my recordings. |
@divdaisymuffin , you had mentioned the lag in bounding boxes on the web visualization. Pipeline with watermark:
The dark blue boxes are by gvawatermark and the cyan boxes are from analytics.js drawing bounding boxes. Screenshots with customize start time changes:Screenshots with master:This issue is independent of changes relating to customizing start time and should probably be filed as a separate Github issue. |
Closing issue as ability to set starting time has been demonstrated - issue with lagging watermarks has to do with the inference interval and is not related directly to the customized start time. Let us know if there is an issue with customizing the start time. |
Hi @nnshah1 and @xwu2git
The current video simulation works with taking system time as start time of video, but our target is to get actual video start time to be taken, which means we need analytics index data to be contain timestamp of video start timestamp not current system time, similar the recording index.
We have already tried to replace the system time in mqtt2db.py and upload.py file by giving this as a input to yaml, and taking it as a environmental variable.
But we are facing issues with lag in bounding box creation they are not well sync.
Is there a way via VAserving we can take start time directly ? or any other possible option you can suggest.
The text was updated successfully, but these errors were encountered: