This project demonstrates a basic implementation of WebRTC for streaming audio and video using Python (with Aiortc) for the server-side and JavaScript for the client-side.
WebRTC (Web Real-Time Communication) enables peer-to-peer audio, video, and data sharing directly between browsers without the need for plugins or external software. This project sets up a Python server using Aiortc to facilitate real-time audio/video streaming between peers.
-
Establishes peer-to-peer connections using WebRTC.
-
Streams audio/video between connected peers.
-
Uses WebSocket for signaling between client and server.
-
Demonstrates basic handling of SDP (Session Description Protocol) for peer connection setup.
Before running this project, ensure you have the following installed:
-
Python 3.x
-
Aiortc
-
aiohttp
You can install Aiortc and aiohttp using pip:
pip install aiortc aiohttp `
- Clone the repository:
git clone https://github.com/PerezChris99/WebRTC-V-A-1 cd webrtc-streaming-project `
- Install dependencies:
** pip install -r requirements.txt `
Run the Python server script (server.py):
Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML python server.py
The server will start and listen on http://localhost:8080.
Open the provided index.html file in your browser. This will initiate the WebRTC connection to the server.
-
Ensure your browser supports WebRTC (most modern browsers do).
-
Adjust index.html and client.js as needed for your application.
-
Customize server.py for additional features like data channels or audio-only streams.
This project is licensed under the MIT License - see the LICENSE file for details.