AWS Kvs webrtc RTSP stream Block state

Hello Team,

i am currently using amazon-kinesis-video-streams-webrtc-sdk-c to stream my local video over cloud from my jetson orin nano.

i downloaded the source and made some changes in the kvsWebrtcClientMasterGstSample.c file which is located in samples dir.

I added a resolution in the GStreamer pipeline and changed the bitrate to min and max bitrate.
by this setting when the client is connecting with the master it shows an error, it opens a stream in blocking mode, attaching the log file for better reference. The same code works fine in my Ubuntu 20.04 machine and can stream successfully. How to overcome this issue.
log.txt (9.9 KB)

Here are my changes in the RTSP Source Case :

                case RTSP_SOURCE: {
                    UINT16 stringOutcome = snprintf(rtspPipeLineBuffer, RTSP_PIPELINE_MAX_CHAR_COUNT,
                                                    "uridecodebin source::latency=0 uri=%s ! "
                                                    "nvvideoconvert ! "
                                                    "videoconvert ! "
                                                    "videoscale ! video/x-raw,width=256,height=144 ! "
                                                    "x264enc bframes=0 speed-preset=veryfast bitrate=100 byte-stream=TRUE tune=zerolatency ! "
                                                    "video/x-h264,stream-format=byte-stream,alignment=au,profile=baseline ! queue ! "
                                                    "vbv-maxrate=2048 vbv-buf-capacity=1000 bitrate-tolerance=100 ! "
                                                    "appsink sync=TRUE emit-signals=TRUE name=appsink-video "
                                                    "src. ! audioconvert ! "
                                                    "audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! "
                                                    "appsink sync=TRUE emit-signals=TRUE name=appsink-audio",
                                                    pSampleConfiguration->rtspUri);

                    if (stringOutcome > RTSP_PIPELINE_MAX_CHAR_COUNT) {
                        printf("[KVS GStreamer Master] ERROR: rtsp uri entered exceeds maximum allowed length set by RTSP_PIPELINE_MAX_CHAR_COUNT\n");
                        goto CleanUp;
                    }
                    pipeline = gst_parse_launch(rtspPipeLineBuffer, &error);

                    break;
                }
            }
            break;```

Hi,
We would suggest check the gstreamer pipeline in gst-launch-1.0 + fakesink. To confirm it can be launched successfully in gst-launch-1.0 command. And then apply to the code by replacing fakesink with appsink.

Hi @DaneLLL

Thank you for the quick response.

i have changed the gstreamer pipeline to fakesink, still, when the client connects with the master it opens a stream in blocking mode, and I am attaching a log file for better reference.
log.txt (9.4 KB)

                case RTSP_SOURCE: {
                                    UINT16 stringOutcome = snprintf(rtspPipeLineBuffer, RTSP_PIPELINE_MAX_CHAR_COUNT,
                                    "uridecodebin source::latency=0 uri=%s ! "
                                    "nvvideoconvert ! "
                                    "videoconvert ! "
                                    "videoscale ! video/x-raw,width=256,height=144 ! "
                                    "x264enc bframes=0 speed-preset=veryfast bitrate=100 byte-stream=TRUE tune=zerolatency ! "
                                    "video/x-h264,stream-format=byte-stream,alignment=au,profile=baseline ! queue ! "
                                    "vbv-maxrate=2048 vbv-buf-capacity=1000 bitrate-tolerance=100 ! "
                                    "fakesink sync=TRUE "
                                    "src. ! audioconvert ! "
                                    "audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! queue ! "
                                    "fakesink sync=TRUE ",
                                    pSampleConfiguration->rtspUri);

    if (stringOutcome > RTSP_PIPELINE_MAX_CHAR_COUNT) {
        printf("[KVS GStreamer Master] ERROR: rtsp uri entered exceeds maximum allowed length set by RTSP_PIPELINE_MAX_CHAR_COUNT\n");
        goto CleanUp;
    }
    pipeline = gst_parse_launch(rtspPipeLineBuffer, &error);

    break;
}
            }
            break;
    }


Hi Team ,
I am waiting for the response as this issue is still present after changing the pipeline to fake sink suggested by the DaneLLL, is this related to deepstream or the pipeline?

Thanks & Regards,
Parth

Hi,
We would suggest break down the pipeline in gst-launch-1.0 command. To clarify which plugin triggers the error and then investigate why.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.