DEV Community

Cover image for Building a Serverless Live-streaming Platform with React & AWS

Building a Serverless Live-streaming Platform with React & AWS

Nader Dabit on March 26, 2020

Cover image by Caspar Camille Rubin Live streaming is becoming more and more popular. Platforms like Twitch and YouTube allow you to stream usin...
Collapse
 
gabanox_ profile image
Gabriel Ramírez

¡Thanks for the awesome tutorial Nader!, I'm getting this error. ./src/App.js
Module not found: Can't resolve 'video.js' in '/Users/gabriel/my-streaming-app/src' ¿Any ideas of what could I be doing wrong?

Collapse
 
dabit3 profile image
Nader Dabit

Hey, just updated the tutorial with the install step:

npm install video.js

Sorry for the inconvenience, and thanks for pointing this out!

Collapse
 
gabanox_ profile image
Gabriel Ramírez

Thanks man, ¡now it works wonderfully!. Nice job

Thread Thread
 
dabit3 profile image
Nader Dabit

Awesome!!

Collapse
 
mrsamsa42 profile image
Jonathan Adler • Edited

Remember to stop or delete your channel and associated resources when you're done! Otherwise, it'll cost you about $40/day.

docs.aws.amazon.com/medialive/late...

Collapse
 
dabit3 profile image
Nader Dabit

Yes, thank you, I've updated the tutorial to show the pricing!

Collapse
 
stefanmajiros profile image
Stefan Majiros

Folks, who are using React Native,

if you need to stream videos, without "OBS" directly from mobile device, you can try this library: github.com/NodeMedia/react-native-...

Its "API" looks like this:

NodeCameraView
style=height: 400
ref=(vb) => this.vb = vb
outputUrl = "rtmp://192.168.0.10/live/stream" ---> maybe AWS URL here ??
camera= cameraId: 1, cameraFrontMirror: true
audio= bitrate: 32000, profile: 1, samplerate: 44100
video= preset: 12, bitrate: 400000, profile: 1, fps: 15, videoFrontMirror: false
autopreview=true

After taking look at inputs formats at docs.aws.amazon.com/medialive/late... and
docs.aws.amazon.com/medialive/late...

I guess it should work.

***I removed the brackets ({,}) from the code because I could not submit comment with them - sorry.

Collapse
 
codewithninja profile image
Zia_full_stack_dev

How Will I deploy it to the server? And how my server will know about my PC? seems like anyone would be able to stream on this code, or the CLI installed on the laptop makes a connection? What about authorization?

Sincerely,
Muhammad

Collapse
 
crock profile image
Alex Crocker

Thanks for this great post! I've been heavily focused on learning and using serverless technologies and JAMstack for the past year because I see it as the future.

Collapse
 
dabit3 profile image
Nader Dabit

Great to hear, thank you for checking out my post 💯

Collapse
 
ponyjackal profile image
ponyjackal

This is exactly what I've been waiting for.
Thanks for this post.

Collapse
 
vongohren profile image
Snorre Lothar von Gohren Edwin

Is not this basically a copy paste of this readme? github.com/awslabs/amplify-video/b...

Collapse
 
dabit3 profile image
Nader Dabit

That’s the repo I linked to, no If you compare the two you’ll see they are different

Collapse
 
vongohren profile image
Snorre Lothar von Gohren Edwin

OK I will trust you. Just got a very deja vue when reading that readme. With alot of the similar code and similar wording. On the setup: copyleaks.com/businesses/report/dx...

Collapse
 
rudyhadoux profile image
rudyhadoux

Hi, does it work for RTSP webcams too ?

Collapse
 
capzman profile image
capzman

Keep getting this error on amplify push command.
Following resources failed

Resource Name: rLambdaFunction (AWS::Lambda::Function)
Event Type: create
Reason: Could not unzip uploaded file

Collapse
 
rmunjal123 profile image
rmunjal123

Any way you fixed the error? Having the same issue

Collapse
 
usu008 profile image
usu008 • Edited

i am a react native developer so kindly guide me to do this with react-native?

Collapse
 
robertsmith1234 profile image
robertsmith

Thanks for the awesome tutorial . I Have question about this? i sharing one website: onthefly.stream/ what mention there are using

Collapse
 
eltel profile image
Terry Mitchell

Great tutorial!! Many thanks!

Collapse
 
benhulan profile image
Ben Hulan • Edited

Very cool article -- thank you! The amplify video service is not available in all regions. It might be nice to add that disclaimer, maybe in the video walkthrough configuring the Amplify CLI.