Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send camera stream to rtmp server by react native

I am trying to build a live stream video app. I built an rtmp server which is ready for publishing and playing streams. I need a way to capture mobile's user camera and send the online stream to my rtmp server.

I use react-native in client side. I found react-native-camera which is great in dealing with camera but I couldn't find any event/api available for accessing camera stream in their documentations.

Another problem is the way that I have to send the stream to rtmp server. I have no knowledge in this area so any kind of help will be appreciated.

like image 668
Ehsan Avatar asked Sep 09 '18 05:09

Ehsan


People also ask

How do I livestream from react native?

With the preface out of the way, let's talk about how to create a new live stream within Mux. Within Mux Dashboard, create a new Live Stream and acquire the Playback ID (not to be confused with the Live Stream ID) as well as the Stream Key. That's it!

What is RTMP IP camera?

RTMP is a media protocol used by various IP cameras that allow the device to stream real-time videos over the internet. The Real-Time Media Protocol (RTMP) provides high-performance transmission of video and audio from an IP camera to a server which casts the signal across various platforms on the internet.

Can OBS stream to RTMP?

Live Streaming Using RTMP with OBSTo use OBS to stream to Accelevents simply select Accelevents as the Stream Provider and then select the RTMP option.


1 Answers

For anyone else who faces the same issue, This repo is the ultimate solution.

https://github.com/NodeMedia/react-native-nodemediaclient

like image 101
Ehsan Avatar answered Sep 16 '22 11:09

Ehsan