From 3c73440c56a64771279a83a7e458044b42b07b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Moln=C3=A1r?= <130485234+david-molnar-oculai@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:23:51 +0100 Subject: [PATCH] Handle SIGSEGV by restarting streaming process (#33) * Disable gstreamer fault handler and let streaming process to die * Restart streaming process on failure --- docker-compose.yml | 1 + start_stream.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ecbabba..23f7dc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,4 +14,5 @@ services: GST_PLUGIN_PATH: /opt/app/amazon-kinesis-video-streams-producer-sdk-cpp/build no_proxy: $DEVICE_IP command: /bin/sh "start_stream.sh" + restart: 'unless-stopped' diff --git a/start_stream.sh b/start_stream.sh index 7379dd0..73d0410 100644 --- a/start_stream.sh +++ b/start_stream.sh @@ -1,4 +1,4 @@ #!/bin/bash -gst-launch-1.0 rtspsrc \ +gst-launch-1.0 --no-fault rtspsrc \ location="rtsp://$DEVICE_USERNAME:$DEVICE_PASSWORD@$DEVICE_IP/axis-media/media.amp" short-header=TRUE ! rtph264depay ! h264parse ! video/x-h264 !kvssink stream-name="$AWS_KINESIS_STREAM_NAME" storage-size=512 \ aws-region="$AWS_REGION"