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

Ros bag creation from mp4: read framerate using cv2 to automate sampling strategy #426

Open
cameron-a-johnson opened this issue May 21, 2024 · 1 comment

Comments

@cameron-a-johnson
Copy link
Collaborator

Would it be desirable to default to an "auto" method that attempts to read the framerate and decide how to sample accordingly?

import cv2
cam = cv2.VideoCapture('video2.avi')
fps = cam.get(cv2.CAP_PROP_FPS)

Since we have 30Hz and 15Hz videos, and always want to sample at 15Hz... this might childproof the process a bit.

@Purg
Copy link
Member

Purg commented May 21, 2024

If its that simple sounds fine to me, but given my history with spotty metadata in these kinds of files we need to have an appropriate error-out or fallback logic when CAP_PROP_FPS may not be there.

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

2 participants