Posted in Live Stream Video w/ Rails
live streaming would be an interesting feature for my latest mobile app https://surfcheck.xyz with the coming of 5G to many countries, it may be the future for many mobile apps.
I found many apis services offering live streaming, very easy to implement for incredible prices.
Some of this services are not available wordwide, for example Indonesia banned Vimeo and Tokbox.
This is the result of my research:
390$ per month for 5 hours
165$ per month for 2.000 GB Bandwith
0.004$ per participant per minute
Considering most of the apps do not become successfull, I may consider building the feature very quickly with twillio and react native, support it until it is not too expensive.
I could support up to 20 live streamings from 20 different locations, assisted from 4 users on average for 3 minutes length, just long enough so that users can check the weather/surf conditions.
Cost per minute 0.004$ * 20 video streams * 3 minutes length * 4 users = 0,96 $ per day.
30 $ per month on average with Twillio. You just need to make sure the user is streaming decent content and for a short period of time.
I did work on a video/live streaming project in the past, but I did not work on the RTMP data flow responsible for the live streaming.
Some of the tools I used were OpenSource, for example the vidibus/vidibus-recording gem should allow you to set up the rtmp streaming.
As described in the vidibus-recording gem, creating a live stream should as easy as running
recording is an instance of your
MyCustomRecording class (but I believe it's much more complex then that..)
class MyCustomRecording include Mongoid::Document include Vidibus::Recording::Mongoid end
but I don't think is no easy thing to set up, I don't even have an idea of what you have to use, HLS, RTMP or WebRTC.
I believe the issue is not only setting up the video stream data flow between the live streaming mobile source and the server, but distributing the live streaming via cdn to make sure the video is accessible worldwide
seems twillio is the best option for me right now to deliver this feature quickly hopefully getting on the 5G wave in advance. I believe the introduction of new technologies will change the way Mobile devices are being used and create opportunities for new applications streaming on 5G.
The main question is now how much will it cost (time + servers cost) to migrate from Twillio to my own Ruby on Rails infrastructure for live streaming, as you can not scale an application at $0.01 x User / Minute.
on my way around the web I found also post, which uses a library rvideo