chandni mirchandani
chandni mirchandani

Reputation: 121

Put the webcam data to kinesis video stream

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

Upvotes: 0

Views: 1599

Answers (2)

LittleWat
LittleWat

Reputation: 131

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

Upvotes: 0

MushMal
MushMal

Reputation: 109

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

Upvotes: -1

Related Questions