camweb

package module
v0.0.0-...-6ac889d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 20 Imported by: 0

README

camweb

Connect to RTSP cameras from your browser!

Great for security or baby monitors.

Installation

  1. Install Go on path
  2. Clone repo
  3. Run go build
  4. Add a config.json to add cameras (see config_sample.json)

Credit

Originally forked from https://github.com/deepch/RTSPtoWebRTC

Changes from upstream:

  • Uses a websocket and trickle ICE, avoids STUN servers
  • More resilient to packet loss using NACK responses

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCodecs

func RegisterCodecs(m *webrtc.MediaEngine) error

RegisterCodecs forces PCMA audio, the rest is default

func ServeHTTP

func ServeHTTP()

func ServeStreams

func ServeStreams()

Types

type Config

type Config struct {
	sync.RWMutex
	Server  ServerSettings            `json:"server"`
	Streams map[string]StreamSettings `json:"streams"`
}

type ServerSettings

type ServerSettings struct {
	HTTPPort string `json:"http_port"`
}

type StreamSettings

type StreamSettings struct {
	URL    string `json:"url"`
	Status bool   `json:"status"`
	Codecs []av.CodecData

	VideoTrack *webrtc.TrackLocalStaticSample
	AudioTrack *webrtc.TrackLocalStaticSample
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL