Amazon Kinesis Video Streams RTSP demo application shutting down after some time (producer-cpp) using docker

0

Hi team,

I have setup two RTSP cameras on my network and I have followed the RTSP demo application (https://github.com/aws-samples/amazon-kinesis-video-streams-demos/tree/master/producer-cpp/docker-rtsp) that uses docker desktop on Windows to send both streams to Amazon Kinesis Video. I was successfully able to see each video feed on amazon console for each stream. However after I left the sample to run for some time. After some time the process shuts down and the stream is stopped. I can see some warnings before the error "Error received from element source: Could not read from resource." is thrown. Seems the first warning that is thrown is " curlCompleteSync(): curl perform failed for url https://xxxxxxxxxxxxxx.us-west-2.amazonaws.com/putMedia with result Failure when receiving data from the peer: OpenSSL SSL_read: Connection reset by peer, errno 104".

I have seen some suggestions on threads on this site which suggested to turn down the camera stream "Frame Size", "Max Bit Rate", "Target Quality" and finally "Intra Frame Period". When I was running at ("Frame Size" = "1920 1080") sometimes it would stop stream after about 20-30 mins. But since I have turned it down to ("Frame Size" = "640 360", "Target Quality" = "Medium", "Max Bit Rate" = "1 MBps" and "Intra Frame Period" = "1s") and it actually ran for about 2.5 hours before shutting down with the same issue. Not sure if this is related by I figured I should share it.

I have blacked out all the keys and credentials and attached two screen shots to this message. They contain all the warnings and the error that is thrown before the process is shut down. We plan to use architecture for a client and we will be adding many more cameras to the network.

Can you please guide me to what can be causing this issue and ways to improve this so the process does not shut down. Right now I'm not sure if this could be related to network, security camera or the code. Also please let me know if you need anything else.

Thanks for your time

Enter image description here

Enter image description here

asked a year ago616 views
1 Answer
0

I have a member of my team having this problem before,the possible reasons are

  • Network connectivity: Make sure that the machine running the RTSP producer has a stable and reliable network connection.
  • RTSP camera configuration: Check the settings on the RTSP cameras and make sure they are configured correctly. In particular, try reducing the frame size, bit rate, and target quality to see if this helps improve the stability of the stream.
  • RTSP producer configuration: Make sure that the RTSP producer is configured correctly. In particular, try increasing the retry count and retry interval to see if this helps improve the stability of the stream.
  • AWS Region: Make sure that you are using the correct AWS Region for the Amazon Kinesis Video Streams service.

The exact reason will need some divide and conquering by you @seekris

SeanSi
answered a year ago
  • Hi Sean,

    Thank you for your response.

    Here where I have got so far

    1. There is no issue with network
    2. As mentioned in my post above I have tried to turn down bitsize, bitrate and target quility and I noticed some improvement. The process ran for longer but still ran into same issue after some time.
    3. The region I have always used for my POC has always been the same which is US West (Oregon). I have not had any issues

    The one thing I think could maybe solve my problem is your third suggestion with configuration of the RTSP producer. The issue here is that the way we set the docker up is we execute the command to create a container from an image than start and run it. I cannot access any of the code to be able to change any configuration on it. Can you maybe elaborate more on this? Like how would I configure the RTSP producer to increase the retry count and interval using the docker method from here (https://github.com/aws-samples/amazon-kinesis-video-streams-demos/tree/master/producer-cpp/docker-rtsp)

    These are the steps I have followed to get the sample running

    1.Downloaded the docker file on machine on my network 2. Ran the command "docker build -t rtspdockertest ." on windows command prompt 3. Ran the command "docker run -it <IMAGE_ID> /bin/bash" on windows command prompt 4. Ran the command "AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> ./kvs_gstreamer_sample <STREAM_NAME> <RTSP_URL>" on windows command prompt

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions