diff options
Diffstat (limited to 'roles/streaming/rtmp/streamer')
-rw-r--r-- | roles/streaming/rtmp/streamer/defaults/main.yml | 5 | ||||
-rw-r--r-- | roles/streaming/rtmp/streamer/templates/pod-spec.yml.j2 | 24 |
2 files changed, 28 insertions, 1 deletions
diff --git a/roles/streaming/rtmp/streamer/defaults/main.yml b/roles/streaming/rtmp/streamer/defaults/main.yml index 27b18cbf..fc9f644f 100644 --- a/roles/streaming/rtmp/streamer/defaults/main.yml +++ b/roles/streaming/rtmp/streamer/defaults/main.yml @@ -12,4 +12,9 @@ rtmp_streamer_quality_levels: rtmp_streamer_recording_enabled: no rtmp_streamer_recording_level: full +rtmp_streamer_forwards: {} +# example: +# url: rtmp://ingest.example.com/foo/secret +# level: full + rtmp_streamer_config: {} diff --git a/roles/streaming/rtmp/streamer/templates/pod-spec.yml.j2 b/roles/streaming/rtmp/streamer/templates/pod-spec.yml.j2 index f670fb25..ec51ed14 100644 --- a/roles/streaming/rtmp/streamer/templates/pod-spec.yml.j2 +++ b/roles/streaming/rtmp/streamer/templates/pod-spec.yml.j2 @@ -19,7 +19,7 @@ containers: - name: nginx-lib mountPath: /var/lib/nginx -- name: ffmpeg +- name: source image: registry.gitlab.com/spreadspace/docker/nginx:{{ rtmp_streamer_nginx_image_version }} imagePullPolicy: Always command: @@ -53,6 +53,28 @@ containers: - name: CONFIG_FILENAME value: /srv/config.yml +{% for name, forward in rtmp_streamer_forwards.items() %} +- name: "forward-{{ name }}" + image: registry.gitlab.com/spreadspace/docker/nginx:{{ rtmp_streamer_nginx_image_version }} + imagePullPolicy: Always + command: + - /usr/bin/ffmpeg + args: + - -f + - live_flv + - -rtmp_live + - live + - -i + - "rtmp://127.0.0.1/{{ rtmp_streamer_app_name }}/{{ forward.level }}" + - -c:a + - copy + - -c:v + - copy + - -f + - flv + - "{{ forward.url }}" + +{% endfor %} {% if rtmp_streamer_recording_enabled %} - name: record image: registry.gitlab.com/spreadspace/docker/nginx:{{ rtmp_streamer_nginx_image_version }} |