this is a package that is used to stream camera, audio, screenshare data via network
examples:-
server.py
from vidshare import StreamingServer
import threading
server = StreamingServer("localhost", 5000) #set your ip and port on server
thread = threading.Thread(target = server.start_server) #thread to start server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.stop_server() #to stop the server
break
audio client example:-
client1.py
from vidshare import AudiostreamClient
import threading
server = AudiostreamClient("localhost", 8000) #ip and port to connect to the server
thread = threading.Thread(target = server.connect_client) #thread to connect to the server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.close_connection() #to close the connection to the server
break
client2.py
from vidshare import AudiostreamClient
import threading
server = AudiostreamClient("localhost", 8000) #ip and port to connect to the server
thread = threading.Thread(target = server.connect_client) #thread to connect to the server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.close_connection() #to close the connection with the server
break
screenshare streaming example:-
client1.py
from vidshare import Screenshareclient
import threading
server = Screenshareclient("localhost", 8000, quit_key = "q") #ip and port to connect to the server and quit_key which is used to quit the cv2 window
thread = threading.Thread(target = server.connect_client) #thread to connect to the server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.close_connection() #to close the connection to the server
break
client2.py
from vidshare import Screenshareclient
import threading
server = Screenshareclient("localhost", 8000, quit_key = "q") #ip and port to connect to the server and quit_key which is used to quit the cv2 window
thread = threading.Thread(target = server.connect_client) #thread to connect to the server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.close_connection() #to close the connection to the server
break
camera client example:-
client1.py
from vidshare import CamerastreamClient
import threading
server = CamerastreamClient("localhost", 8000, camera = 0) #ip and port to connect to the server and camera to define camera number default is 0
thread = threading.Thread(target = server.connect_client) #thread to connect to the server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.close_connection() #to close the connection to the server
break
client2.py
from vidshare import CamerastreamClient
import threading
server = CamerastreamClient("localhost", 8000, camera = 0) #ip and port to connect to the server and camera to define camera number default is 0
thread = threading.Thread(target = server.connect_client) #thread to connect to the server
thread.start() #start the thread
while True:
input_ = input('Enter Quit To Exit : ')
if input_ == 'quit' or input_ == 'exit':
server.close_connection() #to close the connection to the server
break
Release files for vidshare 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vidshare-1.1.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vidshare-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB