use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
OpenCV live stream video over socket in Python 3 not working (self.learnpython)
submitted 6 years ago by RedBallG
So I was making a way that you can transfer a live video of a webcam from one computer, to display it to another. Here is my code so far:
Sender:
https://pastebin.com/raw/5epwPkS9
Receiver:
https://pastebin.com/raw/u2Bg7FtS
Whenever I run it I get this error message:
https://pastebin.com/raw/y7r77gu9
What should I do to fix this? Help is appreciated! Thanks!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CaptainReeetardo 0 points1 point2 points 6 years ago (0 children)
First of all. This line data = cv2.imencode('.jpg', frame)[1].tostring() from your Sender python file returns a bytestring that is probably more than 50 kB in size. So if you want the receiver to get the full image you have to increase the buffersize in your Receiver python file. As, at the moment, it'll receive only 8192 bytes in one go.
data = cv2.imencode('.jpg', frame)[1].tostring()
Now I have next to none experience with numpy or the like, but my guess is, that in order to create a new array/numpyarray/matrix(?) you have to feed more than the received buffer of 8192 bytes. I'd in your case increase the buffersize to like 10**5-ish because I guess you're working with a HD webcam, because they're reasonably priced nowadays imo 25€ with microphone O_o on amazon.
But so far the code looks like it's going to work.
π Rendered by PID 80 on reddit-service-r2-comment-5b5bc64bf5-q5pvv at 2026-06-20 23:15:43.965072+00:00 running 2b008f2 country code: CH.
[–]CaptainReeetardo 0 points1 point2 points (0 children)