Python Forum
Socket to stream data and tranmit and revieve data - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Socket to stream data and tranmit and revieve data (/thread-37940.html)



Socket to stream data and tranmit and revieve data - kiyoshi7 - Aug-11-2022

Hi, I want to be able to send and receive data between a host and client and stream a video from one computer to another computer outside my network (ie over the internet).
I have already used sockets to have two computers send and receive data like in a messenger system, but I do not know to add a video stream to it.

For example on the client I want a video view, two buttons, say camera a and camera b, and a text some number.
When I click on the button camera a the server send a video stream of camera a and when I click on camera b the server will send a a stream of camera b.
The server will always send a number to send to the client.

I'd imagine the server would send an array like this: [video, DataForText] but, I am confused if this would work to send data from the client to the server.
In my messaging project every message to and from the server would specify the message size first, but I imagine that wouldnt work for streaming videos.
Also the client in this case is going to be an android app I am writting in kotlin.

Sorry if my description is a bit confused I will try to clarify any part. thanks for your time