Connect webcam to Kinesis Video Stream through Gstreamer in UDP

I want to connect my webcam to Kinesis Video Stream. Right now I’m getting it but using the TCP protocol. I guided myself through this tutorial.

CONSUMER:
gst-launch-1.0 -e -v tcpserversrc host=127.0.0.1 port=4444 do_timestamp=true ! gdpdepay ! h264parse ! capsfilter caps='video/x-h264,width=320,height=240,framerate=15/1' ! kvssink stream-name='stream_name' storage-size=32 credential-path=/root/credentials.txt aws-region='eu-central-1'

PRODUCER:
gst-launch-1.0 -v ksvideosrc do-stats=TRUE ! videoconvert ! video/x-raw,format=NV12,width=320,height=240,framerate=15/1 ! x264enc bframes=0 key-int-max=30 bitrate=300 ! video/x-h264,stream-format=avc,alignment=au ! gdppay ! tcpclientsink host=127.0.0.1 port=4444 sync=false

In order to reduce the delay, I want to use UDP.

CONSUMER:
gst-launch-1.0 -e -v udpsrc port=4444 ! h264parse ! capsfilter caps='video/x-h264,width=320,height=240,framerate=15/1' ! kvssink stream-name='stream-name' storage-size=32 credential-path=/root/credentials.txt aws-region='eu-central-1'

PRODUCER:
gst-launch-1.0 -v ksvideosrc ! videoconvert ! video/x-raw,format=NV12,width=320,height=240,framerate=15/1 ! x264enc bframes=0 key-int-max=30 bitrate=300 ! video/x-h264,stream-format=avc,alignment=au !  udpsink host=127.0.0.1 port=4444

What I thought was just replacing tcpclientsink with udpsink and tcpserversrc with udpsrc doesn’t work. I have no error and the camera turns on but nothing appears in Kinesis Video Stream – Media playback. What could be wrong?

Source: Windows Questions

LEAVE A COMMENT