Creating a TCP or UDP stream that can be connected to at any time without pausing at the .accept() statement. #917
Unanswered
bkcarter333
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am building a time lapse camera with the RPi3+ running Bookworm, and a Raspi Camera v3 attached. I am programming in Python3.
I have tested the example code called capture_stream.py, and am able to connect to the live stream form the camera using a TCP connection from VLC player.
The code executes a command called conn, addr = sock.accept(), which causes the code to stop and wait for a client to connect.
I want to start the stream, but continue on in the code so that the rest of the time lapse software will execute regardless of their being a client connected. I then use the same camera objects (picam2) later in the code to capture still images that are saved by the time lapse logic.
Is it possible to do this? My code looks like this:
It appears to run, but the stream connected to via VLC is blank.
Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions