How I Made Porn Video Streaming More Efficient with Python and C
toptal.com
toptal.com
How I Made [Porn] Video Streaming 20x More Efficient with Python and C
How I Made Porn [Video Streaming] 20x More Efficient with Python
as technically the editor notes are bracketed.
If you get heat about things like that in your workplace, then run, don't walk.
I don't mean to be a hardass, but... citation needed.
Seriously, we have no data on the number of mod edits made vs. complaints voiced. As such it seems premature to conclude that mods mostly do a good job with these arbitrary edits.
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.)
>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).
By repackaging I meant extracting the FLV tags which pretty much travel in the same format as in an FLV stream (.flv file) if memory serves well. Pointers to tags refer to the internal implementation. I took the FLV tags out of the RTMP stream, which resulted in an almost complete FLV stream. With the proper header prepended to it you could save it as a file and play it or stream it and play it. That's just what I did, created a header for every new user, and after that was sent I could just stream the FLV tags from a common buffer. The users had pointers that pointed in this buffer so after the header is sent it was true multicasting.
> 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.)
Yes. From the source RTMP stream I extract the FLV tags, which I could use to multicast. Sending the same RTMP stuff to every user would not work, but I can easily send the FLV tag stream over HTTP if I send the crafted header first.
I hope that helped
I assume you don't really mean IP multicast (which would, incidentally, be one approach to edge-origin mirroring for the popular marketing campaigns you mentioned, at least within a data center).
Anyway that makes sense, simply sending the FLV is clever. What's the method of delivery -- chunked HTTP? Does it play well with proxies?
Actually bringing up the proxy issue is interesting. I'm not sure if it does. Essentially forbidding all caching would make it play nice.
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.
It being common just makes it even more funny.
The comments here have double that, including your own use. If you were genuinely that paranoid about being "logged" for having visited a page that used the word porn (really?!) I doubt you'd be using it yourself.
I'm just saying that it could get someone into trouble.
As far as the "logging" goes, it had more to do with the word porn in the title of the page, because many content-filters just parse the title for blacklisted words.
http://www.extremetech.com/computing/123929-just-how-big-are...
"In short, porn sites cope with astronomical amounts of data. The only sites that really come close in term of raw bandwidth are YouTube or Hulu, but even then YouPorn is something like six times larger than Hulu."
>"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?
I don't agree with the decision not to protest, and I don't think HN should really care about catering to that demographic, but I understand their motive.
I work at a small company where no one would care. They also don't care if I spend time on Facebook, Twitter, etc. etc. But not everyone is in a company like that. Big legacy companies hire from the HN crowd too. Whether or not their policies are fair is not always a simplistic argument. However, what is as sure as rain is that trivial violations of those policies can be used as leverage to punish people, when the office politics get dirty and desperate.
It's best to let the worker -- the HN reader in this case -- make the decision whether he/she wants to pick that fight, rather than have them accidentally stumble into it.
Since people let them get away with it. The "agreement that involves paying that employee's salary" does not meant they should get away with treating him less than a civilized society accept.
Signing a contract to work on some place doesn't give the employer any inherent rights over the employee, besides those that the society is willing to accept.
Hitting an employee was once tolerated. Not so anymore. One time not hiring or paying blacks less was allowed. Not so anymore (not explicitly at least). Child labour was allowed. Not anymore. Racial or sexist slurs were allowed. Not anymore. Lax safety at work was tolerated. Not anymore.
So it's not like there is some undeniable inherent right of an employeer to "have the employee pee in a cup" or to "check his Facebook profile". It's just that people haven't protested enough to make it into law that it's not his fucking business what the employee does at his own time.
>It's best to let the worker -- the HN reader in this case -- make the decision whether he/she wants to pick that fight, rather than have them accidentally stumble into it.
Sure, but at least some anger should be directed against businesses having those policies, not just on HN titles, as if the policies are OK.
That's the implicit link. The explicit link is that LGBT advocates and activists have frequently defended porn and freedom of sexual expression through it, too.
That was a poorly-source, probably-made-up story that now one could verify yet quickly became accepted truth. (Unless it's meant to refer to cases involving heavy security clearances, in which cases it's ho-hum)
Yes. With a lack of privacy expectations in 2013, any visited website is permanent added to the record. Even with no paranoia, it does add an unnecessary risk to ones career.
Now that is a lot a porn.
Also, the illustrations look really good! How did you make them?
popcorn? preworn?
% egrep '^p.*orn$' /usr/dict/wordsEvoStream 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.
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
And to answer your question, Wowza is just a cheaper FMS which also supports other platforms next to RTMP. This article is basically taking the more performant HTTP download mechanism for static content (like YouTube uses) and then hacking it to put a live stream in it instead.
Thanks, HN Moderator.
Very nice post, was an interesting read!
So not strange, methinks. :P
Hopefully you get in trouble and fired, it will help your life in the long run.
One fun bit that I built is called the cockblocker (as you can imagine, we used all sorts of fun names for internal projects). People who repeatedly attempt to hack the system (usually through various forms of abuse like failed login attempts) would automatically get their IP address routed to /dev/null.
There are also red5 (http://www.red5.org/) and rtmpd (http://www.rtmpd.com/)
For the tech, well really at that place we used pretty much what everyone else did. Not a lot of big secrets, as far as I know the porn driving the tech revolution thing is ridiculous.
Anyway, my final experience with TopTal was that I asked some questions about the contract that I was about to sign and never heard back.
"For example, if the in-house engineers start their workday at 11am PST, our Eastern European toptal engineers will start working at 7pm EET and work through the night."
"During work hours, they are expected to respond to any client communication within 10 minutes; during non-work hours, they are expected to respond within 3 hours."
I guess whatever inspires people to innovate is okay with me.
Actually this was a website which streamed online broadcasts live from people, like ustream does but with adult content. Some broadcasts could be hours long.