0

Im very new to Api and our use case is to stream the live data from webcam to kinesis video stream (kvs). Steps Taken : Created the ubuntu server on aws and installed the CPP SDK. created the kinesis video stream in aws downloaded and installed the Gstreamer on my local.

I was trying to put the rtsp sample data to gstream which is on Ec2ubuntu server server i ran below query $ gst-launch-1.0 rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name="YourStreamName" storage-size=512 access-key="YourAccessKey" secret-key="YourSecretKey" aws-region="YourAWSRegion"

im getting attached errorenter image description here may be we need to open some port on ec2 ? Suggestion required :how can i put my local webcam video to kinesis ?

thanks

2 Answers2

0

If you use macOS, you can stream your webcam into Kinesis Video Stream like the command below setting fps 1;

AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
AWS_REGION=<YOUR_AWS_REGION>
STREAM_NAME=<YOUR_STREAM_NAME>

gst-launch-1.0 -v avfvideosrc \
! clockoverlay font-desc="Sans bold 60px" \
! videorate \
! video/x-raw,framerate=1/1 \
! vtenc_h264_hw allow-frame-reordering=FALSE realtime=TRUE max-keyframe-interval=2 bitrate=512  \
! h264parse \
! video/x-h264,stream-format=avc,alignment=au \
! kvssink stream-name="${STREAM_NAME}" storage-size=512 \
    access-key="${AWS_ACCESS_KEY_ID}" \
    secret-key="${AWS_SECRET_ACCESS_KEY}" \
    aws-region="${AWS_REGION}" \
    frame-timecodes=true \
    framerate=1
LittleWat
  • 53
  • 6
-1

It's not immediately clear from your question what your scenario is. I assume if you refer to a webcam then it's attached to your computer. Depending of your use case, you could check out the producer libraries that will help integrating.

Java: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-java

C++: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp

C: https://github.com/awslabs/amazon-kinesis-video-streams-producer-c

You could ask relevant questions and get support in GitHub by cutting an Issue in the appropriate repository

MushMal
  • 109
  • 2
  • thanks i have installed cpp sdk but when i run the query $ gst-launch-1.0 rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name="YourStreamName" storage-size=512 access-key="YourAccessKey" secret-key="YourSecretKey" aws-region="YourAWSRegion" i get the attached error – chandni mirchandani Jul 08 '20 at 17:21
  • Perhaps you have access issues to the camera. The error doesn't come from KVS - likely the RTSP plugin. Recommend asking GStreamer forums on how to troubleshoot RTSP streams. We recommend getting your pipeline set correctly by using fakesink for example and only when you have the pipeline up and running, replace the sink with kvssink – MushMal Jul 09 '20 at 18:53