Hacker News new | past | comments | ask | show | jobs | submit login
Building Cloudflare TV from Scratch (cloudflare.com)
176 points by mxschmitt on July 7, 2020 | hide | past | favorite | 40 comments



It’s an interesting experiment, albeit one that doesn’t make much sense to me from a product perspective. I guess producing the content at a loss is something Cloudflare is uniquely positioned to do. And it’s probably a good chance to dogfood some video delivery products.

Personally, I would almost always prefer a blog format over a live segment. If it is a live segment, then I’d hope I can at least watch the recording later.

I’m curious about engagement. Is anyone watching this? Does anyone seem to actually care?


Maybe they are actually testing for a new Cloudflare service. Lot’s of public officials for example are running live covid update sessions. Companies are broadcasting general meetings, artists are having virtual live concerts.

Resliable and scalable distribution platform for live video that plugs into existing tools could be of an interest.


Yeah, I'm not sure what are they thinking... i have some calendar reminders popup from time-to-time on an interesting _broadcast_, but not once i actually sit down to watch it. Shame, as there're 4-5 programs every week i would be happy to watch on-demand


I asked about this, they’re working on making them available on demand :)

src: https://twitter.com/cloudflarehelp/status/127293910658317107...


Cloudflare already has a video ingestion, encoding and streaming service, this is very likely dogfooding of that. Also when launching that service they seemed to imply that they they generally buy bandwidth at fixed costs, so all the edges in the world where the population is currently sleeping are unsaturated. They stream the video off those edges, so really its no skin off their backs.


How does streaming video from the other side of the world make any sense? Doing some basic looking, Cloudflare TV does not seem to be coming from my nearest POP, but the next nearest one (which is also much bigger). Definitely not the other side of the world.


Video isn't particularly latency sensitive. If I had infinite resources to design a complex system I would serve the first couple of chunks from the nearest POP to get the stream started and once I had enough of a buffer I would start optimizing for serving cost.

You don't need to move it around the world (TCP can start to bite you, but most likely you are just wasting someone else's network resources) but you can definitely move it away from the nearest POP if it is getting loaded. You can even do clever things like shard by chunk ID across warm POPs so that you get better cache utilization and reduce disk load.


Because we've reached a point where the video bandwidth requirements are much lower than what most people's connections and certainly server connections provide. So I can send you the first 10 seconds of video immediately from the nearest edge within a second or two, and spend the next eight seconds bringing you the subsequent video data from whatever edge in the world is the most underutilized. You wouldn't be able to tell the difference.


It seems to me that someone told the marketing team to burn money in a creative way. And they did.


Here's the original motivation for the project:

https://blog.cloudflare.com/ladies-and-gentlemen-cloudflare-...


Very cool for multiple reasons! The first is that it seems a lightweight and straightforward approach to launch first and thereafter iteratively improve, e.g. using Zoom to push live video to Cloudflare. Secondly the content, while all Cloudflare-related, seems useful to learn about internet infrastructure, etc.

Perhaps the elephant in the room is "what's next"? Seems like it could at least become a Twitch competitor, if not also to YouTube if Cloudflare is able to figure out the monetization, privacy and copyright aspects.


Given all the important things sitting behind Cloudflare, how do you justify having Zoom installed on employee machines?


> When the live programming ends at 1100, the video experience would break and the user would need to hit refresh to see the next show on the schedule.

If that was the only problem, why wouldn't changing the stream with a small amount of JS have worked rather than having to add a muxing layer in front of the streams?


1. This might not be built in a browser. e.g. Hulu or ESPN iOS app. Although any client of the byte stream could implement the "refreshing" protocol on the client, its more work for each client to do.

2. Given this is Cloudflare they are probably trying to find optimal ways to use bandwidth and their edge fleet. Like TV, maybe there will be no "rewind", and each Cloudflare edge server fans out the same "currently live" bytes to all available clients (i.e. shared state across all client connections, rather than independent state for each client connection). Which can't happen if there is a "refresh" event from each client that needs to be synchronized.

3. "refreshing" implies new state, added latency, and a "janky" feel. If "transitioning" is all server side, bytes from the next "episode" can be pipelined before the previous episode is finished and the refresh event has occurred.

    |-Episode A->|
    |-Episode A->|
    |-Episode A->|
    |          <-|
    |     <--Refr|
    |<--Refresh--|
    |->          |
    |de B->      |
    |-Episode B->|
    |-Episode B->|
    |-Episode B->|
Rather than:

    |-Episode   A->|
    |-Episode A/B->|
    |-Episode A/B->|
    |-Episode   B->|
    |-Episode   B->|
    |-Episode B/C->|


Breaks/introduces annoying amount of lag for people using things like mpv for an "actual" live television experience would be my guess.


