I have a small wifi based FPV camera for a drone. I've managed to get it to the point where I can download and save an h264 file using python.
TCP_IP = '193.168.0.1'
TCP_PORT = 6200
BUFFER_SIZE = 2056
f = open('stream.h264', 'wb')
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((TCP_IP,TCP_PORT))
while True:
data = sock.recv(BUFFER_SIZE)
f.write(data)
print("Writing")
sock.close()
f.close()
What I've been trying to do for a while now is play the stream. I've found the stream, I can download it and save it, but now I want to open it live. I've tried using VLC's 'open network stream' with a variety of options, but none of them seemed to work.