Skip to content

Commit

Permalink
change 1935 port to 19035
Browse files Browse the repository at this point in the history
  • Loading branch information
logan song committed Mar 25, 2020
1 parent 55c9a9c commit 2321dff
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o livego ./

FROM alpine:latest
LABEL maintainer="gwuhaolin <[email protected]>"
ENV RTMP_PORT 1935
ENV RTMP_PORT 19035
ENV HTTP_FLV_PORT 19080
ENV HLS_PORT 7002
ENV HTTP_OPERATION_PORT 8090
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ a pure rtmp proxy server.
直接下载编译好的[二进制文件](https://github.com/gwuhaolin/livego/releases)后,在命令行中执行。

#### 从 Docker 启动
执行`docker run -p 1935:1935 -p 19080:19080 -p 7002:7002 -d --name livego gwuhaolin/livego`启动
执行`docker run -p 19035:19035 -p 19080:19080 -p 7002:7002 -d --name livego gwuhaolin/livego`启动

#### 从源码编译
1. 下载源码 `git clone https://github.com/gwuhaolin/livego.git`
2. 去 livego 目录中 执行 `go build`

## 使用
2. 启动服务:执行 `livego` 二进制文件启动 livego 服务;
3. 上行推流:通过 `RTMP` 协议把视频流推送到 `rtmp:https://localhost:1935/live/movie`,例如使用 `ffmpeg -re -i demo.flv -c copy -f flv rtmp:https://localhost:1935/live/movie` 推送;
3. 上行推流:通过 `RTMP` 协议把视频流推送到 `rtmp:https://localhost:19035/live/movie`,例如使用 `ffmpeg -re -i demo.flv -c copy -f flv rtmp:https://localhost:19035/live/movie` 推送;
4. 下行播放:支持以下三种播放协议,播放地址如下:
- `RTMP`:`rtmp:https://localhost:1935/live/movie`
- `RTMP`:`rtmp:https://localhost:19035/live/movie`
- `FLV`:`https://127.0.0.1:19080/live/movie.flv`
- `HLS`:`https://127.0.0.1:7002/live/movie.m3u8`

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

var (
version = "master"
rtmpAddr = flag.String("rtmp-addr", ":1935", "RTMP server listen address")
rtmpAddr = flag.String("rtmp-addr", ":19035", "RTMP server listen address")
httpFlvAddr = flag.String("httpflv-addr", ":19080", "HTTP-FLV server listen address")
hlsAddr = flag.String("hls-addr", ":7002", "HLS server listen address")
operaAddr = flag.String("manage-addr", ":8090", "HTTP manage interface server listen address")
Expand Down
2 changes: 1 addition & 1 deletion protocol/rtmp/core/conn_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (connClient *ConnClient) Start(url string, method string) error {
connClient.title = ps[1]
connClient.query = u.RawQuery
connClient.tcurl = "rtmp:https://" + u.Host + "/" + connClient.app
port := ":1935"
port := ":19035"
host := u.Host
localIP := ":0"
var remoteIP string
Expand Down

0 comments on commit 2321dff

Please sign in to comment.