Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- changed to self-contained dockers. Just run docker-compose up #2

Open
wants to merge 2 commits into
base: streaming_poc
Choose a base branch
from
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
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
TEMPLATE_NAME ?= janus

run: image
@docker run -it -p 8188:8188 -p 8189:8189 -p 6000:6000/udp -p 6001:6001/udp -p 6002:6002/udp $(TEMPLATE_NAME)

shell: image
@docker run -it -p 8188:8188 -p 8189:8189 -p 6000:6000/udp -p 6001:6001/udp -p 6002:6002/udp $(TEMPLATE_NAME) /bin/bash

image:
@docker build -t $(TEMPLATE_NAME) .
run-demo:
docker-compose up
@echo "open brower at http://localhost:8000 port"
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ Run up a [janus-gateway](https://github.com/meetecho/janus-gateway) instance usi

## Streaming test

1. Install docker and GStreamer 1.0.
1. install docker-compose
2. run `docker-compose up`
3. open browser at http://localhost:8000

2. Build this image with `make image`

3. Run the Janus server with `make run`. This will forward some ports: 8088/tcp (HTTP), 8188/tcp (WebSocket), 6000/udp (RTP)

4. Run `./gst_test.sh` to start sending RTP to Janus.

5. Start an HTTP server in `webapps/` and browse to the index. You should see a test pattern.
you should see a test pattern
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.1'
services:
webapp:
image: python:3.9
ports:
- "8000:8000"
command: python3 -m http.server --directory=/webapp
volumes:
- ./webapp:/webapp
janus:
build: .
ports:
- "8188:8188"
- "8189:8189"
- "6000-6002:6000-6002/udp"
videosrc:
build: gst_test
11 changes: 11 additions & 0 deletions gst_test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:20.04

RUN apt-get update -y && \
apt-get install -y gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-plugins-rtp \
gstreamer1.0-tools && \
apt-get clean -y


ADD run.sh /run.sh

CMD /run.sh
2 changes: 1 addition & 1 deletion gst_test.sh → gst_test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ gst-launch-1.0 -v videotestsrc is-live=true \
! queue \
! vp8enc deadline=33333 cpu-used=16 target-bitrate=$BITRATE keyframe-max-dist=90 max-quantizer=24 \
! rtpvp8pay \
! udpsink host=127.0.0.1 port=6000 sync=false qos=true
! udpsink host=janus port=6000 sync=false qos=true