'Kinesis Video Streaming - Streaming is not Working

I am facing a problem with Kinesis Video Streaming. When I open the RTSP link on VLC it works, but it takes a lot of time to load the video.

I have created a script for this specific camera, the streaming was created but I had no video on kinesis preview.

Anyone already faced this once and solved this problem?

The gstreamer call is shown below.

gst-launch-1.0 -v rtspsrc location=rtsp://user:password@mydns:554/channel=4&stream=0 short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=MY_STREAMING_NAME storage-size=128 aws-region=us-east-1 retention-period=168

Has anyone already faced it?

A piece of the logs is located below:

May 11 01:31:34 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] WARN - continuousRetryStreamErrorReportHandler(): Reporting stream error. Errored timecode: 72690000 Status: 0x52000062 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000100, Next state: 0x0000000000000200 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000200, Next state: 0x0000000000000001 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] DEBUG - fragmentAckReceivedHandler invoked May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] WARN - getStreamData(): Indicating an end-of-stream for a terminated stream upload handle 1567 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] INFO - postReadCallback(): Reported end-of-stream for stream BHCAM-08. Upload handle: 1567 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] DEBUG - postReadCallback(): Wrote 0 bytes to Kinesis Video. Upload stream handle: 1567 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] DEBUG - putStreamCurlHandler(): Network thread for Kinesis Video stream: BHCAM-08 with upload handle: 1567 exited. http status: 200 May 11 01:31:35 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:34 [139656079333120] /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:manager/GstRtpSession:rtpsession1: stats = application/x-rtp-session-stats, rtx-drop-c> May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: INFO - writeHeaderCallback(): RequestId: 4b39c636-f824-47de-89e7-68f14fefbd9f May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:35 [139656463599360] DEBUG - describeStreamCurlHandler(): DescribeStream API response: {"StreamInfo":{"CreationTime":1.652229202347E9,"DataRetentionInHours":168> May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:35 [139656463599360] INFO - describeStreamResultEvent(): Describe stream result event. May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:35 [139656463599360] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000020 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:35 [139656463599360] DEBUG - Dropping frame with flag: 1536 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:35 [139656445880064] INFO - writeHeaderCallback(): RequestId: 112c29f1-322b-4e1f-8201-7566df47dc8f May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - getStreamingEndpointCurlHandler(): GetStreamingEndpoint API response: {"DataEndpoint":"https://s-d022f287.kinesisvideo.us-east-1.am> May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] INFO - getStreamingEndpointResultEvent(): Get streaming endpoint result event. May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000020, Next state: 0x0000000000000010 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - getStreamingTokenHandler invoked May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - Refreshing credentials. Force refreshing: 1 Now time is: 1652232696256849291 Expiration: 18446744073709551615 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] INFO - getStreamingTokenResultEvent(): Get streaming token result event. May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000010, Next state: 0x0000000000000040 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - streamReadyHandler invoked May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000040, Next state: 0x0000000000000080 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] INFO - putStreamResultEvent(): Put stream result event. New upload handle 1568 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000080, Next state: 0x0000000000000100 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656096118528] INFO - writeHeaderCallback(): RequestId: fc36a71f-8d6f-38b9-a6c3-b3272d810a72 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656463599360] DEBUG - postReadCallback(): Wrote 346 bytes to Kinesis Video. Upload stream handle: 1568 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656463599360] DEBUG - Dropping frame with flag: 1536 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:36 [139656445880064] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 1568 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: BHCAM-08 and upload handle: 1568 returned: {"EventType":> May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] DEBUG - streamErrorHandler invoked May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] ERROR - Reported stream error. Errored timecode: 72690000 Status: 0x52000062 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] WARN - continuousRetryStreamErrorReportHandler(): Reporting stream error. Errored timecode: 72690000 Status: 0x52000062 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000100, Next state: 0x0000000000000200 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000200, Next state: 0x0000000000000001 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] DEBUG - stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002 May 11 01:31:37 ip-172-31-0-254 BHCAM-08_sync.sh[3644655]: 2022-05-11 01:31:37 [139656463599360] DEBUG - fragmentAckReceivedHandler invoked

I appreciate your help. Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source