Record live streaming video with WebRTC and stream with AWS - amazon-web-services

I'm trying to develop a website that basically lets a user visit a page, and lets say click a button, and use their built in camera to live stream videos with audio to others that visit another url.
I need some clarity on what I need to develop, what I can get from 3rd party to save time. AWS looks to cover all the encoding and delivery http://aws.amazon.com/cloudfront/streaming/, but I'm confused on the process on which I should record and delivery the content to S3. Just to much information overload.
In all my research I looks like I should build a WebRTC, which I have done, then transport that data with javascript from the clients browser to my server, and thus to AWS. Is this the best format, or should I been using a 3rd party thats putting more time into that element?
I have seen the Kurento project, as well as this RecordRTC project.
Like I said, I'm finding there is just to much information overload on the topic.
So what are my options for:
In browser recording with WebRTC. Anything else I should do or just force users to roll up to a supporting browser?
WebRTC means I have to do Javascript for the delivery, is node a better option for the server to take delivery of this streaming data?
Anything else I need to know before I pass it off to S3 for delivery to the cloud front?
As you can see the core of my question comes within the recording and transporting the data to the web server so I can delivery it for streaming.

I am looking for the same thing.
In 2020, it seems it should be possible with RecordRTC and then uploading blobs / multiform data directly to S3.

Related

How to build an IoT system with mobile app using AWS

My project is to develop an IoT system that uses sensors to collect data which can be monitored by the user using a mobile app. I want to use AWS for this project but since I am a beginner, I am confused on where to start. Do you have some tips or some chronological steps that I have to learn and do to be able to create this project?
Not a criticism, but an observation. If you don't know the conceptual steps to achieve this, understand this before you jump into any technology. If you can't do this right now without any AWS technology, jumping in with AWS is going to make your life 100x harder.
Break it down into key challenges.
IoT Sensors. Start with a single sensor. Build a POC with a Raspberry PI that sends data from the device to www.example.com
Build a listening service on your localhost. i.e. HelloWorldIoTDevice simply responds with a 200 OK, don't worry about the data and payloads right now
Save this to a database that simple shows 200 OK messages every time a successful message is received from the IoT device
Build a HelloWorldWebApp that reads this data from the database
Build an API that reads the data from the database
Build a HelloWorldMobileApp that reads data from the API
Build it in full - Add payloads, add authentication and authorisation, get a POC published on the web so it works end to end
Productionise it
Then you need to get actual data flowing. Conceptually this is a relatively simple thing. But in reality this requires an extremely in-depth understanding of technology layers across the entire stack which is extremely challenging if you are a beginner as this is an enormous learning curve.
Take a look at Ngrok to help with building these types of POCs, https://www.contradodigital.com/2016/04/09/access-localhost-internet/
Hope that provides a bit of guidance. Take one step at a time.

What is the difference between S3 video storage and streaming?

I'm hosting videos on aws S3 at the moment. I can place the s3 url into the src attribute of my tags and everything works correctly and plays as though the video is being streamed to my site. These are not small videos either. Some are 1gb in size.
I can also immediately jump to the end of the video as though the entire file wasn't downloaded, but just the part I need.
Whenever I google info on streaming on demand video from aws I get answers that I need a service in front of s3 to do something like this. Is aws automatically doing this for me?
S3 support partial GET requests. This allows clients to request only a specific part of the file. Most modern players (including HTML5) are able to utilize this feature to provide the experience you describe to the users.
Quoting from here:
HTTP range requests allow to send only a portion of an HTTP message
from a server to a client. Partial requests are useful for large media
or downloading files with pause and resume functions, for example.

Streaming media to files in AWS S3

My problem:
I want to stream media I record on the client (typescript code) to my AWS storage (services like YouTube / Twitch / Zoom / Google Meet can live record and save the record to their cloud. Some of them even have host-failure tolerance and create a file if the host has disconnected).
I want each stream to have a different file name so future triggers will be available from it.
I tried to save the stream into S3, but maybe there are more recommended storage solutions for my problems.
What services I tried:
S3: I tried to stream directly into S3 but it doesn't really support updating files.
I tried multi-part files but they are not host-failure tolerance.
I tried to upload each part and have a lambda to merge it (yes, it is very dirty and consuming) but I sometimes had ordering problems.
Kinesis-Video: I tried to use kinesis-video but couldn't enable the saving feature with the SDK.
By hand, I saw it saved a new file after a period of time or after a size was reached so maybe it is not my wanted solution.
Amazon IVS: I tried it because Twitch recommended this although it is way over my requirements.
I couldn't find an example of what I want to do in code with SDK (only by hand examples).
Questions
Do I look at the right services?
What can I do with the AWS-SDK to make it work?
Is there a good place with code examples for future problems? Or maybe a way to search for solutions?
Thank you for your help.

Google Tag Manager clickstream to Amazon

So the questions has more to do with what services should i be using to have the efficient performance.
Context and goal:
So what i trying to do exactly is use tag manager custom HTML so after each Universal Analytics tag (event or pageview) send to my own EC2 server a HTTP request with a similar payload to what is send to Google Analytics.
What i think, planned and researched so far:
At this moment i have two big options,
Use Kinesis AWS which seems like a great idea but the problem is that it only drops the information in one redshift table and i would like to have at least 4 o 5 so i can differentiate pageviews from events etc ... My solution to this would be to divide from the server side each request to a separated stream.
The other option is to use Spark + Kafka. (Here is a detail explanation)
I know at some point this means im making a parallel Google Analytics with everything that implies. I still need to decide what information (im refering to which parameters as for example the source and medium) i should send, how to format it correctly, and how to process it correctly.
Questions and debate points:
Which options is more efficient and easiest to set up?
Send this information directly from the server of the page/app or send it from the user side making it do requests as i explained before.
Does anyone did something like this in the past? Any personal recommendations?
You'd definitely benefit from Google Analytics custom task feature instead of custom HTML. More on this from Simo Ahava. Also, Google Big Query is quite a popular destination for streaming hit data since it allows many 'on the fly computations such as sessionalization and there are many ready-to-use cases for BQ.

Akamai Integration

I want to use Akamai to store files. I want to know whether Akamai provides any API (e.g. web services) for us to upload, download, list files? Appreciate if anyone could provide some documents for a newbie.
Another question is, if I upload video files to Akamai, does it provide video streaming capability?
Akamai provide an API to allow your customers to download files.
From their web site it is called "Client-side Downloads"
Client-side Downloads offers the ability to offload a significant
portion of edge delivery onto a managed and secure network of clients
- using client-to-client delivery - to provide a lower cost download
solution that respects the clients. Good uses may include software
downloads, patches, and updates, background software and drivers, and
downloadable video and games used by about a thousand or more people.
http://client.akamai.com/misc/demos
Here is further detail on how to interact with their API
http://client.akamai.com/misc/demos/csd-index.html
I was at their presentation the other day and they spoke about a Video Stream product coming out mid to late 2012.
I ran into another company that did video hosting and streaming called Movideo