Slahuddin-Ch / WebRTC_streaming

python scripts to stream video from 1 laptop to another
6 stars 1 forks source link

Video Streaming for ROS web video server

Overview

This application allows for streaming video over WebRTC using ROS topics. It comprises three main components:

  1. WebRTC Stream Publisher: Streams a ROS topic video stream using WebRTC.
  2. Signaling Server: Manages signaling for WebRTC connections.
  3. Receiver: Receives the WebRTC video stream and displays it.

WebRTC Stream Publisher

Dependencies:

Description:

This script captures video from a specified ROS topic or a local video device and streams it using WebRTC. It can be configured to change the source, resolution, and framerate.

Usage:

Key Components:


Signaling Server

Dependencies:

Description:

This server facilitates the exchange of WebRTC signaling data between the publisher and the receiver. It maintains a list of connected clients and relays messages between them.

Usage:

Key Components:


Receiver

Dependencies:

Description:

This script establishes a WebRTC connection with the publisher to receive the video stream. It also runs a Flask server to display the received video stream in a web browser.

Usage:

Key Components:


Installation

  1. Clone the repository:

    git clone [repository-url]
  2. Install dependencies:

    pip install aiortc av opencv-python websockets flask
  3. Run the components:

    • Start the signaling server: python signaling_server.py
    • Run the WebRTC stream publisher: python webrtc_stream_publisher.py
    • Run the receiver: python receiver.py
  4. Access the stream:

    • Open a web browser and go to http://38.242.137.75:5000.

Configuration


Notes