-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add FileStreamFrameGrabber #62
Conversation
README.md
Outdated
'file_path': 'path/to/your/video.mjpeg' # or .mp4, .avi, etc. | ||
}, | ||
'options': { | ||
'max_fps': 2, # Decimate stream if FPS is too high |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is perhaps confusing to end users. Maybe something like "specify a lower FPS than the original video's FPS if desired. Framegrab will skip extra frames as needed."
I also wonder if we should just call this "fps" instead of "max_fps". I was the one who introduced the term "max_fps" for RTSP streams, and it is admittedly confusing. It determines the rate at which the frames are grabbed from the network stream, effectively emptying the buffer. As long as this value is greater than or equal to the rate frames are actually being published by the camera, the buffer won't grow, hence "max_fps".
The way you are using it is a bit different. You can effectively lower the FPS of the camera if you want to. If you tried the same thing with an RTSP grabber, it would cause problems with the buffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, its still a max_fps
though - we cant speed up the video's underlying FPS and so this can only cap the FPS.
README.md
Outdated
config = { | ||
'input_type': 'file_stream', | ||
'id': { | ||
'file_path': 'path/to/your/video.mjpeg' # or .mp4, .avi, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I tried it with a .mov, and it worked, so that's nice. Maybe we should mention that.
| options.keep_connection_open | True | - | optional | - | - | - | optional | optional | | ||
| options.max_fps | 30 | - | optional | - | - | - | - | - | | ||
|
||
| Configuration Name | Example | Generic USB | RTSP | Basler | Realsense | Raspberry Pi CSI2 | HLS | YouTube Live | File Stream | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This table is becoming a little hard to read on github.com due to the need for horizontal scrolling. Not a huge deal, but a little annoying. Not sure to fix this aside from redoing it in html/css.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I noted one typo in the documentation and added a few other suggestions/comments.
Add a framegrabber class that can grab frames from a filestream. This works on mp4 and mjpg available either locally and or remotely via a url.
Adding support for this class will let us fully switch to using
framegrab
within https://github.com/groundlight/stream