Is Our Javascript Code Viewable by Browsers, etc.

Started by
22 comments, last by swiftcoder 5 years, 10 months ago
On 5/24/2018 at 11:51 PM, SkyPenguin said:

youtube/netflix utilize an encoded stream to stop most (not all) piracy. Downside (beyond the difficulty of building such a thing) is that it takes about 25 times as much processing power as just streaming normally because the site uses some custom decrypter to decrypt the stream in real time. Also takes like 2-4x as much ram i believe... Ty youtube for chewing up my battery life to stop piracy?

Got some citations to quote for those figures?

The only "protections" I'm aware of YouTube employing are piecewise delivery of the unheadered video stream; they don't make something so blatant as "an MP4 file" exposed at a URL, but instead deliver chunks of the video progressively as you play. If you want to "rip" the stream, you have to play it effectively "normally," and can't just download a single file containing the entire video. There is no high-CPU-cost decryption going on that I've seen evidence of.

By serving video chunkwise, this costs less data transfer, disk-as-cache space, and RAM overhead as downloading all or nearly-all of the video ahead of time, with the (often inconvenient) tradeoff of clamping the best resolution you can experience not to the screen or hardware you have, but to the bandwidth you can afford.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
Advertisement

the figures are merely anecdotal, and some is due to streaming over the internet vs from a hard drive, but Netflix uses some pretty potent DRM that requires streaming decryption. Youtube as well has used DRM for a number of years and switched to HTTPS streaming for all vids around 2016 which adds some processing for decryption. Again, no exact figures. According to https://www.theverge.com/2016/8/1/12341686/youtube-google-traffic-https-encryption-protected Youtube claims that the additional overhead isn't much for devices already capable of streaming video. Which is arguably true if you assume everyone's running around with only one tab. If you have 20+ tabs like me and many others then that extra 5, 10, 50% of overhead adds up quick.

Could these services be provided using less processing power and memory? Absolutely. To what degree... tough to say.  Especially if you have the vid quality set to auto.

2 hours ago, SkyPenguin said:

switched to HTTPS streaming for all vids around 2016 which adds some processing for decryption. 

TLS (the encryption used in HTTPS) is basically free on modern CPUs. There is native hardware support for the most popular cyphers.

Netflix does rely on the DRM provided by various platform vendors (WideVine on Google platforms, FairPlay on Apple). But those add very little overhead to streaming playback - most of the work is done at the beginning of the stream, when keys need to be exchanged.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement