

Show HN: live video rap battles, running on node.js/opentok - jamespitts
http://rapt.fm

======
jamespitts
Here's a doc describing the basic architecture:
[https://docs.google.com/a/rapt.fm/document/d/1EpiKZG7MTNgc4_...](https://docs.google.com/a/rapt.fm/document/d/1EpiKZG7MTNgc4_ZLagiPaObfVqN9F6XHMpq7m9dzLhU/edit)

Battlestar Raptica is more distributed than described in this doc, though
(some prominent local rappers visited us tonight).

~~~
zaroth
Really informative write-up, thanks for posting that!

One thing I didn't see is how video is encoded and routed, although perhaps
this is all decided by your using opentok. I assume video goes from rapper to
your opentok server and then out to each client. Does opentok handle multi-
bitrate encoding and that sort of thing to support a wide range of clients?
Would love to hear more about how much work it was getting the video to be
"good enough" versus how much went into the rest of the functionality
(matching, voting, UI, JavaScript)

Can you give any broad idea of what you're spending on infra and how many
battles/viewers you can host at that cost?

~~~
jamespitts
Opentok is really the best way to do this right now, if you're small and
trying to build something creative with real-time video. I am guilty of
treating their system as a black boxen though. I know it from the API which
gives you a lot of flexibility about how video streams are shared, who gets to
publish, and who can record.

We've been putting in various optimizations to reduce our costs (now that we
got it basically running well enough to elicit a suspension of user
disbelief). Without revealing too much, it is running in the low dollars per
hour range to support users in the hundreds per hour range.

Also, I built a way to manage amazon EC2s using perl and rex. Definitely check
this out, it is really easy to deal with.
[http://rexify.org/api/index.html](http://rexify.org/api/index.html)

------
zaroth
Cool site. I'm not your target market, but I'm curious if you could reuse
heavily to do the same thing for online debates, perhaps even training and
support.

Does opentok give you the option of archiving the video and playing back "epic
battles"?

Looks like this uses flash. Unfortunately iOS Safari doesn't support WebRTC
and Apple isn't saying anything about their plans, if any, to add it.

OpenTok does have an iOS SDK so you could make a native app to connect to the
video streams. Would that interoperate with the flash clients you are
currently using, or would you have to switch to WebRTC in the browser at that
point?

~~~
jamespitts
Going native is a great idea that we've been considering, it would make
support easier for sure!

RE: ios... getting this to work for the web was an epic struggle, but we're
out of the thick of it and it would be cool to have a simplified version for
when you want to rap at a random spot.

Opentok's webrtc is not working well enough for us to use in primetime yet. We
have been testing it out a lot though, and it is amazingly good stuff when you
have your ducks lined up -- looks a lot better, connects a lot faster.

~~~
zaroth
"Epic struggle" is sort of what I expected you would say. The world would
benefit from a detailed writeup of how you got video working to your
satisfaction, please tell us about the missing functionality you wish was
there, what were some of the trade-offs you had to make, and maybe even some
open source? :-)

