rts2p
所属分类:流媒体/Mpeg4/MP4
开发工具:GO
文件大小:17KB
下载次数:0
上传日期:2020-07-21 20:27:49
上 传 者:
sh-1993
说明: RTSP代理服务器
(RTSP Proxy Server)
文件列表:
.dockerignore (45, 2020-07-22)
Dockerfile (1952, 2020-07-22)
Makefile (43, 2020-07-22)
config.go (814, 2020-07-22)
docker-build.sh (580, 2020-07-22)
example.yaml (142, 2020-07-22)
go.mod (674, 2020-07-22)
go.sum (17474, 2020-07-22)
livemedia (0, 2020-07-22)
livemedia\livemedia.cc (1832, 2020-07-22)
livemedia\livemedia.go (2958, 2020-07-22)
livemedia\livemedia.go.h (613, 2020-07-22)
rts2p.go (3476, 2020-07-22)
server.go (3145, 2020-07-22)
## RTS2P - RTSP Stream Proxy
This is a simple RTSP stream proxy based off of the live 555 library. http://www.live555.com/liveMedia/
I needed something simple to proxy IP Camera feeds that's easy to use and supports docker.
This is another foray for me into learning how to use CGO and wrap C++ libraries.
## Config
The config is very simple, by default the docker image looks for a config file `/opt/rts2p/rts2p.yaml` but the
config library supports yaml, toml or json. You can specify `-c` to the config file you want.
Every config option is shown:
```
server:
port: 5554
max_out_packet_size: 2000000
username: myusername
password: mypassword
http_port: 8080
streams:
- url: "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
name: "mytestfeed"
username: feedusername
password: feedpassword
verbosity: 0
still: "https://raw.githubusercontent.com/libgit2/libgit2sharp/master/square-logo.png"
```
This would create the feed `rtsp://server:5554/mytestfeed` and require a login of `myusername` with password `mypassword`
Omit the username and password fields if you do not want to require a login.
## Still image serving
If you include server.http_port it will also serve still images on an http server with the same credentials (using basic auth)
from the RTSP stream.
You can proxy a still image url by putting an http url into the still parameter.
You can also capture from the proxied RTSP stream and serve frames from the video using a couple options
* stream - This will start a streaming client and serve frames
* once - This will create a client and capture a single frame and shutdown the client
* false - do not serve frames for this stream
The stream options can use a decent amount of CPU but they will serve frames very fast as it's continuously decoding frames
The once option shuts down the client in between but will take a while to start and serve a frame on the next invocation
If you do not specify the still option, it defaults to `stream` if you have `server.http_port` listed.
## Docker
Example docker command: `docker run -it -p 5554:5554 -v /my/config.yaml:/opt/rts2p/rts2p.yaml snowzach/rts2p:latest`
近期下载者:
相关文件:
收藏者: