1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:15 +02:00

update rtmp

This commit is contained in:
kev 2016-02-26 17:00:00 +08:00
parent 0c11b77a9d
commit 06bf8fa1af
3 changed files with 8 additions and 4 deletions

View File

@ -41,7 +41,6 @@ client:
devices: devices:
- /dev/video0:/dev/video0 - /dev/video0:/dev/video0
environment: environment:
- RTMP_RATE=10
- RTMP_URI=rtmp://datageek.info/live/webcam - RTMP_URI=rtmp://datageek.info/live/webcam
restart: always restart: always
``` ```

View File

@ -9,4 +9,8 @@ RUN set -xe \
&& apk add -U ffmpeg \ && apk add -U ffmpeg \
&& rm -rf /var/cache/apk/* && 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

View File

@ -3,6 +3,7 @@ client:
devices: devices:
- /dev/video0:/dev/video0 - /dev/video0:/dev/video0
environment: environment:
- RTMP_RATE=10 # - RTMP_DEV=rtsp://192.168.42.1/live
- RTMP_URI=rtmp://boss.datageek.info/live/webcam - RTMP_URI=rtmp://cctv.datageek.info/live/webcam
# net: host
restart: always restart: always