awslabs / amazon-kinesis-video-streams-producer-sdk-cpp

Amazon Kinesis Video Streams Producer SDK for C++ is for developers to install and customize for their connected camera and other devices to securely stream video, audio, and time-encoded data to Kinesis Video Streams.
Apache License 2.0
379 stars 334 forks source link

[BUG] kvssink doesn't send video data when used together with interpipe element #756

Closed JuanPabloMF closed 3 years ago

JuanPabloMF commented 3 years ago

Describe the bug A working pipeline with kvssink doesn't work when split into two with gst-interpipe.

To Reproduce

I'm running my code inside a docker image that has gstreamer, gst-interpipe and the kinesis video stream producer sdk (kvssink element) installed, on a jetson nano with a raspberry pi CSI camera.

This pipeline works fine:

gst-launch-1.0 nvarguscamerasrc wbmode=4 aelock=true timeout=600 ! "video/x-raw(memory:NVMM), width=(int)3264, height=(int)1848, framerate=(fraction)8/1" ! queue ! decodebin ! nvvidconv left=0 right=2672 top=140 bottom=1624 flip-method=2 ! "video/x-raw(memory:NVMM), width=2672, height=1484, pixel-aspect-ratio=1/1" ! nvv4l2h264enc bitrate=1500000 ! "video/x-h264, stream-format=(string)byte-stream" ! h264parse ! kvssink stream-name="JetsonNanoStream" storage-size=512 access-key="XXXXXXXXXXXXXX" secret-key="XXXXXXXXXXXXXX" aws-region="us-east-1"

But when trying to:

gst-launch-1.0 nvarguscamerasrc wbmode=4 aelock=true timeout=600 ! "video/x-raw(memory:NVMM), width=(int)3264, height=(int)1848, framerate=(fraction)8/1" ! queue ! decodebin ! nvvidconv left=0 right=2672 top=140 bottom=1624 flip-method=2 ! "video/x-raw(memory:NVMM), width=2672, height=1484, pixel-aspect-ratio=1/1" ! nvv4l2h264enc bitrate=1500000 ! "video/x-h264, stream-format=(string)byte-stream" ! interpipesink name=src_1 caps=video/x-raw sync=true async=false &

gst-launch-1.0 interpipesrc name=interpipesrc listen-to=src_1 is-live=true allow-renegotiation=true stream-sync=compensate-ts ! queue ! h264parse ! kvssink stream-name="JetsonNanoStream" storage-size=512 access-key="XXXXXXXXXXXXXX" secret-key="XXXXXXXXXXXXXX" aws-region="us-east-1"

No video data is sent to Kinesis video stream

Expected behavior I expect that the interpipe version of my pipeline work as fine sending video data as the pipeline that doesn't have the interpipe element.

Logging This is the log I get when using interpipe:

