Giter Site home page Giter Site logo

gabrieljablonski / rtsp-rtp-stream Goto Github PK

View Code? Open in Web Editor NEW
87.0 2.0 21.0 7.9 MB

RTSP and RTP streaming. Programming assignment from the book "Computer Networking: A Top-Down Approach" by Jim Kurose

License: MIT License

Python 100.00%
python rtp-streaming rtsp-stream rtsp jim-kurose computer-networking a-top-down-approach

rtsp-rtp-stream's Introduction

RTSP and RTP streaming

DISCLAIMER: PYQT IS AVAILABLE THROUGH THE GPL LICENSE. THE MIT LICENSE ONLY APPLIES TO NON-PYQT CODE

Python implementation of the programming assignment from the chapter "Multimedia Networking" (chapter 7 in the 6th edition) of the book "Computer Networking: A Top-Down Approach" by Jim Kurose.

Implements basic RTSP and RTP streaming functionality using the standard Python 3 library, plus PyQt5 and Pillow for stuff related to GUI. Further info available in the assignment guide (from the 3rd edition, newer versions of the book might change the assignment slightly). Error handling is very minimal, reopening the server and client is required to run another session.

This implementation does NOT strictly follow the one provided by the book authors

Demonstration

Installation

Clone the repository with git clone https://github.com/gabrieljablonski/rtsp-rtp-stream.

Having python>=3.6 installed, create a virtual environment by running python -m venv venv inside the cloned folder.

Activate the virtual environment (source venv/bin/activate on Linux, .\venv\Scripts\activate on Windows).

Install the requirements with python -m pip install -r requirements.txt.

Usage

Go to the sources folder with cd src/ (video stream class assumes mjpeg file is in working directory).

Server should be run first with

python main_server.py <port> 

In which port is the port number for the RTSP socket to listen on.

Client can then be run with

python main_client.py <file name> <host address> <host port> <RTP port>

in which file name is the name for the file to be sent via RTP (movie.mjpeg is the available sample), host address is the server address (localhost if running on same machine), host port is the port selected when running the server, RTP port is the port for receiving the video via RTP.

Since you're probably running each instance on separate terminals, remember to activate the venv on both.

Suggested configs are:

python main_server.py 5540
python main_client.py movie.mjpeg localhost 5540 5541

rtsp-rtp-stream's People

Contributors

dependabot[bot] avatar gabrieljablonski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.