Sign inSign up

powernic/web-multistreaming

By powernic

•Updated over 3 years ago

Image
0

602

powernic/web-multistreaming repository overview

⁠RTSP Multi-Streamer for WEB (JPG & OGG)

GitHub CI status badge

The goal of this project is to create a Docker-deployed service that will allow you to easily broadcast live video from IP cameras to web pages. This stream rebroadcaster is designed to be used by many sources/users. The service was developed as part of another free parking monitoring project⁠

⁠Usage

version: '3.7' 
services:
  multistreaming:
    image: powernic/web-multistreaming:latest
    ports:
      - 80:80 
    restart: always
    volumes:
      - ./example-config.json:/app/config.json
    environment:
      - TYPE=file
      - CONFIG=/app/config.json
      - MESSENGER_TRANSPORT_DSN=redis://redis:6379/messages
  redis:
    image: redis:latest
    restart: always

Try in PWD

⁠Environment variables

⁠TYPE

Available values:

  • file - load stream list from file
  • rest - load stream list from REST API
  • remote_file - load stream list from remote file
⁠CONFIG

Path to config file. Required if TYPE is file.

⁠API_USERNAME

Username for REST API. Required if TYPE is rest.

⁠API_PASSWORD

Password for REST API. Required if TYPE is rest.

⁠FFSERVER_PORT

Port for FFServer. Default: 80.

⁠MESSENGER_TRANSPORT_DSN

DSN for messenger transport. This is required for getting commands for updating config.

⁠3. Create a configuration file

Create a file named config.json in the root of the project.

The file should contain a JSON object with the following structure:

[
  {
    "id": "stream1",
    "url": "rtsp://..."
  }
] 

Here is an example of the JSON configuration file:

[
  {
    "id": "bunny",
    "url": "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4"
  },
  {
    "id": "bunny-test",
    "url": "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4"
  }
]

Where:

  • id - unique identifier of the stream
  • url - RTSP stream URL

After starting the service, become available to you:

  • Snapshot - http://127.0.0.1/{id}-still.jpg
  • Video stream - http://127.0.0.1/{id}-live.ogg
  • Status Page http://127.0.0.1/status.html

⁠Future work

Goals for future improvements to this project include:

  • Adding more config streams sources (RestAPI with Client Credentials Grant, Authorization Code Grant, etc.)
  • Make it optional to use a messenger transport to receive an event to update the configuration

Pull requests are welcome!

⁠Where to file issues:

Issues can be filed on https://github.com/powernic/web-multistreaming/issues⁠

Tag summary

Content type

Image

Digest

sha256:77f089f81…

Size

54.9 MB

Last updated

over 3 years ago

docker pull powernic/web-multistreaming