This is just a guess, but JS only works in the context of a website, and it might actually be simpler to control the server side muxer without having a whole bunch of logic and the systems to support it.


I wonder if they have plans to expand to non-browser viewports?


They do. From the last section of the article, entitled "Thinking Ahead..."

> Bring Cloudflare TV to platforms like Apple TV and Roku


Is cloudflare at a scale where it would be possible for them to provide cheap enough prices on video hosting and bandwidth to enable someone to build a profitable YouTube alternative on top of that? Assuming that a youtube competitor can get to similar scale and make similar revenue.


The competitive advantage of YouTube isn't really in video storage or bandwidth, but rather in its creators community and ad revenue sharing/monetization. Also copyright, regulatory compliance, content moderation are non-trivial.

These are the causes (among many others) that sunk Microsoft's Mixer and potentially Facebook Watch...


No, it needed network and storage first, losing billions for years in order to supply the creators with a service. The non-trivial factors could be trivialized by better community moderation features and niche networks.


youtubes competitive advantage is search... that plus the simple scale of users and content.


> youtubes competitive advantage is search

How? YouTube videos aren't all that prominent on Google and its search features are rather terrible.

What they do have is a semi working recommendations system. How hard would that be to replicate?


They have a service for streaming stored video.

”$1 per 1,000 minutes viewed, $5 per 1,000 minutes of video storage”

https://www.cloudflare.com/products/cloudflare-stream/


I'm scared to calculate how much it would cost to run YouTube off of that.

Many years ago I remember that YouTube reported that 24h of video was uploaded every second. This means that your storage cost would increase by $432/s or $37M/d. This means that you are paying 14B/month by the end of the year just for storage.

Of course there are a number of factors that will work in your favour here: - You can attempt to focus on only hosting "popular" content instead of allowing anyone to upload. However this can make it difficult to draw new creators to the platform. - You can definitely negotiate a better rate.

However I'm still under the impression that if you want to create a YouTube competitor you are probably better of starting with lower level components so that you are in a position to reduce costs for old and low traffic videos. My impression of Cloudflare Stream is that it is aimed for people sharing a relatively small amount of content (probably just their own).


I can't wait for this to become available as part of Cloudflare Stream!

I need a simple API that would allow both a basic user with browser and a webcam, or an advanced one with OBS (RMTP...) to just live-stream as part of my product. And building everything at scale is just super painful.


Seems very close to "rolling your own (internet) TV station using open source and Zoom".

That's exciting that it's become so accessible.

Of course the hard part then is having a producer running the content all day + getting enough content.


> the hard part then is having a producer running the content all day + getting enough content

If I'm managing a local access/community TV/open studio system right now, I'd be pulling as much inspiration as possible from this post and working to deploy something similar ASAP. Those places already have the content, and their cable and broadcast reach is either less viable or actively reduced each year.


Hmmm.. works in Chrome but not Firefox for me. Firefox plays the live stream but not recorded videos.


Will there be any support for DRM or video protection?


It's 2020, shouldn't we have learned by now that DRM software is pointless in almost any situation?


If it is pointless in 2020, why does Netflix have DRM then?


Wild guess (I really have no idea): Because otherwise they wouldn't get the licenses for their bought content to begin with?

Netflix themselves probably couldn't care less; they know that everything they offer for streaming will be available for pirating the second its released, with or without DRM; people have Netflix because its convenient, not because they cannot pirate their content.


That only shifts the blame to the contenc owners though; they still hold on to the idea that DRM will somehow keep their content unpirated while it really has the opposite effect.


Yes, and I blame bureaucracy for making it hard to say no to ineffective ideas. "You mean you want it to be easy for people to steal our content‽" I think the world has a hard problem saying no to ideas because they cost too much. Even if it has a minor effect it must be done!

But there is one real benefit of DRM, cracking it is illegal. Of course my understanding is that they would get the exact same legal protections here if they just XORed every byte with 0x42 so it doesn't justify the spend, user inconvenience and complexity of current DRM systems.


Isn't live video just bytes being relayed around, thus you can serve encrypted content and have something in the client decrypting it into playable video?

If so you can reuse everything that the satellite TV industry (one single feed being broadcast across the entire continent) for their pay-TV DRM.


No.

You have to handle key rotation and a thousand other variables, it's a very different environment.


It doesn't appear so, but it doesn't look like this infrastructure is intended for professional entertainment video services, but more "are you a large company that wants to do your PR friendly guff via video rather than text."


> Cloudflare TV is a 24x7 TV channel that takes you behind-the-scenes and let’s you hear directly from the builders working on your favorite Cloudflare products.

So 24x7 monitoring of developers' screens overseen by the world? RIP devs X_X


No, not that at all.

Has anyone online ever done a “so what you mean is..” and got it right?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: