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
Hi Sean,
Thank you for your response.
Here where I have got so far
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