This is an COM2022 Computer Networking Assignment 2021/2022 by Wish Suharitdamrong in Group 19.
RTVB is a protocol created on top of User Datagram protocol on Application layers.
- Python version 3
- Source of Video
- WebCam
- MP4 file
- MySql Database server
To run a this script
Use the package manager pip to install required libraries.
pip install numpy
pip install opencv-python
pip install imutils
pip install python-dotenv
pip install mysql-connector-python
To maximize a buffer size of UDP in MacOs
sudo sysctl -w net.inet.udp.maxdgram=65535
Use environment file to connect Mysql database by
- Create .env file and copy everything from .env.example
HOST='localhost'
DATABASE='DATABASE'
USERNAME='USERNAME'
PASSWORD='PASSWORD'
- Replace a database credentials in a .env file
connect to Mysql database without .env file replace os.getenv() with database credentials in UDPServer.py
HOST = os.getenv('HOST')
DATABASE = os.getenv('DATABASE')
USERNAME = os.getenv('USERNAME')
PASSWORD = os.getenv('PASSWORD')
open the mysql terminal and run a command
mysql> source db.sql
To run a Server
python3 UDPServer.py
To run a Client
python3 UDPClient.py
Wish Suharitdamrong