Skip to main content

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.

  1. Build Docker container:

    $ TODO
    
  2. Launch Docker container:

    $ TODO
    

Use as a standalone program

This sections explains how to use this repository without Docker, as a standalone Python program.

  1. Install dependencies:

    $ sudo apt update
    $ sudo apt install ffmpeg
    
  2. Install rtspwebviewer-ffmpeg:

    $ git clone https://github.com/luiscarlosgph/rtspwebviewer-ffmpeg.git
    $ cd rtspwebviewer-ffmpeg
    $ python3 setup.py install
    
  3. 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>
    
  4. 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, use 0.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 the m3u8 file generated by ffmpeg in the previous step (required)
  5. Access the web viewer: http://<address>:<port>/<password>, e.g. for address 0.0.0.0, port 11931, 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtspwebviewer_ffmpeg-0.0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

rtspwebviewer_ffmpeg-0.0.1-py3.9.egg (6.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page