from Hacker News

How I Made Porn Video Streaming More Efficient with Python and C

by crm416 on 5/3/13, 4:40 PM with 112 comments

  • by danso on 5/3/13, 5:49 PM

    I sympathize with why the mods changed the title from "Porn" to "Video", but now you've made it so that HN users are unwittingly clicking into an article that talks about porn, in such a way that could be detected by a workplace firewall. That's not an ideal usability decision. Why not use good ol square brackets to maintain the integrity of the title:

    How I Made [Porn] Video Streaming 20x More Efficient with Python and C

  • by jallmann on 5/3/13, 5:30 PM

    Agreed that RTMP is an abomination that needs to be exorcised from the Earth as soon as possible. Unfortunately, it is probably here to stay until something like WebRTC gains critical mass.

    It's not clear what the article means by "repackaging" a stream or "pointers" to tags (especially in the diagram that shows tag pointers being transported between users). While RTMP is cumbersome, shoving media data (tags) under a per-session protocol header is essentially the standard way of moving data from one session to another.

    So I'm not really following this. Is this cutting out the RTMP entirely for receiving clients, and instead sending the FLV down via another transport, like HTTP or whatever? Or is it more of, "I wrote my own RTMP streaming server in C and Python", along with some implementation details which I'm not understanding? (Not that there's anything wrong with doing so. Options are limited in the streaming-server space.)

  • by hardik988 on 5/3/13, 6:11 PM

    I appreciate the effort the mods take in curating titles, I really do - but please spare articles like this at least?

    I clicked on this link at work (part-time at grad-school) and now I have a "how to run a pornographic website faster" link logged in my name.

  • by kbenson on 5/3/13, 5:04 PM

    I love reading articles about technical issues and solutions in the Porn industry. It's like getting a peek inside a youtube scale company as they grow.
  • by coldtea on 5/3/13, 8:26 PM

    I'm astonished by some of the responses here, that could be summarised thusly:

    >"I work on workplace, in a modern western society, not some theocratic backwater, that monitors my web activity and would frown if I visited an article with the word porn in it. This on 2013. I find this OK, and won't quit my job or raise hell protesting this degrading treatment, but would rather complain for HN titles".

    In an age where people fight for LGBT rights, this is what the American workplace has come to?

  • by xSwag on 5/3/13, 5:12 PM

    >The aggregated bandwidth of the clusters was around 50 Gbps, from which they used around 10 Gbps while at peak load.

    Now that is a lot a porn.

    Also, the illustrations look really good! How did you make them?

  • by toptal on 5/3/13, 5:08 PM

    Hey this is awesome! Though the admin/moderator changed the title for some unknown reason from the title of the blogpost to their own.
  • by ianhawes on 5/3/13, 11:18 PM

    If anyone is interested in an alternative to the usual RTMP servers (FMS, Red5, and Wowza), I highly recommend EvoStream (http://www.evostream.com). Compared to the alternatives, EvoStream is much more efficient. I believe TinyChat published a whitepaper discussing their transition from Red5 to EvoStream, which resulted in a decline in the number of required servers.

    EvoStream is a highly scalable streaming media server written in C++ based off of the open source RTMPD (http://www.rtmpd.com). The commercial company, also called EvoStream, is a relatively new startup and they do great custom work for those not familiar with streaming media/RTMP.

  • by lmm on 5/3/13, 5:03 PM

    It's easy to underestimate the power of switching to a better language by just doing it - guess at the syntax until it works, then refactor as you start to understand the language and its culture more. In fact I've found I learn faster this way than any other.
  • by chopsueyar on 5/3/13, 7:47 PM

    Is this similar to what Wowza (wowzamedia.com) does?

    In terms of licensing, it is $55/mo/instance or $995 for a one-time license.

    There are also EC2 instances that start at 15 cents per hour.

    Much less expensive than FMS

  • by dangayle on 5/3/13, 7:02 PM

    I got hit with a firewall and a "This event will be reported".

    Thanks, HN Moderator.

  • by buster on 5/3/13, 7:16 PM

    Strange how 3/4 of the comments are more concerned with the title link, instead of the actual content.

    Very nice post, was an interesting read!

  • by nacho2sweet on 5/3/13, 9:22 PM

    LOL at everyone who works at places that fear that the company firewall saw them read an article that had the word "Porn" in it.

    Hopefully you get in trouble and fired, it will help your life in the long run.

  • by latchkey on 5/4/13, 3:34 PM

    As someone who built the infrastructure for serving porn for Kink.com, I'd say that this was a total waste of time. Spend the money on a third party CDN and serve from there.
  • by mezeek on 5/3/13, 5:08 PM

    This title and the article's title don't quite match...
  • by tarikozket on 5/3/13, 5:15 PM

    What service do you use for flowcharts?
  • by ConceitedCode on 5/3/13, 7:33 PM

    Is there an open source project that accomplishes something similar?
  • by jneal on 5/3/13, 7:09 PM

    I know others already said this, but I clicked on this link from work and immediately became appalled when realizing it was about porn and quickly backed out. I'd gladly read this from the comfort of my own home and I'm sure the content itself is SFW but still the point is I was mislead. Can we please [mods] not change titles in cases like this?
  • by jeremyx on 5/3/13, 6:35 PM

    What is the association with this site toptal.com? Has anyone here ever worked with them before?
  • by i5rider on 5/3/13, 5:22 PM

    Great work. I worked with RTMP for some time and I recall the pain to reverse-engineer their protocol. One other comment, maybe the title should be more like: "How I improved a slow/inefficient RTMP video streaming service by 20x". Just a thought.
  • by ckdarby on 5/3/13, 6:36 PM

    Nothing open source in this article which was the biggest drawback of me reading this.
  • by proland on 5/3/13, 7:32 PM

    If you're going to change the title, at least add NSFW to it...
  • by ericcholis on 5/3/13, 7:59 PM

    The network graphics are pretty sharp, anybody familiar with where they came from? Or, are they custom?
  • by mariuolo on 5/4/13, 2:23 PM

    Why is the type of content relevant? Perhaps there's something peculiar about porn users?
  • by coherentpony on 5/4/13, 3:26 AM

    Congratulations to whoever messed with the title; I clicked this at work.
  • by serginho on 5/3/13, 10:43 PM

    I've never expected that the story would be about porn.
  • by atechnerd on 5/3/13, 6:59 PM

    More efficiently? For two minutes of video? I could see if you were trying to stream Zombieland or Spaceballs... but porn?!

    I guess whatever inspires people to innovate is okay with me.