Coder Social home page Coder Social logo

rtsptowebrtc's Introduction

RTSP to WebRTC

Embed your Cameras RTSP Stream via WebRTC

This is a clone of the RTSPtoWebRTC Project deepch!

Steps to run this project:

  1. Install Go for LINUX, Windows or macOS

  2. Download /Clone this Repository RTSPtoWebRTC

  3. Enter the folder you downloaded the code into and edit the file ./config.json to add your personal IP camera URLs, e.g.:

}
   "INSTAR_8015_FHD": {
      "on_demand": true,
      "url": "rtsp://admin:[email protected]/11"
   },
    "INSTAR_9020_FHD": {
      "on_demand": true,
      "url": "rtsp://admin:[email protected]/12"
   },
    "INSTAR_IN-7011_HD": {
      "on_demand": true,
      "url": "rtsp://admin:[email protected]/11"
   }
}
  1. Now run the following command to run the application in development mode:
$ go run .

or build and run your application:

$ go build .
$ ./RTSPtoWebRTC

The build command will build the binary release version of your Go application. This file will be called RTSPtoWebRTC - without an extension - on LINUX and can be executed from your command line or through a script (make sure that the file is made executable before running). If you run the command on Windows, you end up with an RTSPtoWebRTC.exe file that you can execute by double-clicking.

  1. Open your Web browser and visit the following URL:
http://127.0.0.1:8888

RTSPtoWebRTC


################ ORIGINAL README #####################


RTSPtoWebRTC

RTSP Stream to WebBrowser over WebRTC based on Pion

full native! not use ffmpeg or gstreamer

if you need RTSPtoWSMP4f use https://github.com/deepch/RTSPtoWSMP4f

Team

Deepch - https://github.com/deepch streaming developer

Dmitry - https://github.com/vdalex25 web developer

Now test work on (chrome, safari, firefox) no MAC OS

RTSPtoWebRTC image

Installation

$ export GO111MODULE=on
$ go get github.com/deepch/RTSPtoWebRTC
$ cd ~/go/src/github.com/deepch/RTSPtoWebRTC
$ go run .

or

$ go build .
$ ./RTSPtoWebRTC
open web browser http://127.0.0.1:8083 work chrome, safari, firefox

Configuration

Edit file config.json

format:

{
  "server": {
    "http_port": ":8083"
  },
  "streams": {
    "demo1": {
      "url": "rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa"
    },
    "demo2": {
      "url": "rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa"
    },
    "demo3": {
      "url": "rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa"
    }
  }
}

Limitations

Video Codecs Supported: H264

Audio Codecs Supported: pcm alaw and pcm mulaw

paypal.me/AndreySemochkin - You can make one-time donations via PayPal. I'll probably buy a coffee tea. 🍡

rtsptowebrtc's People

Contributors

mpolinowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rtsptowebrtc's Issues

How to change ice_servers with credential details in config.json

{
"server": {
"http_port": ":8888",
"ice_servers": ["stun:stun.l.google.com:19302"]
},
"streams": {
"INSTAR_IN-6014_HD": {
"on_demand": true,
"url": "rtsp://admin:[email protected]/11"
},
"INSTAR_8015_FHD": {
"on_demand": true,
"url": "rtsp://admin:[email protected]/11"
},
"INSTAR_9020_FHD": {
"on_demand": true,
"url": "rtsp://admin:[email protected]/12"
},
"INSTAR_IN-7011_HD": {
"on_demand": true,
"url": "rtsp://admin:[email protected]/11"
},
"H264_PCMALAW": {
"on_demand": true,
"url": "rtsp://admin:[email protected]:33556/"
}
}
}

Now, how do I change "ice_servers" with credentials?
For example this is my turn server : {
url: 'turn:numb.viagenie.ca',
credential: 'muazkh',
username: '[email protected]'
}

how to change in config.json

Not working in cloud

This project is working fine in local but when I deployed in the cloud video is not streaming.
see screenshot:-
Screenshot from 2021-08-27 19-35-42
Screenshot from 2021-08-27 19-28-58

please help me!

1617978893974
Excuse me, why can't H264_PCMALAW connect
1617979235676
I tried to join my IP cam (IP_cam), but I can’t connect

thank you!

running on Jetson Xavier NX

hi,

I'm trying to run this from a Jetson Xavier NX.

I'm installing go using apt-get install golang instead of downloading it from the go website

check the go version I received this go version go1.10.4 linux/arm64

calling go run . i received this unfortunately go run: no go files listed

I've tried go run *.go and I received this:

config.go:12:2: cannot find package "github.com/deepch/vdk/av" in any of:
	/usr/lib/go-1.10/src/github.com/deepch/vdk/av (from $GOROOT)
	/home/ubuntu/go/src/github.com/deepch/vdk/av (from $GOPATH)
stream.go:8:2: cannot find package "github.com/deepch/vdk/format/rtspv2" in any of:
	/usr/lib/go-1.10/src/github.com/deepch/vdk/format/rtspv2 (from $GOROOT)
	/home/ubuntu/go/src/github.com/deepch/vdk/format/rtspv2 (from $GOPATH)
http.go:12:2: cannot find package "github.com/deepch/vdk/format/webrtcv3" in any of:
	/usr/lib/go-1.10/src/github.com/deepch/vdk/format/webrtcv3 (from $GOROOT)
	/home/ubuntu/go/src/github.com/deepch/vdk/format/webrtcv3 (from $GOPATH)
http.go:13:2: cannot find package "github.com/gin-gonic/gin" in any of:
	/usr/lib/go-1.10/src/github.com/gin-gonic/gin (from $GOROOT)
	/home/ubuntu/go/src/github.com/gin-gonic/gin (from $GOPATH)

anything that I missed?

Thank you

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.