-
Notifications
You must be signed in to change notification settings - Fork 173
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
Publishing OpenCV VideoCapture to NATS server #112
Comments
lt' probably due to Delimiters of nats protocol(https://github.com/nats-io/docs/blob/master/nats_protocol/nats-protocol.md). Codes below works for me. noteIf you want to send over 1MB message, you need to change default value of
|
This use case would now be better suited with OrderedConsumers from JetStream: https://github.com/nats-io/nats.py/blob/a1a9270/tests/test_js.py#L523-L590 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I am using NATS to perform video streaming between microservices. It works great on NATS video subscriber.
However, I'm facing a problem with reading video frames from webcam and publishing them to nats-server by using OpenCV,
cv2.VideoCapture
.I guess, the problem is because of I/O blocking from
cv2.VideoCapture.read
(I've tried withcv2.imread
too, and it caused the same problem.)And when I move these 3 lines outside the loop, the streaming works fine.
Can anyone suggest me a solution to solve this NATS video streaming?
or what could be best practices for doing video streaming between microservices by using NATS.io?
Here is my sample code:
publisher.py
My subscriber just simply listens and prints random output to check if it's receiving something.
subscriber.py
The text was updated successfully, but these errors were encountered: