Giter VIP home page Giter VIP logo

python-rtsp-server's Introduction

python-rtsp-server

Python-rtsp-server is a lightweight, zero-dependency proxy and storage server for several IP-cameras and multiple clients.

Features:

  • Reliable connection of clients in the local network. One connection to each camera, regardless of the number of clients.
  • Minimum client connection latency.
  • Low CPU load.
  • Proxying streams from IP cameras to an unlimited number of clients in the local network, the ability to limit the number of web clients.
  • Ability to save to hard disk, with fragmentation and daily rotation.
  • Restoring of connection with cameras and recording to disk after a possible disconnection of cameras.

Requirements:

Python 3.7+ is required. Optionally uses system-wide utilities for saving streams to file storage, such as ffmpeg, OpenRTSP or mencoder.

Compatible with Linux. Supports H.264, H.265 and H.265+ codecs.

Tested with Hikvision DS-2CD2023 and Rubetek RV-3414 IP-cameras, using VLC as a client. There is a special mobile app for this server on GitHub.

Installation:

Copy config-example.py to private configuration file _config.py and edit _config.py.

Start the server:

python3 main.py

Basic usage

UDP mode:

vlc rtsp://localhost:4554/camera-hash

TCP mode:

vlc --rtsp-tcp rtsp://localhost:4554/camera-hash

Start on boot with systemd

Create the service unit /etc/systemd/system/python-rtsp-server.service:

[Unit]
Description="video monitoring"

[Service]
ExecStart=/usr/bin/python3 /path-to-python-rtsp-server/main.py

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl enable python-rtsp-server
sudo systemctl start python-rtsp-server

Discussion: habr.com/ru/post/597363.

Copyright (c) 2021-2022 vladpen under MIT license. Use it with absolutely no warranty.

python-rtsp-server's People

Contributors

vladpen 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.