-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
68 lines (62 loc) · 2.26 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# docker run --name=rtsp-server --env=RTSP_PROTOCOLS=tcp -p 1935:1935 -p 8554:8554 -p 8888:8888 --restart=always --detach=true aler9/rtsp-simple-server
# docker run --name=ffmpeg --volume=/home/ivan/testsrc.mpg:/testsrc.mpg --link rtsp-server --restart=always --detach=true jrottenberg/
# ffmpeg -re -stream_loop -1 -i /testsrc.mpg -c copy -f rtsp rtsp://rtsp-server:8554/mystream
version: "3.3"
services:
rtsp-server:
restart: unless-stopped
ports:
- "1935:1935"
- "8554:8554"
- "8888:8888"
environment:
- RTSP_PROTOCOLS=tcp
image: bluenviron/mediamtx
# webcam:
# restart: unless-stopped
# image: linuxserver/ffmpeg:version-4.4-cli
# devices:
# - /dev/video0:/dev/video0
# links:
# - "rtsp-server:rtsp-server"
# depends_on:
# - rtsp-server
# command: -f v4l2 -framerate 30 -video_size 1280x720 -i /dev/video0 -f rtsp rtsp://rtsp-server:8554/webcam
city-traffic:
restart: unless-stopped
image: linuxserver/ffmpeg:version-4.4-cli
links:
- "rtsp-server:rtsp-server"
depends_on:
- rtsp-server
command: -re -stream_loop -1 -i https://eu-central-1.linodeobjects.com/savant-data/demo/Free_City_Street_Footage.mp4 -c copy -bsf:v h264_mp4toannexb -f rtsp rtsp://rtsp-server:8554/city-traffic
local-loop:
restart: unless-stopped
image: linuxserver/ffmpeg:version-4.4-cli
links:
- "rtsp-server:rtsp-server"
depends_on:
- rtsp-server
volumes:
- ./samples/input_files/:/tmp/
command: -re -stream_loop -1 -i /tmp/testsrc_01.mpg -c copy -f rtsp rtsp://rtsp-server:8554/local-loop
prepare-input-files:
image: python:slim-bullseye
working_dir: /app
volumes:
- ./samples/input_files/:/tmp/
- ./scripts/list_input_files.py:/app/list_input_files.py
command: python list_input_files.py /tmp/
concatenated-sample:
image: linuxserver/ffmpeg:version-4.4-cli
restart: unless-stopped
links:
- "rtsp-server:rtsp-server"
depends_on:
prepare-input-files:
condition: service_completed_successfully
rtsp-server:
condition: service_started
volumes:
- ./samples/input_files/:/tmp/
command: -re -f concat -i /tmp/concat.txt -c copy -f rtsp rtsp://rtsp-server:8554/concatenated-sample