Giter Club home page Giter Club logo

Comments (20)

MushMal avatar MushMal commented on July 24, 2024 1

@RushabhK23 please open a separate issue for this in the consume library. I will provide some answers here though for your convenience.

  • If you want to use the standard sandboxed browsers environment then you need to rely on MSE, otherwise, you need to install flash or similar product that will allow some surface/hardware acceleration and most browsers/environments will not allow it.
  • Most browsers support HLS/MPEG-DASH playback but all of these are "Live" or "VOD" playbacks and can not be real-time. You will always have at least the fragment duration latency.
  • We are working on providing HLS/MPEG-DASH solution - no ETA yet.

from amazon-kinesis-video-streams-producer-sdk-cpp.

unicornss avatar unicornss commented on July 24, 2024

Thanks rajdarbar for checking the Kinesis Video Stream SDK.

Could you provide us details on your setup?

  • the environment you are running the demo application from
    (e.g. ubuntu linux, mac or raspberry pi )
  • which camera device are you using for streaming (e.g. usb camera or built in)..

-ss

from amazon-kinesis-video-streams-producer-sdk-cpp.

rajdarbar avatar rajdarbar commented on July 24, 2024

Hi unicornss,

i am using ubuntu 17.04 and usb webcam camera.
Also i want to know how to store kinesis video stream in my s3 bucket. and where i can see my all kinesis stored videos.

Thanks
Raj

from amazon-kinesis-video-streams-producer-sdk-cpp.

unicornss avatar unicornss commented on July 24, 2024

Hi Raj,

To learn more about the Kinesis Video Streams please refer the documentation here:

Additional Readings:

The error you are seeing "Not all elements could be created. " suggests that your GStreamer pipeline does not have all elements which could be that camera is not detected/loaded (drivers).

Can you run the gst-launch-1.0 to see if the USB video camera is able to capture the video through GStreamer pipeline?
Example:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1 ! xvimagesink

If your camera is supported and drivers are installed correctly then you should be able to see the camera output displayed on your computer screen.

You can also run the command gst-inspect-1.0 to check which GStreamer plugins are available in your system.
Hope this helps you to debug the setup and required drivers for your system.
You can also refer to the https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/README.md for troubleshooting.

-ss

from amazon-kinesis-video-streams-producer-sdk-cpp.

rajdarbar avatar rajdarbar commented on July 24, 2024

Hi unicornss,

i need your one help ,
i want to achive following steps

1)Pass live stream to kinesis video stream.
2)Store this stream in s3 bucket.
3)Using kinesis video stream api show that live stream in mobile.

first step is done using offline video , but how can i show that same video in mobile using kinesis video stream api.

amazon-rekognition-video-analyzer (https://github.com/awslabs/amazon-rekognition-video-analyzer.git) uses kinesis video stream?

Thanks
Raj

from amazon-kinesis-video-streams-producer-sdk-cpp.

unicornss avatar unicornss commented on July 24, 2024

Hi Raj,

1) Pass live stream to kinesis video stream.

Glad you are able to store offline video to kinesis video stream.
The demo sample should be able to get the video stream from a video camera or from laptop built-in webcam sent to Kinesis Video Streams service.

Sample output (from running the demo app in Ubuntu):

INFO - Initializing curl.
createKinesisVideoClient(): Creating Kinesis Video Client
heapInitialize(): Initializing native heap with limit size 536870912, spill ratio 0% and flags 0x00000001
heapInitialize(): Creating AIV heap.
heapInitialize(): Heap is initialized OKINFO - Refreshing credentials. Force refreshing: 0 Now time is: 608787 Expiration: 0
INFO - New credentials expiration is 611187
DEBUG - createDeviceHandler invoked
createDeviceResultEvent(): Create device result event.DEBUG - Awaiting for the producer to become ready...
DEBUG - Kinesis Video producer is Ready.
DEBUG - Client is ready
INFO - Creating Kinesis Video Stream my-stream-jan3