Setting pipeline to PAUSED ...
[INFO ] [15-09-2021 15:17:13:424.128 GMT] createKinesisVideoClient(): Creating Kinesis Video Client
[INFO ] [15-09-2021 15:17:13:424.304 GMT] heapInitialize(): Initializing native heap with limit size 536870912, spill ratio 0% and flags 0x00000001
[INFO ] [15-09-2021 15:17:13:424.355 GMT] heapInitialize(): Creating AIV heap.
[INFO ] [15-09-2021 15:17:13:424.452 GMT] heapInitialize(): Heap is initialized OK
[DEBUG] [15-09-2021 15:17:13:424.664 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002
[DEBUG] [15-09-2021 15:17:13:424.743 GMT] getSecurityTokenHandler invoked
[DEBUG] [15-09-2021 15:17:13:424.794 GMT] Refreshing credentials. Force refreshing: 0 Now time is: 1631719033424785146 Expiration: 0
[DEBUG] [15-09-2021 15:17:13:424.848 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000010
[INFO ] [15-09-2021 15:17:13:424.886 GMT] createDeviceResultEvent(): Create device result event.
[DEBUG] [15-09-2021 15:17:13:424.931 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000010, Next state: 0x0000000000000040
[DEBUG] [15-09-2021 15:17:13:424.969 GMT] clientReadyHandler invoked
[INFO ] [15-09-2021 15:17:13:425.087 GMT] try creating stream
[INFO ] [15-09-2021 15:17:13:425.166 GMT] Creating Kinesis Video Stream JpJetsonNanoStream
[INFO ] [15-09-2021 15:17:13:425.216 GMT] createKinesisVideoStream(): Creating Kinesis Video Stream.
[DEBUG] [15-09-2021 15:17:13:425.259 GMT] logStreamInfo(): Kinesis Video Stream Info
[DEBUG] [15-09-2021 15:17:13:425.298 GMT] logStreamInfo():  Stream name: JpJetsonNanoStream 
[DEBUG] [15-09-2021 15:17:13:425.337 GMT] logStreamInfo():  Streaming type: STREAMING_TYPE_REALTIME 
[DEBUG] [15-09-2021 15:17:13:425.373 GMT] logStreamInfo():  Content type: video/h264 
[DEBUG] [15-09-2021 15:17:13:425.409 GMT] logStreamInfo():  Max latency (100ns): 600000000
[DEBUG] [15-09-2021 15:17:13:425.446 GMT] logStreamInfo():  Fragment duration (100ns): 20000000
[DEBUG] [15-09-2021 15:17:13:425.481 GMT] logStreamInfo():  Key frame fragmentation: Yes
[DEBUG] [15-09-2021 15:17:13:425.518 GMT] logStreamInfo():  Use frame timecode: Yes
[DEBUG] [15-09-2021 15:17:13:425.555 GMT] logStreamInfo():  Absolute frame timecode: Yes
[DEBUG] [15-09-2021 15:17:13:425.592 GMT] logStreamInfo():  Nal adaptation flags: 0
[DEBUG] [15-09-2021 15:17:13:425.628 GMT] logStreamInfo():  Average bandwith (bps): 4194304
[DEBUG] [15-09-2021 15:17:13:425.664 GMT] logStreamInfo():  Framerate: 25
[DEBUG] [15-09-2021 15:17:13:425.701 GMT] logStreamInfo():  Buffer duration (100ns): 1200000000
[DEBUG] [15-09-2021 15:17:13:425.736 GMT] logStreamInfo():  Replay duration (100ns): 400000000
[DEBUG] [15-09-2021 15:17:13:425.773 GMT] logStreamInfo():  Connection Staleness duration (100ns): 600000000
[DEBUG] [15-09-2021 15:17:13:425.811 GMT] logStreamInfo():  Store Pressure Policy: 1
[DEBUG] [15-09-2021 15:17:13:425.842 GMT] logStreamInfo():  View Overflow Policy: 1
[DEBUG] [15-09-2021 15:17:13:425.879 GMT] logStreamInfo():  Segment UUID: NULL
[DEBUG] [15-09-2021 15:17:13:425.915 GMT] logStreamInfo():  Frame ordering mode: 0
[DEBUG] [15-09-2021 15:17:13:425.945 GMT] logStreamInfo(): Track list
[DEBUG] [15-09-2021 15:17:13:425.972 GMT] logStreamInfo():  Track id: 1
[DEBUG] [15-09-2021 15:17:13:426.002 GMT] logStreamInfo():  Track name: kinesis_video
[DEBUG] [15-09-2021 15:17:13:426.039 GMT] logStreamInfo():  Codec id: V_MPEG4/ISO/AVC
[DEBUG] [15-09-2021 15:17:13:426.075 GMT] logStreamInfo():  Track type: TRACK_INFO_TYPE_VIDEO
[DEBUG] [15-09-2021 15:17:13:426.111 GMT] logStreamInfo():  Track cpd: NULL
[DEBUG] [15-09-2021 15:17:13:426.220 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002
[INFO ] [15-09-2021 15:17:14:122.231 GMT] writeHeaderCallback(): RequestId: 77286d92-4e15-4d4d-9fb6-05054dc6cd33
[DEBUG] [15-09-2021 15:17:14:124.227 GMT] describeStreamCurlHandler(): DescribeStream API response: {"StreamInfo":{"CreationTime":1.62992430927E9,"DataRetentionInHours":24,"DeviceName":null,"IngestionConfiguration":null,"KmsKeyId":"arn:aws:kms:us-east-1:889174357220:alias/aws/kinesisvideo","MediaType":null,"Status":"ACTIVE","StreamARN":"arn:aws:kinesisvideo:us-east-1:889174357220:stream/JpJetsonNanoStream/1629924309270","StreamName":"JpJetsonNanoStream","Version":"qz2oUXoWJG3ijNYKEs0Q"}}
[INFO ] [15-09-2021 15:17:14:134.595 GMT] describeStreamResultEvent(): Describe stream result event.
[WARN ] [15-09-2021 15:17:14:135.170 GMT] describeStreamResult(): Retention period returned from the DescribeStream call doesn't match the one specified in the StreamInfo
[WARN ] [15-09-2021 15:17:14:135.239 GMT] describeStreamResult(): Content type returned from the DescribeStream call doesn't match the one specified in the StreamInfo
[DEBUG] [15-09-2021 15:17:14:135.303 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000020
[INFO ] [15-09-2021 15:17:14:959.535 GMT] writeHeaderCallback(): RequestId: b1eaf1fb-0193-433d-b6a3-63c83b61c74b
[DEBUG] [15-09-2021 15:17:14:970.829 GMT] getStreamingEndpointCurlHandler(): GetStreamingEndpoint API response: {"DataEndpoint":"https://s-a7395519.kinesisvideo.us-east-1.amazonaws.com"}
[INFO ] [15-09-2021 15:17:14:976.152 GMT] getStreamingEndpointResultEvent(): Get streaming endpoint result event.
[DEBUG] [15-09-2021 15:17:14:976.344 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000020, Next state: 0x0000000000000010
[DEBUG] [15-09-2021 15:17:14:976.440 GMT] getStreamingTokenHandler invoked
[DEBUG] [15-09-2021 15:17:14:976.512 GMT] Refreshing credentials. Force refreshing: 1 Now time is: 1631719034976501591 Expiration: 18446744073709551615
[INFO ] [15-09-2021 15:17:14:976.622 GMT] getStreamingTokenResultEvent(): Get streaming token result event.
[DEBUG] [15-09-2021 15:17:14:976.718 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000010, Next state: 0x0000000000000040
[DEBUG] [15-09-2021 15:17:14:976.813 GMT] streamReadyHandler invoked
Stream is ready
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

And then nothing happens.

If I wasn't using interpipe I would get this output instead:

Setting pipeline to PAUSED ...
[INFO ] [15-09-2021 15:18:55:651.759 GMT] createKinesisVideoClient(): Creating Kinesis Video Client
[INFO ] [15-09-2021 15:18:55:651.934 GMT] heapInitialize(): Initializing native heap with limit size 536870912, spill ratio 0% and flags 0x00000001
[INFO ] [15-09-2021 15:18:55:651.985 GMT] heapInitialize(): Creating AIV heap.
[INFO ] [15-09-2021 15:18:55:652.056 GMT] heapInitialize(): Heap is initialized OK
[DEBUG] [15-09-2021 15:18:55:652.311 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002
[DEBUG] [15-09-2021 15:18:55:652.395 GMT] getSecurityTokenHandler invoked
[DEBUG] [15-09-2021 15:18:55:652.442 GMT] Refreshing credentials. Force refreshing: 0 Now time is: 1631719135652433079 Expiration: 0
[DEBUG] [15-09-2021 15:18:55:652.495 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000010
[INFO ] [15-09-2021 15:18:55:652.530 GMT] createDeviceResultEvent(): Create device result event.
[DEBUG] [15-09-2021 15:18:55:652.577 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000010, Next state: 0x0000000000000040
[DEBUG] [15-09-2021 15:18:55:652.616 GMT] clientReadyHandler invoked
[INFO ] [15-09-2021 15:18:55:652.737 GMT] try creating stream
[INFO ] [15-09-2021 15:18:55:652.812 GMT] Creating Kinesis Video Stream JpJetsonNanoStream
[INFO ] [15-09-2021 15:18:55:652.859 GMT] createKinesisVideoStream(): Creating Kinesis Video Stream.
[DEBUG] [15-09-2021 15:18:55:652.901 GMT] logStreamInfo(): Kinesis Video Stream Info
[DEBUG] [15-09-2021 15:18:55:652.942 GMT] logStreamInfo():  Stream name: JpJetsonNanoStream 
[DEBUG] [15-09-2021 15:18:55:652.980 GMT] logStreamInfo():  Streaming type: STREAMING_TYPE_REALTIME 
[DEBUG] [15-09-2021 15:18:55:653.019 GMT] logStreamInfo():  Content type: video/h264 
[DEBUG] [15-09-2021 15:18:55:653.055 GMT] logStreamInfo():  Max latency (100ns): 600000000
[DEBUG] [15-09-2021 15:18:55:653.092 GMT] logStreamInfo():  Fragment duration (100ns): 20000000
[DEBUG] [15-09-2021 15:18:55:653.122 GMT] logStreamInfo():  Key frame fragmentation: Yes
[DEBUG] [15-09-2021 15:18:55:653.160 GMT] logStreamInfo():  Use frame timecode: Yes
[DEBUG] [15-09-2021 15:18:55:653.189 GMT] logStreamInfo():  Absolute frame timecode: Yes
[DEBUG] [15-09-2021 15:18:55:653.226 GMT] logStreamInfo():  Nal adaptation flags: 0
[DEBUG] [15-09-2021 15:18:55:653.261 GMT] logStreamInfo():  Average bandwith (bps): 4194304
[DEBUG] [15-09-2021 15:18:55:653.296 GMT] logStreamInfo():  Framerate: 25
[DEBUG] [15-09-2021 15:18:55:653.333 GMT] logStreamInfo():  Buffer duration (100ns): 1200000000
[DEBUG] [15-09-2021 15:18:55:653.370 GMT] logStreamInfo():  Replay duration (100ns): 400000000
[DEBUG] [15-09-2021 15:18:55:653.401 GMT] logStreamInfo():  Connection Staleness duration (100ns): 600000000
[DEBUG] [15-09-2021 15:18:55:653.431 GMT] logStreamInfo():  Store Pressure Policy: 1
[DEBUG] [15-09-2021 15:18:55:653.466 GMT] logStreamInfo():  View Overflow Policy: 1
[DEBUG] [15-09-2021 15:18:55:653.501 GMT] logStreamInfo():  Segment UUID: NULL
[DEBUG] [15-09-2021 15:18:55:653.538 GMT] logStreamInfo():  Frame ordering mode: 0
[DEBUG] [15-09-2021 15:18:55:653.571 GMT] logStreamInfo(): Track list
[DEBUG] [15-09-2021 15:18:55:653.606 GMT] logStreamInfo():  Track id: 1
[DEBUG] [15-09-2021 15:18:55:653.636 GMT] logStreamInfo():  Track name: kinesis_video
[DEBUG] [15-09-2021 15:18:55:653.666 GMT] logStreamInfo():  Codec id: V_MPEG4/ISO/AVC
[DEBUG] [15-09-2021 15:18:55:653.703 GMT] logStreamInfo():  Track type: TRACK_INFO_TYPE_VIDEO
[DEBUG] [15-09-2021 15:18:55:653.739 GMT] logStreamInfo():  Track cpd: NULL
[DEBUG] [15-09-2021 15:18:55:653.857 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002
[INFO ] [15-09-2021 15:18:56:364.958 GMT] writeHeaderCallback(): RequestId: 70cbec19-bb83-40fe-a5f7-658b119237c2
[DEBUG] [15-09-2021 15:18:56:366.479 GMT] describeStreamCurlHandler(): DescribeStream API response: {"StreamInfo":{"CreationTime":1.62992430927E9,"DataRetentionInHours":24,"DeviceName":null,"IngestionConfiguration":null,"KmsKeyId":"arn:aws:kms:us-east-1:889174357220:alias/aws/kinesisvideo","MediaType":null,"Status":"ACTIVE","StreamARN":"arn:aws:kinesisvideo:us-east-1:889174357220:stream/JpJetsonNanoStream/1629924309270","StreamName":"JpJetsonNanoStream","Version":"qz2oUXoWJG3ijNYKEs0Q"}}
[INFO ] [15-09-2021 15:18:56:380.724 GMT] describeStreamResultEvent(): Describe stream result event.
[WARN ] [15-09-2021 15:18:56:381.004 GMT] describeStreamResult(): Retention period returned from the DescribeStream call doesn't match the one specified in the StreamInfo
[WARN ] [15-09-2021 15:18:56:381.150 GMT] describeStreamResult(): Content type returned from the DescribeStream call doesn't match the one specified in the StreamInfo
[DEBUG] [15-09-2021 15:18:56:381.289 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000002, Next state: 0x0000000000000020
[INFO ] [15-09-2021 15:18:57:125.248 GMT] writeHeaderCallback(): RequestId: 736611a4-aa11-4029-be72-748dd55b88ac
[DEBUG] [15-09-2021 15:18:57:126.780 GMT] getStreamingEndpointCurlHandler(): GetStreamingEndpoint API response: {"DataEndpoint":"https://s-a7395519.kinesisvideo.us-east-1.amazonaws.com"}
[INFO ] [15-09-2021 15:18:57:141.445 GMT] getStreamingEndpointResultEvent(): Get streaming endpoint result event.
[DEBUG] [15-09-2021 15:18:57:141.699 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000020, Next state: 0x0000000000000010
[DEBUG] [15-09-2021 15:18:57:141.845 GMT] getStreamingTokenHandler invoked
[DEBUG] [15-09-2021 15:18:57:142.028 GMT] Refreshing credentials. Force refreshing: 1 Now time is: 1631719137142009563 Expiration: 18446744073709551615
[INFO ] [15-09-2021 15:18:57:142.195 GMT] getStreamingTokenResultEvent(): Get streaming token result event.
[DEBUG] [15-09-2021 15:18:57:142.339 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000010, Next state: 0x0000000000000040
[DEBUG] [15-09-2021 15:18:57:142.480 GMT] streamReadyHandler invoked
Stream is ready
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

################### FROM HERE ON YOU SEE THE DIFFERENCE ###########################################

=== gst-launch-1.0[544]: Connection established (7F903051D0)Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 106)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 582)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 295)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 458)
Acquiring SCF Camera device source via index 0 has failed. ---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
=== gst-launch-1.0[544]: CameraProvider initialized (0x7f88aa0670)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
LSC: LSC surface is not based on full res!
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 1 
   Output Stream W = 3264 H = 1848 
   seconds to Run    = 600 
   Frame Rate = 28.000001 
GST_ARGUS: PowerService: requested_clock_Hz=10555776
GST_ARGUS: Setup Complete, Starting captures for 600 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
H264: Profile = 66, Level = 0 
[INFO ] [15-09-2021 15:18:58:266.899 GMT] kinesisVideoStreamFormatChanged(): Stream format changed.
[DEBUG] [15-09-2021 15:18:58:276.087 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000040, Next state: 0x0000000000000080
[INFO ] [15-09-2021 15:18:58:276.389 GMT] putStreamResultEvent(): Put stream result event. New upload handle 0
[DEBUG] [15-09-2021 15:18:58:286.606 GMT] stepStateMachine(): State Machine - Current state: 0x0000000000000080, Next state: 0x0000000000000100
[DEBUG] [15-09-2021 15:18:58:287.018 GMT] Kinesis Video client and stream metrics
    >> Overall storage byte size: 536870912
    >> Available storage byte size: 536830680
    >> Allocated storage byte size: 40232
    >> Total view allocation byte size: 144080
    >> Total streams elementary frame rate (fps): 25
    >> Total streams transfer rate (bps): 33554432 (32768 Kbps)
    >> Current view duration (ms): 0
    >> Overall view duration (ms): 0
    >> Current view byte size: 40184
    >> Overall view byte size: 40184
    >> Current elementary frame rate (fps): 25
    >> Current transfer rate (bps): 33554432 (32768 Kbps)
[INFO ] [15-09-2021 15:18:59:199.313 GMT] writeHeaderCallback(): RequestId: e18ded60-ecfe-a568-b831-fc4369629959
[DEBUG] [15-09-2021 15:18:59:199.933 GMT] postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
[DEBUG] [15-09-2021 15:18:59:361.673 GMT] postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
[DEBUG] [15-09-2021 15:18:59:519.920 GMT] postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0

So for some reason when using interpipe you wouldn't get === gst-launch-1.0[544]: Connection established (7F903051D0)Redistribute latency....

Do you know why when using kvssink with interpipe, gst-launch will not be connected?

SDK version number

Factory Details: Rank primary + 10 (266) Long-name KVS Sink Klass Sink/Video/Network Description GStreamer AWS KVS plugin Author AWS KVS kinesis-video-support@amazon.com

Plugin Details: Name kvssink Description GStreamer AWS KVS plugin Filename /home/jetson_base/work/vol/amazon-kinesis-video-streams-producer-sdk-cpp/build/libgstkvssink.so Version 1.0 License Proprietary Source module kvssinkpackage Binary package GStreamer Origin URL http://gstreamer.net/

Open source building Dockerfile relevant contents:

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update \
    && apt-get install -y cmake m4 git build-essential \
    && apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools

WORKDIR /home/jetson_base/work/vol

RUN git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git

WORKDIR /home/jetson_base/work/vol/amazon-kinesis-video-streams-producer-sdk-cpp/build
RUN cmake -DBUILD_GSTREAMER_PLUGIN=TRUE .. \
    && make

ENV GST_PLUGIN_PATH /home/jetson_base/work/vol/amazon-kinesis-video-streams-producer-sdk-cpp/build
ENV LD_LIBRARY_PATH /home/jetson_base/work/vol/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/lib

WORKDIR /home/jetson_base/work/vol

RUN git clone https://github.com/RidgeRun/gstd-1.x.git \ 
    && git clone https://github.com/RidgeRun/gst-interpipe.git

RUN apt-get update \
    && apt-get install -y \
    gtk-doc-tools \
    automake \
    libtool \
    pkg-config \
    libglib2.0-dev \
    libjson-glib-dev \
    libreadline-dev \
    libncursesw5-dev \
    libdaemon-dev \
    libjansson-dev \
    libsoup2.4-dev \
    python3-pip

WORKDIR /home/jetson_base/work/vol/gstd-1.x
RUN ./autogen.sh \
    && ./configure \
    && make \
    && make install

WORKDIR /home/jetson_base/work/vol/gst-interpipe
RUN ./autogen.sh --libdir /usr/lib/aarch64-linux-gnu/ \
    && make \
    && make install

Platform (please complete the following information):

I'm running my code inside a docker image that has gstreamer, gst-interpipe and the kinesis video stream producer sdk (kvssink element) installed, on a jetson nano with a raspberry pi CSI camera.

hassanctech commented 3 years ago

I am not sure. Since it's clear that the kvssink plugin is working for you by itself I would advise you to take to the GStreamer forums to figure out why it's not working with interpipe. If you find that there is a clear issue with the plugin itself please provide details and re-open the issue or create a new one.