5 ms·
We built this in about 3 days of work on top of the Justin.tv platform, I'd be curious to hear what the HN community thinks about it. I've set up an invite code
by emmett 17y ago
We built this in about 3 days of work on top of the Justin.tv platform, I'd be curious to hear what the HN community thinks about it. I've set up an invite code so you all can try it out.
- grinich 17y agoWhy don't you have a native iPhone app?
- emmett 17y agoBecause you can't stream live video to or from the iPhone over 3G yet, and it only works for h264, so it's fairly pointless. The existing apps are pretty much crap because of Apple restrictions. We're ready to pounce if and when we think it's a good idea.
- DarkShikari 17y agoBecause you can't stream live video to or from the iPhone over 3G yet Yes you can; we've already done it. A coworker of mine hacked together an app to do it in a day or so. There's also some companies offering services to do it for you (Ripcode, etc). and it only works for h264, so it's fairly pointless. It's fairly trivial to do realtime transcoding (x264+ffmpeg+segmenter).
- rdouble 17y agoIsn't the issue that Apple won't let such an app on the store? (i.e. not a technical issue with the phone)
- DarkShikari 17y agoYou don't need an app to stream video to the iPhone; you can use the existing video player. For video streaming from the iPhone, I'm not so sure, but I'd think you could use their existing functionality (but don't quote me on that).
- kvogt 17y agoTry doing faster than realtime transcoding of 2000 simultaneous streams. Not that trivial.
- DarkShikari 17y agoLet's do some math then. Let's assume the videos are 320x240, for example. Since we have so many streams at once, we can assume perfect scaling across multiple cores and systems. A 320x240 video encodes at about 195 FPS on my Core 2 Duo Conroe 2Ghz with one encoding thread, using x264 and preset "veryfast". Now, if we go up to a Quad at 3Ghz and use all four cores, we're up to 1170fps. A Penryn is about 10% faster per-clock than a Conroe on x264. We're up to 1287fps. A Core i7 is about 40% faster per-clock than a Conroe on x264, including the effects of Hyperthreading. We're up to 1802 FPS, or 60 streams, and we haven't even left our single processor. For all 2000 streams, we'll need 33 CPUs, or maybe a few more if we allow for a bit of overhead, just in case. Not that hard now, is it? Bonus points: you save bandwidth, since H.264 compresses a lot better than Sorenson H.263 (FLV1). (Also, preset "ultrafast" is another factor of two faster than that, though the quality is low enough that nobody should be using it...)
- jacquesm 17y agoIn practice you are not going to be doing nearly as good as that. your co-workers hack notwithstanding. Assuming 'perfect scaling' and discounting such things as networking overhead are going to upset that picture by a considerable amount. You'll be lucky to get to 500 Mbit out per physical machine using 16 cores and streaming to about 2000 users with 75 incoming streams. So that's roughly 5 streams per core. To just multiplex 2000 streams to 40 K viewers with adaptive frame rate you'll need roughly 30 sixteen core machines, note that that does NOT include transcoding yet.
- DarkShikari 17y agoYou'll be lucky to get to 500 Mbit out per physical machine using 16 cores and streaming to about 2000 users with 75 incoming streams. So that's roughly 5 streams per core. Why do you have the same computers handling encoding as distribution? That's stupid. To just multiplex 2000 streams to 40 K viewers with adaptive frame rate you'll need roughly 30 sixteen core machines, note that that does NOT include transcoding yet. Then your multiplexer is unimaginably inefficient. Last summer I worked for a company that multiplexes live streams for millions of viewers; it is not as hard as you think, especially since you only have to do the work once per channel, not once per user, since all users watching a given channel receive the same stream.
- emmett 17y agoIt's not technically infeasible; we've built a tech demo of it as well. It's a political problem - Apple won't approve your app.
- grinich 17y agoWhy is h264 pointless? I know that you can stream live video to the phone. There was an entire session dedicated to it at WWDC. Check out MLB at Bat for an example. http://mlb.com/mobile/iphone/ http://mlb.com/mobile/iphone/ CNN also has a streaming app. Why do you guys think it's not a good idea right now.