Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ The configuration file is in /opt/nginx/conf/

To run the container and bind the port 1935 to the host machine; run the following:
```
docker run -p 1935:1935 -p 8080:8080 jasonrivers/nginx-rtmp
docker run -d -p 1935:1935 -p 8080:8080 jasonrivers/nginx-rtmp
```
The option -d means that docker will run in the background.

### Multiple Streams:
You can enable multiple streams on the container by setting RTMP_STREAM_NAMES when launching, This is a comma seperated list of names, E.G.
Expand All @@ -40,6 +41,18 @@ docker run \
jasonrivers/nginx-rtmp
```

### Run the container automatically

```
docker run \
-p 1935:1935 \
-p 8080:8080 \
--restart=always \
-e RTMP_STREAM_NAMES=live,teststream1,teststream2 \
jasonrivers/nginx-rtmp
```
The option --restart=always will let the container run automatically when Docker starts.

## OBS Configuration
Under broadcast settigns, set the follwing parameters:
```
Expand Down
4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ cat >>${NGINX_CONFIG_FILE} <<!EOF
hls_fragment 1;
hls_playlist_length 20;
!EOF
HLS="false"
## HLS="false"
fi
if [ "$PUSH" = "true" ]; then
for PUSH_URL in $(echo ${RTMP_PUSH_URLS}); do
echo "Pushing stream to ${PUSH_URL}"
cat >>${NGINX_CONFIG_FILE} <<!EOF
push ${PUSH_URL};
!EOF
PUSH=false
## PUSH=false
done
fi
cat >>${NGINX_CONFIG_FILE} <<!EOF
Expand Down