From 06bf8fa1affe225cc3356b9700c3491e06758900 Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 26 Feb 2016 17:00:00 +0800 Subject: [PATCH] update rtmp --- rtmp/README.md | 1 - rtmp/client/Dockerfile | 6 +++++- rtmp/client/docker-compose.yml | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rtmp/README.md b/rtmp/README.md index 98149bb..f69cc23 100644 --- a/rtmp/README.md +++ b/rtmp/README.md @@ -41,7 +41,6 @@ client: devices: - /dev/video0:/dev/video0 environment: - - RTMP_RATE=10 - RTMP_URI=rtmp://datageek.info/live/webcam restart: always ``` diff --git a/rtmp/client/Dockerfile b/rtmp/client/Dockerfile index c0845cd..c5d9d11 100644 --- a/rtmp/client/Dockerfile +++ b/rtmp/client/Dockerfile @@ -9,4 +9,8 @@ RUN set -xe \ && apk add -U ffmpeg \ && rm -rf /var/cache/apk/* -CMD ffmpeg -f video4linux2 -r ${RTMP_RATE:-24} -i /dev/video0 -f flv ${RTMP_URI} +ENV RTMP_DEV=/dev/video0 \ + RTMP_FMT=flv \ + RTMP_URI= + +CMD ffmpeg -i $RTMP_DEV -f $RTMP_FMT $RTMP_URI diff --git a/rtmp/client/docker-compose.yml b/rtmp/client/docker-compose.yml index e68084c..8c55ec9 100644 --- a/rtmp/client/docker-compose.yml +++ b/rtmp/client/docker-compose.yml @@ -3,6 +3,7 @@ client: devices: - /dev/video0:/dev/video0 environment: - - RTMP_RATE=10 - - RTMP_URI=rtmp://boss.datageek.info/live/webcam +# - RTMP_DEV=rtsp://192.168.42.1/live + - RTMP_URI=rtmp://cctv.datageek.info/live/webcam +# net: host restart: always