Web viewer for RTSP streams that relies on ffmpeg.
Project description
Description
Web server that displays an RTSP video stream using ffmpeg as backend.
Use as a Docker container
This section explains how to use this repository with Docker.
-
Build Docker container:
$ TODO
-
Launch Docker container:
$ TODO
Use as a standalone program
This sections explains how to use this repository without Docker, as a standalone Python program.
-
Install dependencies:
$ sudo apt update $ sudo apt install ffmpeg
-
Install
rtspwebviewer-ffmpeg
:$ git clone https://github.com/luiscarlosgph/rtspwebviewer-ffmpeg.git $ cd rtspwebviewer-ffmpeg $ python3 setup.py install
-
Run
ffmpeg
to convert the RTSP stream into HLS:$ ffmpeg -fflags nobuffer -rtsp_transport tcp -i <rtsp_stream_address> -c copy -hls_time 2 -hls_wrap 10 <path_to_m3u8_file>
-
Run the web server:
$ python -m rtspwebviewer_ffmpeg.run --address <listening_ip_address> --port <port> --title <web_title> --password <password> --m3u8 <path_to_m3u8_file>
Options:
--address
: Listening address, use0.0.0.0
to listen in all interfaces (required).--port
: TCP port to listen on (required).--title
: website title (required).--password
: password to append to the URL of the web server to access the web player (optional).---m3u8
: path to them3u8
file generated byffmpeg
in the previous step (required)
-
Access the web viewer:
http://<address>:<port>/<password>
, e.g. for address0.0.0.0
, port11931
, and no password access http://127.0.0.1:11931.
Author
Luis C. Garcia-Peraza Herrera (luiscarlos.gph@gmail.com).
License
This repository is shared under an MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rtspwebviewer_ffmpeg-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4a0a6223c7a8f30dfe38fdcc6d665bb86766faf2bc4694a6d17f07839b8256c |
|
MD5 | 2e6f14b7c43bdcb23db027df8d98c84a |
|
BLAKE2b-256 | 9993ff0b8d04a662e2db187bfcf9d103df471880c34f3dc52b589d5c195630c6 |
Hashes for rtspwebviewer_ffmpeg-0.0.1-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cee581a83aaae9ffcc311db4ae7151d38dc40edf2c98ddc570f0a59d77f8342 |
|
MD5 | e3a24809e85cd7946e49bcb28a0aaffd |
|
BLAKE2b-256 | e1d07add9ef4be51b23a487bb5c40fb259d5121704a1a0f6f6bfab2c1c7f35a9 |