With the current coronavirus situation, online learning has been gaining an increasing share of the educational systems in schools and universities. CAMVID-19 is a live streaming web application that aims to provide online content to many students at the same time. This platforms offers live streaming, file sharing, web chatting, and email services.
Before you continue, ensure you have met the following requirements:
-
You have installed the latest version of Python.
-
You have installed
flask
,open-cv
, andpyaudio
, andsys
as follows:
pip install flask
-
You are using a Windows machine. Linux or Mac OS is not currently supported.
-
You have turned on the less secure app access in your google account, as shown below:
- You have turned off your Windows Defender Firewall so that other devices can connect to your device and view the streaming.
- Change the ip address field to your ip address in
website\main2.py
.
host_ip = '192.168.XXX.XXX'
- Run
server\server_chat.py
,server\server_stream.py
,server\server_audio.py
, andserver\selectiveServer.py
in separate terminals (make sure to be in the right directory) as follows:
python server_stream.py
-
Run
website\main2.py
in another terminal. -
The flask server is now up and running! In your browser, type in
https://127.0.0.1:5000/
to run the web app. Thelogin
page will prompt you to input your username, room name, and room password. The room refers to the classroom which includes the following features. The room name and password are authenticated withFlask
usingSQLAlchemy
. To login, use 'Computer Networks' as room name and 'admin' as room password.
Streamed with a multi-client server on port 9000
, the frames are streamed to clients, where each client gets a thread. As for the chatting feature, the bits are streamed on port 5511
.
This feature supports both upload and download of TXT files, and it facilitates the navigation through the directory of files and folders.
Using pyaudio
, the podcast feature streams audio on port 5858
. Connected devices can pause and resume this stream.
This feature connects to the Gmail SMTP
server on port 587
, logs in to your account with your credentials, and sends an email to the chosen destination email.
A family of linear error-correcting codes, Hamming codes are used to simulate bit flipping, error detection, and error connection. It can detect one-bit erros and correct them without detection of uncorrected errors. A maximum of one-bit error is introduced to the input text, detected, and then corrected.
This feature simulates a lossy channel through dropping packets based on a certain specified probability. The selective repeat algorithm retransmits the packets, and the data was sent from send.text
to receive.txt
free of errors.
- Flask - Used to create a Flask web server from the Flask module.
- OpenCV - To capture frames from the camera.
- PyAudio - To record and stream audio.
- SQLAlchemy - Login authentication with Flask and SQLAlchemy.
- https://pythonspot.com/login-authentication-with-flask/
- https://code.activestate.com/recipes/580691-hamming-error-correction-code/
- https://github.com/BryceGo/Python-SMTP-Mail-Client
- https://github.com/techwithtim/Chat-Web-App
- https://github.com/miguelgrinberg/flask-video-streaming/tree/v1
- https://pythonprogramming.net/ftp-transfers-python-ftplib/
- https://github.com/ckshankar02/Selective-Repeat-ARQ
- https://gist.github.com/fopina/3cefaed1b2d2d79984ad7894aef39a68
- Hat tip to Tarek Naous for naming the project.