LIVE_STREAM_VIDEO_APP_OPEN_CV (3)

Image is just the array of information that stores the rgb value in a structured format that represents a object .

SOCKET PROGRAMMING

Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while other socket reaches out to the other to form a connection. Server forms the listener socket while client reaches out to the server

There are two functions in this program 1 for sending data 1 for rercieving data .

Data here is the array of an image .

Socket is created on the system to connect .

Send function make connection with other system and using pickle module we are dumping data in to other system.

Capturing image frame using opencv moule .
And sending these array data via socket , using pickle module.

Recieve function loads the packates from sender and using cv module we are displaying the data into image format continously ,
So that it looks as video .

Using multi threading to run both the functions simultaneously on each server.

Multithreading is a model of program execution that allows for multiple threads to be created within a process, executing independently but concurrently sharing process resources. Depending on the hardware, threads can run fully parallel if they are distributed to their own CPU core.

Complete code :

i have integrated multi threading in live stream project where a person can transmit and recieve data simultaneously

send() function used to send data

recieve() to recieve

Thanks

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store