10 ms·
The first Media over QUIC CDN: Cloudflare
- cchance 1y agoHow does MOQ handle failback resolutions and graceful degradation? Not sure why in zed, full screen doesn't actually full screen properly
- prettyman 1y ago[dead]
- madsushi 1y agoRelated, the WARP streaming protocol, as a candidate for what would ride over MoQ: https://datatracker.ietf.org/doc/draft-ietf-moq-warp/ https://datatracker.ietf.org/doc/draft-ietf-moq-warp/
- kixelated 1y agoHi I originally wrote WARP and used something similar at Twitch. It supports CMAF segments, so the media encoding is backwards compatible with HLS/DASH and can share a cache, which is a big deal for a gradual production rollout.
- madsushi 1y agoThanks for the info! I was reading up on CMAF after seeing it mentioned on your blog.
- kixelated 1y agoYeah, and CMAF is just a fancy word for fMP4. The f in fMP4 meaning an MP4 file that has been split into fragments, usually at keyframe boundaries, but fragments can be as small as 1 frame if you're willing to put up with the overhead. The Big Buck Bunny example on the website is actually streamed using CMAF -> MoQ code I wrote.
- englishm 1y agoYes, exactly! I mention that in the post. Streaming formats are where a lot of interesting decisions can be made about how best to optimize QoE for different use cases. MoQT is designed have enough levers to pull to enable a lot of clever tricks across a wide gamut of latency targets, while also being decoupled from all of the media details so we can get good economies of scale sharing fan out infrastructure. WARP's development (at the IETF) up until now has been largely spearheaded by Will Law, but it's an IETF spec so anyone can participate in the working group and help shape what the final standard looks like. WARP is a streaming format designed mainly for live streaming use cases, and builds on a lot of experience with other standards like DASH. If that doesn't fit your use case, you can also develop your own streaming format, and if it's something you think others could benefit from, too, you could bring it to the IETF to standardize.
- englishm 1y agoHi! Cloudflare MoQ dev here, happy to answer questions! Thanks for the award, kixelated. xD
- combyn8tor 1y agoIs the load balancing of the relays out of scope? It doesn't seem to be addressed in the write up unless I missed it.
- kixelated 1y agoEDIT: Sorry I just noticed this was directed to Cloudflare. They're using the same architecture as Cloudflare Realtime, their WebRTC offering. `relay.moq.dev` currently uses GeoDNS to route to the closest edge. I'd like to use anycast like Cloudflare (and QUIC's preferred_address), but cloud offerings for anycast + UDP are limited. The relays nodes currently form a mesh network and gossip origins between themselves. I used to work at Twitch on the CDN team so I'd like to eventually add tiers, but it's overkill with near zero users. The moq-relay and terraform code is all open source if you're super curious.
- nonane 1y agoHome much success have you have with GeoDNS? We've seen it fail when users are using privacy respecting resolvers like 1.1.1.1. It gets the continent right but fails on city/state level.
- kixelated 1y agoIt works well right now because there's only one edge per continent. But if I had traffic, anycast is definitely the way to go.
- bushbaba 1y agoAnycast can have serious reliability challenges. It was common at GCP for a small QPS user of anycast to have their Load Balancers nuked in a given pop as it was backed by a single machine. But BGP showed it as still the best route. The major DNS based offerings don't have such issues.
- therein 1y agoPretty cool. Correct me if I'm wrong, this only works on Chrome?
- englishm 1y agoFirefox also has WebTransport support and Safari has a work-in-progress implementation behind a developer mode feature-flag. Safari used to not work at all, but I know they've been putting more effort into it lately, so hopefully we'll be able to use MoQ in all three soon!
- therein 1y agoI tried on FF (Floorp fork) and it said no browser support but I have all sorts of extensions like Chameleon etc. so it is probably a problem on my end that interfered with feature detection. Works really nicely on Chrome, though. Looking forward to the Safari support as I find myself using Orion more and more.
- pphysch 1y agoCould MoQ be used for low-latency multiplayer/game networking in the browser?
- englishm 1y agoIt could! We've mainly been focused on using it for audio and video for live streaming and RTC use cases, but the MoQT layer is very intentionally decoupled from the media details so the fan out infrastructure could actually be used for a lot of different things. You'd need to decide how you want to map your data to MoQT objects, groups, tracks, etc.
- pphysch 1y agoSweet, thanks! I'll tinker with it.
- englishm 1y agoYou might be interested in looking at this RTC example for ideas about how to make bi-directional data flows for arbitrary groups of participants (or players) work through a relay. https://hang.live/ https://hang.live/ It uses a feature we haven't yet implemented, but we're thinking about how we might implement it at our scale, SUBSCRIBE_ANNOUNCES[1]. [1]: https://www.ietf.org/archive/id/draft-ietf-moq-transport-12.html#name-subscribe_announces https://www.ietf.org/archive/id/draft-ietf-moq-transport-12....
- dang 1y agoComments moved to https://news.ycombinator.com/item?id=44984785 https://news.ycombinator.com/item?id=44984785, which has the original source. (Edit: I mean the announcement this article is reporting on.) Submitters: "Please submit the original source. If a post reports on something found on another site, submit the latter." - https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html Edit: since people seem to agree that this was the wrong move, I'm going to undo it. Edit 2: undone now!
- hn-user-42 1y agoWhat? did you check the source? he is the original guy.
- dang 1y agoThe article is about a Cloudflare announcement. The original source in that case would be the Cloudflare announcement, no?
- kixelated 1y agoHey dang, I don't think my blog is a repost. It links the Cloudflare announcement but the content is completely different (and actually funny). Is there any way you could restore it?
- dang 1y agoIt's not that it's a repost; it's that it's mostly reporting on the content of another article. In such cases it's standard HN practice to prefer the latter, as the guidelines say (and have said since ancient times). It's not that you did anything wrong! and I'm sorry, I know it sucks to have an article doing well on the frontpage and then plummet for no obvious reason. But from a mod practice point of view this is a pretty clear call.
- kixelated 1y agoI linked the URL to their relay but otherwise all of the libraries, demos, rants, jokes are my own. I can remove the link to their post if that would help, or I could get Cloudflare's blessing. It's just a bit frustrating.
- hn-user-42 1y agoSome interesting stuffs and more technical details https://moq.dev/blog/first-cdn/ https://moq.dev/blog/first-cdn/ https://moq.dev/blog/first-app/ https://moq.dev/blog/first-app/
- hn-user-42 1y agoI found your first app interesting. You should submit it as Show HN. I used to work in live video platform. I have found MoQ interesting enough to work on it again.
- kixelated 1y agoYeah I will soon, but I could also use the time to fix up some more stuff.
- wiradikusuma 1y agoSince it's "under the hood" as long as major browsers support it (I can't even find in caniuse?) it's good. And I guess if webview engines like Microsoft Edge WebView2 supports it then developers can use it immediately (wrapping it). But how about from the other side, I guess OBS and YouTube must start supporting it to actually be useful?
- englishm 1y agoSo... MoQ represents a bit of a moving away from the all-in-one "black box" of web APIs like WebRTC. From the browser perspective, the main thing that matters is the WebTransport API. Using MoQT in conjunction with that WebTransport API, you now have various options for rendering the video as a player, for example: WebCodecs. But, if you can afford a bit more latency, you can also use APIs like MSE for playback and be able to use DRM. And yeah, being able to publish from something like OBS is something I worked on before joining Cloudflare, but it depends a lot on what you do at the "streaming format" layer which is where all the media-aware details live. That layer is still evolving and developing with WARP being the leading spec so far. As that gels more, it'll make sense to bake things into OBS, etc. Already today though you can use Norsk (https://norsk.video/ https://norsk.video/) to publish video using a rudimentary fMP4-based format similar to early versions of the WARP draft. As for YouTube, Google has some folks who have been very active contributors to MoQT, but I'm not certain exactly how/where/when they plan to deploy it in products like YouTube.
- kixelated 1y agohttps://caniuse.com/webtransport https://caniuse.com/webtransport https://caniuse.com/webcodecs https://caniuse.com/webcodecs Technically, WebCodecs is not required since you can use MSE to render, but it's more work and higher latency. Working on a WebSocket fallback and OPUS encoder in WASM to support Safari.
- MattRix 1y agoA small note: I found the styling of your post made it annoying to read. You shouldn’t highlight key words so strongly, especially using the same green you’re using for links. It makes it take mental effort to tell them apart.
- brycewray 1y agoSemi-related and just FYI for Firefox users who visit Cloudflare-hosted, HTTP/3-using sites: https://bugzilla.mozilla.org/show_bug.cgi?id=1979683 https://bugzilla.mozilla.org/show_bug.cgi?id=1979683
- vient 1y agoLimited to macOS? Does not reproduce in FF 141 and 142 on Windows.
- brycewray 1y agoNo, I have also observed it in Firefox (via Flatpak) on Fedora Linux 42. When I filed the original GH issue that webcompat-bot turned into this Bugzilla item (https://github.com/webcompat/web-bugs/issues/168913 https://github.com/webcompat/web-bugs/issues/168913), my full report didn't make it into Bugzilla.
- joshcartme 1y agoIt reproduces for me in FF 142 on Windows. When I first went to https://cloudflare-quic.com/ https://cloudflare-quic.com/ it said HTTP/3, but after a few hard refreshes it says HTTP/2 and hasn't gone back to 3
- deleted 1y ago[deleted]
- vient 1y agoOh, I see - hard refresh consistently shows HTTP/2 but after one or two soft refreshes it becomes HTTP/3 for me until next hard refresh. Edit: it is always second soft refresh for me that starts showing HTTP/3. Computers work in mysterious ways sometimes.
- joshcartme 1y agoI restarted FF and am now seeing something similar. Hard refreshing alternates between 2 and 3, and soft refreshes quickly get back to 3 most of the time
- valorzard 1y agoQuic (ha) thing: Webtransport on Firefox currently has issues See: https://bugzilla.mozilla.org/show_bug.cgi?id=1969090 https://bugzilla.mozilla.org/show_bug.cgi?id=1969090
- barosl 1y agoI tested the demo at https://moq.dev/publish/ https://moq.dev/publish/ and it's buttery as hell. Very impressive. Thanks for the great technology! Watching the Big Buck Bunny demo at https://moq.dev/watch/?name=bbb https://moq.dev/watch/?name=bbb on my mobile phone leaves a lot of horizontal black lines. (Strangely, it is OK on my PC despite using the same Wi-Fi network.) Is it due to buffer size? Can I increase it client-side, or should it be done server-side? Also, thanks for not missing South Kora in your "global" CDN map!
- kixelated 1y agoHorizontal black lines? Dunno what that could be about, we render to a <canvas> element which is resized to match the source video and then resized again to match the window with CSS.
- chronicler 1y agoI have got same issue with the black lines
- Numerlor 1y agoDoesn't show up on screen capture, but there's random rolling quickly flickering lines on my phone, kinda like from analog distortion on old tvs
- chrismorgan 1y agoWhat’s that like for performance and power usage? I understand normal videos can generally be entirely hardware-accelerated so that the video doesn’t even touch the CPU, and are passed straight through to the compositor. I’m guessing with this you’re stuck with only accelerating individual frames, and there’ll be more back and forth so that resource usage will probably be a fair bit higher? An interesting and unpleasant side-effect of rendering to canvas: it bypasses video autoplay blocking.
- kixelated 1y agoIt's all hardware accelerated, assuming the VideoDecoder has hardware support for the codec. VideoFrame is available in WebGL and WebGPU as a texture or gpu-buffer. We're only rendering after a`requestAnimationFrame` callback so decoded frames may get automatically skipped based on the display frame rate. I don't think the performance would be any worse than the <video> tag. The only exception would be browser bugs. It definitely sounds like the black bars are a browser rendering bug given it's fine when recorded.
- templar_snow 1y agoGlorious.
- otterley 1y agoThere's a whole "why should I care?" section in this breathless post that doesn't explain how Media over QUIC benefits either media publishers or end users - the two most important (perhaps the only important) parties involved in this exchange. So, why should I care?
- kixelated 1y agoMy fault, I trying too hard to avoid rehashing previous blog posts: https://moq.dev/blog/replacing-webrtc/ https://moq.dev/blog/replacing-webrtc/ And you're right that MoQ primarily benefits developers, not end users. It makes it a lot easier to scale and implement features; indirect benefits.
- koolala 1y agoYour queue solution solves the SFU problem? The p2p quic ietf draft expired which stinks.
- perbu 1y agoEnd-to-end (glass-to-glass) latency is substantially better. Mostly because the protocol isn't request/response any more.
- xer0x 1y agoAwesome! Great job. I read this as first QUIC CDN, and thought that can't be true. Dug a little deeper and learned that Media over QUIC is it's own thing. Looks pretty cool.
- parhamn 1y agoThat "just announced" link is really good if you have no idea what this is about: https://blog.cloudflare.com/moq/ https://blog.cloudflare.com/moq/ (I missed it)
- tamimio 1y agoAwesome news, been following this for some time!
- NooneAtAll3 1y agoI'm terrified of what will happen when cloudflare-monopoly will eventually enshittify
- evilmonkey19 1y agoI love this project and I've been reading kixelated blog from time to time. I also follow him on Github. First of all, congrats for such nice work both kixelated and Cloudflare. I have a question regarding live-streaming. Usually live-streaming is seen but hundreds or thousands of people at the same time. Are there any idea to implement/possibility to use multicast with MoQ? The issue before was that TCP was used for HTTP/1.1 and HTTP/2, but now using UDP for HTTP/3 seems like a feasible idea. I would like to hear your thoughts on that. I know folks at Akamai and BBC were working on this.
- kixelated 1y agoThanks! You don't need multicast! CDNs effectively implement multicast, with caching, in L7 instead of relying on routers and ISPs to implement it in L3. That's actually what I did at Twitch for 5 years. In theory, multicast could reduce the traffic from CDN edge to ISP, but only for the largest broadcasts of the year (ex. Superbowl). A lot of CDNs are getting around this by putting CDN edges within ISPs. The smaller events don't benefit because of the low probability of two viewers sharing the same path. There's other issues with multicast, namely congestion control and encryption. Not unsolvable but the federated nature of multicast makes things more difficult to fix. Multicast would benefit P2P the most. I just don't see it catching on given how huge CDNs have become. Even WebRTC, which would benefit from multicast the most and uses RTP (designed with multicast in mind) has shown no interest in supporting it. But I did hear a rumor that Google was using multicast for Meets within their network so maaaybe?
- pthatcherg 1y agoI'm excited to see a major use of WebTransport!
- mannyv 1y agoOne thing that would be nice is to enable the video sender to send multiple streams. In MoQ terms, the video source can send multiple subgroups. Why? Because transcoding = latency. Back in the day clients were weak, so transcoding on the server made sense. Today your phone can easily spew multiple streams out without breaking a sweat. Assuming a capable device, it would provide the fastest path. And it doesn't obviate transcoding.
- englishm 1y agoYes, you certainly could use MoQ to send multiple streams (WebRTC simulcast style). There are implementations of traditional receiver-side adaptive bitrate switching with MoQ already today (mostly switching between tracks at group boundaries). There has been interest in exploring sender-side adaptation as well, but it's not clear what that might require and if it's something worth trying to support in the first version of the spec we take all the way to RFC status. Subgroups are something that can be used today, though less experimentation (at least public experimentation) has been done on fully utilizing subgroups at this point. They could be used for independently decodable tracks, though that wastes bandwidth relative to layered codecs. Even layered codecs have some overhead that may not always be worth it. If RTT is low enough and switching is straightforward, it may be that having the original publisher publish multiple tracks into a relay and allowing the end subscriber to switch between them is sufficient. We could really use more public experimentation with all of these approaches, so if anyone is looking to do that type of research, definitely let us know how we can help support it!
- xmichael909 1y agoOur company just put this out, full MoQ support for MediaMTX with 200-300ms latency - demo at https://moq.wink.co/moq-player.html https://moq.wink.co/moq-player.html GitHub: https://github.com/winkmichael/mediamtx-moq https://github.com/winkmichael/mediamtx-moq We implemented both WebTransport (for browsers) and native QUIC (for server-to-server) after discovering browsers block raw QUIC. Works today in Chrome/Edge, integrates with existing RTMP/RTSP streams in MediaMTX.