createKinesisVideoStream(): Creating Kinesis Video Stream.DEBUG - describeStreamHandler invoked
INFO - Refreshing credentials. Force refreshing: 0 Now time is: 608787 Expiration: 0
DEBUG - Awaiting for the stream to become ready...
DEBUG - describeStream response: {"StreamInfo":{"CreationTime":1.515006185591E9,"DataRetentionInHours":2,"DeviceName":"Kinesis_Video_Device","KmsKeyId":"arn:aws:kms:us-west-2:828808393645:alias/aws/kinesisvideo","MediaType":"video/h264","Status":"ACTIVE","StreamARN":"arn:aws:kinesisvideo:us-west-2:828808393645:stream/my-stream-jan3/1515006185591","StreamName":"my-stream-jan3","Version":"eFggwrXsBUEI1KqWN8Zy"}}
INFO - Discovered existing Kinesis Video stream: arn:aws:kinesisvideo:us-west-2:828808393645:stream/my-stream-jan3/1515006185591
INFO - stream arn in stream_info struct: arn:aws:kinesisvideo:us-west-2:828808393645:stream/my-stream-jan3/1515006185591

describeStreamResultEvent(): Describe stream result event.DEBUG - streamingEndpointHandler invoked
INFO - Refreshing credentials. Force refreshing: 0 Now time is: 608787 Expiration: 0
DEBUG - getStreamingEndpoint response: {"DataEndpoint":"https://s-4010bf70.kinesisvideo.us-west-2.amazonaws.com"}
INFO - streaming to endpoint: https://s-4010bf70.kinesisvideo.us-west-2.amazonaws.com

getStreamingEndpointResultEvent(): Get streaming endpoint result event.DEBUG - streamingTokenHandler invoked
INFO - Refreshing credentials. Force refreshing: 1 Now time is: 608787 Expiration: 611187
INFO - New credentials expiration is 611187

getStreamingTokenResultEvent(): Get streaming token result event.DEBUG - Kinesis Video stream my-stream-jan3 is Ready.
DEBUG - Stream is ready
DEBUG - putStreamHandler invoked
DEBUG - No active streams states for my-stream-jan3

putStreamResultEvent(): Put stream result event.DEBUG - streamDataAvailableHandler invoked
DEBUG - Note data received: duration(100ns): 200000 bytes: 9858
INFO - Creating new connection for Kinesis Video stream: my-stream-jan3

getKinesisVideoMetrics(): Get the memory metrics size.
getKinesisVideoStreamMetrics(): Get stream metrics for Stream 00000000019ca226.INFO - Refreshing credentials. Force refreshing: 0 Now time is: 608793 Expiration: 0
DEBUG - Kinesis Video client and stream metrics
>> Overall storage size: 536870912
>> Available storage size: 536861021
>> Allocated storage size: 9891
>> Total view allocation size: 144056
>> Total streams frame rate: 30
>> Total streams transfer rate: 4194304
>> Current view duration: 200000
>> Overall view duration: 200000
>> Current view size: 9858
>> Overall view size: 9858
>> Current frame rate: 30
>> Current transfer rate: 4194304
DEBUG - streamDataAvailableHandler invoked
DEBUG - Note data received: duration(100ns): 4600000 bytes: 10669
DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:HTTP/1.1 100 Continue

DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:

DEBUG - postBodyStreamingReadFunc (curl callback) invoked
DEBUG - Wrote 10669 bytes to Kinesis Video
DEBUG - postBodyStreamingReadFunc (curl callback) invoked
DEBUG - streamDataAvailableHandler invoked
DEBUG - Note data received: duration(100ns): 200000 bytes: 746
DEBUG - Wrote 746 bytes to Kinesis Video
DEBUG - postBodyStreamingReadFunc (curl callback) invoked
DEBUG - streamDataAvailableHandler invoked
DEBUG - Note data received: duration(100ns): 200000 bytes: 700
DEBUG - Wrote 700 bytes to Kinesis Video
DEBUG - postBodyStreamingReadFunc (curl callback) invoked
DEBUG - streamDataAvailableHandler invoked
DEBUG - Note data received: duration(100ns): 200000 bytes: 813
DEBUG - Wrote 813 bytes to Kinesis Video
DEBUG - postBodyStreamingReadFunc (curl callback) invoked
DEBUG - streamDataAvailableHandler invoked
DEBUG - Note data received: duration(100ns): 200000 bytes: 818
DEBUG - Wrote 818 bytes to Kinesis Video
DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:HTTP/1.1 200 OK

DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:x-amzn-RequestId: 82c0aa4b-f0b9-11e7-9443-35d70022bb9d

DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:Content-Type: application/json

DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:Transfer-Encoding: chunked

DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:Date: Wed, 03 Jan 2018 19:08:41 GMT

DEBUG - postHeaderReadFunc (curl callback) invoked
DEBUG - Curl post header write function returned:

DEBUG - postBodyStreamingWriteFunc (curl callback) invoked
INFO - Curl post body write function returned:{"EventType":"BUFFERING","FragmentTimecode":0,"FragmentNumber":"91343852333181640069503053123985593269300060085"}

DEBUG - Processed ACK OK.

2)Store this stream in s3 bucket.
Kinesis Video Streams stores the media in S3 and you can refer the API for GetMedia in https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Operations_Amazon_Kinesis_Video_Streams_Media.html

3)Using kinesis video stream api show that live stream in mobile
There is no support for get media to get live streaming yet. Kinesis Video Streams console provides a sample of using the get media api for rending the video in the browser.

  1. Yes, the live stream analysis in amazon-rekognition uses Kinesis Video Streams.

Hope this helps.

Thanks
-SS

from amazon-kinesis-video-streams-producer-sdk-cpp.

rajdarbar avatar rajdarbar commented on July 24, 2024

Thank you so much unicornss. i am able to start live stream now with your help .
i have one more question is that what is the service name of kinesis video stream
and also is there any lambda function available using that i can put my kinesis video stream videos in s3 bucket .

thanks
Raj

from amazon-kinesis-video-streams-producer-sdk-cpp.

zhiyua-git avatar zhiyua-git commented on July 24, 2024

Hi Raj,

If you are specifying service name you should use in IAM policy for our service, then it is kinesisvideo. https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iam.html

Now we don't have lambda function for this purpose. But the video data is already store in our S3 bucket if your stream's data retention is not 0. You can use Parser Library to get your video data.

Thanks,
ZH

from amazon-kinesis-video-streams-producer-sdk-cpp.

unicornss avatar unicornss commented on July 24, 2024

Closing this issue as the user is able to stream successfully. If needed pl. an open a separate issue for parsing the video. https://github.com/aws/amazon-kinesis-video-streams-parser-library

from amazon-kinesis-video-streams-producer-sdk-cpp.

Shumakriss avatar Shumakriss commented on July 24, 2024

Hi @unicornss, in your snippet:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1 ! xvimagesink

Should it matter if I am using xvimagesink or autovideosink? Using autovideosink I do get the camera input displayed on-screen. I found this thread and ran xvinfo and tells me I have no adapters present. However, I assume that shouldn't matter for the gstreamer demo since it's CLI-based, it shouldn't need X configuration. Is there another test you could recommend?

Edit: I have found the RPi tutorial PDF and the troubleshooting section on the readme.md but I have not seen documentation about which versions of OS and dependencies are tested/supported. Does that exist?

from amazon-kinesis-video-streams-producer-sdk-cpp.

unicornss avatar unicornss commented on July 24, 2024

GStreamer demo app now can take command line arguments for height, width and framerate.

 "Usage: AWS_ACCESS_KEY_ID=SAMPLEKEY AWS_SECRET_ACCESS_KEY=SAMPLESECRET ./kinesis_video_gstreamer_sample_app my-stream-name -w width -h height -f framerate -b bitrateInKBPS");

A. If the resolution is provided then the sample will try to check if the camera supports that resolution. If it does detect that the camera can support the resolution supplied in the command line, then streaming starts; else, it will fail with an error msg Resolution not supported.

B. If no resolution is specified, the demo will try to use these three resolutions
1920x1080,
1280x720 and
640x480 in that order (highest resolution first) and will start streaming once the camera supported resolution is detected.

You can also use GST_DEBUG=4 at the start of the command line to see the capabilties of the camera, or if any Element/Pipeline error you notice in your environment.

Please let us know if this helps.

from amazon-kinesis-video-streams-producer-sdk-cpp.

Shumakriss avatar Shumakriss commented on July 24, 2024

It looks like none of my GST plugins are loading. I am not super familiar with GST but I suppose that might impact the element factories that are throwing warnings too. I think I need to verify that the system GST plugin .so's are all linked properly but it's been awhile since I did that with a Linux/C++ program. Here's the logs.

