Skip to content
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

Investigate the possibility to store synchronized video streams #155

Open
S-Dafarra opened this issue Jan 18, 2022 · 1 comment
Open

Investigate the possibility to store synchronized video streams #155

S-Dafarra opened this issue Jan 18, 2022 · 1 comment

Comments

@S-Dafarra
Copy link
Collaborator

When logging data, it would be extremely useful to store also video streams. For example, we could log what the robot sees or, even better, external camera flows.

cc @Nicogene @AlexAntn @traversaro @GiulioRomualdi @pattacini @DanielePucci

@S-Dafarra
Copy link
Collaborator Author

For what concerns the saving instead, I think that storing also videos inside the .mat file is not ideal as the dimension of the file might grow too big. Also, it might come in handy to just look at the video first. On the other hand, it would be needed to have some sort of synchronization mechanism between the data and the video.

I tried to have a quick look at possible solutions in this direction. OpenCV might be a good and easy possibility to create the video (see https://www.opencv-srf.com/2018/01/save-images-and-videos-to-file.html). As for the synchronization, one possibility could be to simply store a vector indicating the timestamp of each frame. In this way, given the timestamp, it is enough to get the corresponding frame using something similar to https://stackoverflow.com/a/46101380. It is also possible to get the timestamp of a given frame with https://stackoverflow.com/a/47743467.

There is a caveat. OpenCV can same videos only at a constant framerate. Given that it would be up to the user to save each image, this cannot be enforced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant