Is node.js a good solution for video streaming?

4,626 views
Skip to first unread message

@Marnix_IxD

unread,
Nov 28, 2011, 10:05:05 AM11/28/11
to nodejs
Originally I'm a designer, and only have limited knowledge of
programming and what is out there, but for a new project I've been
wondering about the following, because Node.js is being advertised as
being great for real time applications, and very scalable.

I'm looking into live streaming of interactive TV shows/movies/
concerts/theater/education and other live events on the web, where
people can join these live events from their home and get a feel or
really be involved with the content of the events. Which often have
limited capacity for an audience or are on the other side of the
globe.

So the question I'm raising can be answered with a simple yes or no,
but what I would prefer is some more in depth answers as in how would
it be possible? how would you do it? Or am I looking in the wrong
direction, and creating this with node.js or any other technology is
like finding a unicorn?

The question:

Would it be possible to create a Node.js server scalable to the extent
where it will be able to handle hundreds of simultaneous events with
their own video streams. And also each having their own real time
input from thousands of viewers at home (think chat, drawing,
selecting show highlights)?

Whether the answer is yes or no, I would appreciate a little
elaboration into why? For instance I don't have a clue on how many
simultaneous socket connections could be maintained by a high end
server for example with Amazon EC2 webservices.

Anyways thanks in advance if you start thinking with me! It is very
much appreciated.

Tim Caswell

unread,
Nov 28, 2011, 11:09:33 AM11/28/11
to nod...@googlegroups.com
It should be possible assuming that you don't plan on doing and video
encoding or decoding in the node process and your infrastructure can
handle the bandwidth. Node is pretty efficient at handling a large
number of concurrent connections.

I think the bandwidth issues will be harder than whatever node's task
will be in the system as a whole.

> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

Mark Hahn

unread,
Nov 28, 2011, 2:50:40 PM11/28/11
to nod...@googlegroups.com
Why not use wowza?  It can handle every video situation easily.  I got it running in a few days by using their aws machine image.  They have a deal with amazon where you don't have to have a license and it is almost free.

Simon Bailey

unread,
Nov 28, 2011, 4:31:58 PM11/28/11
to nod...@googlegroups.com
+1 for Amazon, I have built quite a few apps hooked into their EC2 instances with now major concerns at all.

Simon

Simon Bailey

unread,
Nov 28, 2011, 4:32:12 PM11/28/11
to nod...@googlegroups.com
Oops meant +1 for Wowza :P

Jim Barcelona

unread,
Nov 28, 2011, 4:54:07 PM11/28/11
to nod...@googlegroups.com
Yes.

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en



--
Jim "Barce" Barcelona
http://twitter.com/barce

Ted Young

unread,
Nov 28, 2011, 5:56:02 PM11/28/11
to nod...@googlegroups.com
What's a good solution if open source is a requirement?

badlearner

unread,
Nov 28, 2011, 6:54:52 PM11/28/11
to nodejs
+1 Ted: Is there a self-hosted, open source solution? (instead of
Wowza &/or Amazon etc)

talltyler

unread,
Nov 28, 2011, 11:41:20 PM11/28/11
to nodejs
There is this...
http://timwhitlock.info/blog/2010/08/07/node-amf-and-node-rtmp/
but as it says unstable, the rtmp protocol has many features and this
is just a start

This is one of the more popular open source solutions it's a java
server but I'm but sure I would use this either
http://code.google.com/p/red5/

A C Server with less features from what I have seen but seems like a
good candidate for wrapping into a module
https://github.com/itkz/librtmp

Python servers, also valid options
https://github.com/hydralabs/rtmpy
https://github.com/arkadini/twimp

You are talking about Flash Media Server and what can be done with the
RTMP protocol.
There isn't as far as I know any good way to do all of the things you
are talking about with HTML5 video tags but the chat, drawing, sharing
stuff can all be done in many other ways with out all of this. The
video and audio streaming is the hard part.

There is a lot of room for improvement with these technologies but as
others say this portion of the problem is only a small part. Dealing
with the bandwidth and the processing of the video at any scale is
more than writing a single node app, you need to build a whole server
infrastructure. Node would be a great tool to use to build all of
this, it's just a lot of custom work and there are a lot of people
that do it with closed source services already. Things like
http://www.tokbox.com/opentok/api and youtube have this market pretty
under control and if you need more you can pay a little and use wowza
or any of the other hosted solutions for often far less than hosting
this stuff yourself.

-Tyler

Julio Napurí Carlos

unread,
Nov 28, 2011, 11:47:36 PM11/28/11
to nod...@googlegroups.com

Marnix Valentijn Puijker

unread,
Nov 29, 2011, 11:58:28 AM11/29/11
to nod...@googlegroups.com
Thank you all for your input, it is helping me a great deal. I notice a lot of technologies passing by written in other languages,
does this mean that in javascript/node.js there are no good RTMP / RTMPS client/servers written yet? And if this is the case, what are the thoughts about this? Is this because Javascript isn't very suitable for it or are there other reasons?

jmartins

unread,
Nov 29, 2011, 2:50:52 PM11/29/11
to nod...@googlegroups.com
No, It's not true.

Nodejs is very good to streaming audio and video, but nodejs is a new technology, so it's don't have a lot of softwares yet.

do you know popcorn.js is a really good ideia in nodejs.

regards
joao


Ted Young

unread,
Nov 29, 2011, 3:09:03 PM11/29/11
to nod...@googlegroups.com
Yeah, the problems with open source video:

1. It's hard
2. Flash is all proprietary protocols, and currently the only way to access the camera from the browser.  I think this kills some of the open source initiative
3. Flash is on it's last legs.  Which is also killing some of the initiative for starting new projects based on their protocol

Ted 

Mark Hahn

unread,
Nov 29, 2011, 3:09:04 PM11/29/11
to nod...@googlegroups.com
Nodejs is very good to streaming audio and video 

I don't have numbers to back this up but I don't see how node could compete with the commercial offerings that are tuned c++ apps.

Tim Caswell

unread,
Nov 29, 2011, 3:18:19 PM11/29/11
to nod...@googlegroups.com
No, you can't do video transcoding in javascript, that would be
insane, but if you're just handling opaque bits and shuffling them
around, node is pretty fast. It beats nginx in some cases serving
static files. Don't assume node is too slow for something unless it a
very number crunching intensive task.

Mikeal Rogers

unread,
Nov 29, 2011, 6:16:44 PM11/29/11
to nod...@googlegroups.com
Brendan's current demo he's showing around at conferences is an h264 decoder, called broadway, in javascript that runs amazingly on RiverTrail.

Reply all
Reply to author
Forward
0 new messages