gst-output.txt
sample-app.txt

Also, if it's easier I can work toward just this ticket or just #33 to avoid confusion. I have two RPi's but only one picamera so I can only test one at a time. For this ticket, I am using a slightly newer board RPi 2 Model B also using a recently installed and updated Raspbian.

from amazon-kinesis-video-streams-producer-sdk-cpp.

Shumakriss avatar Shumakriss commented on July 24, 2024

I just noticed the log in gst-output.txt:

0:00:00.001101454 800 0xb27e00 INFO GST_INIT gst.c:508:init_pre: Using library installed in /home/pi/amazon-kinesis-video-streams-producer-sdk-cpp/downloads/local/lib

My download directory is in kinesis-video-native-build since I changed directories there to run the install-script. Copied the files from /home/pi/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib to /home/pi/amazon-kinesis-video-streams-producer-sdk-cpp/downloads/local/lib and GST seems to find the plugins now. This issue might be due to not following installation steps properly but I thought running install-script in kinesis-video-native-build was OK (unless I did something else wrong too!). I don't think that applies to this issue though. If I do another install later and have the same directory problem, I will try to get it reproducible and file an issue.

Unfortunately, this install and RPi board is giving me issue #33 too. I don't think I have any reason to keep posting on this issue (18) at this point.

issue-18-output-2.txt
gst-output-2.txt

from amazon-kinesis-video-streams-producer-sdk-cpp.

RushabhK23 avatar RushabhK23 commented on July 24, 2024

Can someone tell me about working get media api for rending the video in the browser ??

from amazon-kinesis-video-streams-producer-sdk-cpp.

teamone-saml avatar teamone-saml commented on July 24, 2024

Hi Unicornss , I am working on saving Kinesis video stream into my own S3 bucket using lambda function and I have written the lambda function for the same but facing issue. I could see my video in S3 but that can not be played in the browser. I think its the issue with video parsing,need your help here. Please let me know what all details you need

from amazon-kinesis-video-streams-producer-sdk-cpp.

unicornss avatar unicornss commented on July 24, 2024

@teamone-saml

Could you elaborate on

could see my video in S3 but that can not be played in the browser

As posted by @zhiyua-git in here you can refer to the parser library samples to save the ingested video stream into local files and then upload to S3.

from amazon-kinesis-video-streams-producer-sdk-cpp.

hameedriswan7 avatar hameedriswan7 commented on July 24, 2024

is there any possible way restart to Kinesis video stream every 1 hour . i can able to stream video in aws console i need to restart every one hour of period.

from amazon-kinesis-video-streams-producer-sdk-cpp.

zhiyua-git avatar zhiyua-git commented on July 24, 2024

Hi @hameedriswan7 ,

Can you clarify more on why do you want to restart KVS stream every 1 hour? Internally due to connection expiration for security, it is already doing connection restart for every 40 minutes.

Thanks,
-ZH

from amazon-kinesis-video-streams-producer-sdk-cpp.

hameedriswan7 avatar hameedriswan7 commented on July 24, 2024

Hi @zhiyua-git,
Using getmedia i can retrieve stream in local as Single stream.With single stream i cannot able to upload in S3 it cause Storage issue. so i am running live stream using putmedia in jar file.In that if i stop and again start it can break the stream i can upload to S3 1 hour breakage of live stream video stored as normal in video in local.Again restart the stream get another 1 hour video like the way i asked.

These things are need to complete the process link given below please refer.For that still i am not getting any feature. so i decide to breal stream every hour to upload in s3 for that i need to restart stream for every one hour. Rekognation.

aws/amazon-kinesis-video-streams-parser-library#77

from amazon-kinesis-video-streams-producer-sdk-cpp.

zhiyua-git avatar zhiyua-git commented on July 24, 2024

Hi @hameedriswan7 ,

Rather than restarting PutMedia every hour, sound like you would want to restart on GetMedia side every hour, in that way, you video can be continuously sending.

You can do the disconnect on GetMedia using https://github.com/aws/amazon-kinesis-video-streams-parser-library/blob/57063da12cbfbfa95abbf04bb8d472fe559e7497/src/main/java/com/amazonaws/kinesisvideo/parser/examples/KinesisVideoExample.java#L126-L134.

from amazon-kinesis-video-streams-producer-sdk-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.