
Build your own Twitch using MPEG-DASH and HLS live streaming - yarapavan
https://www.bitcodin.com/blog/2015/11/mpeg-dash-and-hls-live-streaming-with-bitcodin/
======
callmeed
Related, where do I begin to learn about live streaming/broadcasting from end-
to-end?

I'm experimenting with an Apple TV project and I'd like to know (a) what has
to take place to get from video camera or iOS device to an HLS stream? (b)
What open source tools (if any) are available to help do this? (c) what
storage/server requirements are there?

TIA

~~~
toomuchtodo
I can provide you with my contact info if you'd like, and answer any questions
you may have. At my last job, I built out the VoD/live streaming
infrastructure for the internet presence of a major US broadcaster.

Its pretty straightforward, just a bit of a schlep time wise depending on the
scale and capabilities you're targeting.

~~~
newman314
* What do you say are the biggest challenges?

* What's the oddest problem you have had to solve while building/operating this?

~~~
toomuchtodo
Surprisingly enough:

* Politics within the organization

* Interfacing with legacy broadcast/video library systems (f __* you Grass Valley, and your abomination of a video asset management system)

Serving video online is fairly straightforward, although it wasn't always.
We've come a long way from RTMP and progressive HTTP downloads. With HLS,
MPEG-DASH, etc, you're still moving the same bits, but you have a much better
end user experience.

Netflix has original renditions for all of its content in S3, which they
convert into multiple renditions based on bitrate and other video metadata,
and their player then intelligently switches based on available bandwidth. Its
(mostly) that easy, unless you're the White House or SpaceX streaming to
millions of people at once. That's still a bit tricky, and you usually call
Akamai, Limelight, or Encoding.com to solve that.

If I had to do it all over again, I'd create a small startup team (no more
than 10-15 people) to create a platform that lets you white label so anyone
could build their own Netflix with their own content (or licensed content) and
iterate ruthlessly. Don't partner on storage or CDN, just create modules that
let you plug n play based on the rates you can get (API libraries all the way
down). Setup a partnership department to hook customers up with hardware
vendors (Apple TV, Chromecast, Roku, those folks). Keep in the front of your
mind that tech is commodity but relationships are what's going to put you in
tens of millions of homes.

I left because no one realized how quickly other parties in the space (Hulu,
Netflix, Amazon, Google, etc) were innovating. We'd spend _months_ in the
weeds, with little momentum on key features. In 5-10 years, broadcast is
completely dead, its airspace auctioned off to cellular providers. This does
not get through to traditional broadcast folks.

~~~
slederer
Nice insights!

Interesting fact on your approach: at bitmovin we do exactly that, we've our
bitcodin.com encoding service and our bitdash players (www.dash-player.com),
which can plug into any cloud storage, CDN, wtc., we've quite a lot interfaces
and tutorials for that. We see us as kind of Stripe for video.

------
Sir_Cmpwn
I wouldn't say this is my own Twitch, more like paying for someone else's
Twitch that you can host on your own page.

------
slederer
It also enables adaptive streaming in HTML5 without Flash, as used by Netflix
or YouTube already

~~~
bearlikelion
Looking on their site it looks like the player requires flash.

~~~
hackerboos
This example is HTML5:

[http://www.dash-player.com/](http://www.dash-player.com/)

~~~
johnmaguire2013
I was looking into similar projects recently. The one you linked certainly
seems to be the best option right now, however it's worth noting that there is
also the DASH IF (Industry Forum) reference player[1], and JW Player[2] also
offers support for a HTML5 DASH player.

I believe support for HTML5 media extensions was added to Firefox 42, and has
been around in other browsers for a while.

1\.
[http://dashif.org/reference/players/javascript/](http://dashif.org/reference/players/javascript/)

2\. [http://www.jwplayer.com/innovation/roadmap/mpeg-
dash/](http://www.jwplayer.com/innovation/roadmap/mpeg-dash/)

------
bearlikelion
I've been really interested in doing something like this. I want to improve my
home streaming setup, trying to work in multiple web cameras and game
perspectives, while co-broadcasting to Youtube and Twitch.

I've tried a few things, right now I have my dedicated home server acting as a
RTMP relay for my webcam to stream into my 2nd PC where my girlfriend is
playing games / streaming, but the latency is unbearable and my video is 5-10s
behind what I'm saying.

Was hoping this could be a solution, but it doesn't look like it. I don't like
the pricing model, and the video player STILL requires flash.

------
ejcx
Please do not add allow domain "*" into your crossdomain.xml EVER unless on a
CDN domain (a domain specifically for hosting a CDN) or serving static files.
This breaks SOP.

------
listic
Why does bitdash require Flash? I tried to use it (Firefox 38 on Linux) but it
says:

"No supported technology was detected, i.e. neither Flash nor the MediaSource
Extension was found and no HLS manifest was given or HLS is also not
supported. Please download the Flash Player from
[http://get.adobe.com/flashplayer/](http://get.adobe.com/flashplayer/) or try
another browser."

~~~
slederer
Firefox was lacking behind in supporting the HTML5 Media Source Extensions,
it's in since Firefox 42. Everything beyond this still needs Flash for HLS or
MPEG DASH playback

~~~
ak1394
Here is tracking bug for Firefox Media Source Extensions API
[https://bugzilla.mozilla.org/show_bug.cgi?id=778617](https://bugzilla.mozilla.org/show_bug.cgi?id=778617)

------
102030485868
I did something similar to this a few months ago using nginx, rtmp, and vlc in
hopes of making an HTML5 only streaming service.

In the end, I found out that using a VM for transcoding is not a great idea.
Having a > 3 minute lag time between input and output was... difficult to work
with.

I'm not willing to pay for Amazon's transcoding service because of uh, student
wages, so I scrapped that project.

Fun weekend project at the very least.

------
th0ma5
I'd love to see someone play around with getting GLC + Twitch and/or Youtube
Live working together. Or making streaming video in real time from a
programming language (maybe openFrameworks can do this?) ...

~~~
slederer
Maybe the API clients are helpfull for
this?[https://developer.bitcodin.com/doc/api-
clients](https://developer.bitcodin.com/doc/api-clients)

~~~
th0ma5
Yeah that's all about transcoding and making pipelines and such... I guess I'm
talking about the actual creation of full motion video.

------
joshmn
Would bitcodin be handling the takedown requests?

~~~
slederer
What do you mean in particular?

------
qnaal
what's the deal with multicast?

~~~
slederer
We don't see multicast any more, in OTT streaming formats such as DASH or HLS
use cheap and scalable HTTP infrastructure and HTTP caches, which can be seen
as application layer multicast

------
kylemichelson
Hey, I'm the founder of Streamup, a live entertainment platform w/ 22MM MAU.
We're encountering a lot of similar challenges, so we're looking for bright
engineers to collaborate with. Tweet me @kyledmichelson and let's talk.

~~~
slederer
Cool! Drop me a line at sl@bitmovin.com

