Live data from Hacker News

Ask HN: Recommend video streaming CDN service

news.ycombinator.com

21–30 of 31 posts

Re: Ask HN: Recommend video streaming CDN service

#22
post #21
post #18

Since you care more about cost and don't mind building it yourself, just build it yourself. ffmpeg -> MPEG-DASH -> nginx + MPEG-DASH -> your own video player.

If the video isn’t streaming IN, then you can use anything that can serve https

This isn't true.

Using ffmpeg you can transcode one stream to HLS stream.

Example: https://www.martin-riedl.de/2018/08/24/using-ffmpeg-as-a-hls...

Re: Ask HN: Recommend video streaming CDN service

#23
post #22
post #21

Earlier quoted context omitted.

If the video isn’t streaming IN, then you can use anything that can serve https

This isn't true. Using ffmpeg you can transcode one stream to HLS stream. Example: https://www.martin-riedl.de/2018/08/24/using-ffmpeg-as-a-hls...

> The data is delivered over a HTTP/HTTPS connection, so it can be also perfectly cached on server side or used in combination with an CDN.

We are not in disagreement.

Re: Ask HN: Recommend video streaming CDN service

#24
So far I think the best option will be to do it on my own. But I would do it this way - the source would have to be VBR, not CBR since no transcoding would take place. What is put in is also what will be put out. With 1Mbit recommended quality.. The ingress will simply chunk the stream into 1-2 second segments and those will be sent to my "CDN" servers which will serve it from memory only with about 30sec buffer. The data would be pumped out via websocket(so i can easily send binary data) into MediaSource js object as uri for html video src. If the client is too slow consumer, he'll buffer the video. I don't need to provide youtube level of service.

--

Just did a small test with 10 sec desktop video recording in OBS:

CBR 3.35 MB

VBR 343 kB

ABR 840 kB

CRF 344 kB

So by not using CBR the data stream can deliver the same quality at 10x lower size(VBR, CRF) or 3.9x in case of ABR. CBR is needed for transcoding due to speed needed for that process but if I would pipe the data 1:1 as I said, then CBR is detrimental.

Re: Ask HN: Recommend video streaming CDN service

#25
post #23
post #22

Earlier quoted context omitted.

This isn't true. Using ffmpeg you can transcode one stream to HLS stream. Example: https://www.martin-riedl.de/2018/08/24/using-ffmpeg-as-a-hls...

> The data is delivered over a HTTP/HTTPS connection, so it can be also perfectly cached on server side or used in combination with an CDN. We are not in disagreement.

Nothing prevents you from doing this live either though, except maybe if you need very low latency.

Re: Ask HN: Recommend video streaming CDN service

#26
https://github.com/cannonbeach/ott-packager Then feed that into any CDN which works with HLS, which should be all of them.

All CDNs are going to charge based on usage, that's how they work, some offer a free tier but you have to take responsibility for managing your costs and ensuring your revenue scales (otherwise just use YouTube)

Alternatively there's also: https://www.mux.com/live

Re: Ask HN: Recommend video streaming CDN service

#27
post #24

So far I think the best option will be to do it on my own. But I would do it this way - the source would have to be VBR, not CBR since no transcoding would take place. What is put in is also what will be put out. With 1Mbit recommended quality.. The ingress will simply chunk the stream into 1-2 second segments and those will be sent to my "CDN" servers which will serve it from memory only with about 30sec buffer. The…

Note that if you use VBR instead of CBR the video player will have more trouble with buffering logic because (many players) will buffer a fixed duration or number of segments. When there's lots of action the bitrate will be high and when it's idle it will be low, so the variability causes buffer challenges.

Capped VBR is one of the most common ways to do VBR on live streaming.

Re: Ask HN: Recommend video streaming CDN service

#28
post #27
post #24

So far I think the best option will be to do it on my own. But I would do it this way - the source would have to be VBR, not CBR since no transcoding would take place. What is put in is also what will be put out. With 1Mbit recommended quality.. The ingress will simply chunk the stream into 1-2 second segments and those will be sent to my "CDN" servers which will serve it from memory only with about 30sec buffer. The…

Note that if you use VBR instead of CBR the video player will have more trouble with buffering logic because (many players) will buffer a fixed duration or number of segments. When there's lots of action the bitrate will be high and when it's idle it will be low, so the variability causes buffer challenges. Capped VBR is one of the most common ways to do VBR on live streaming.

i understand. the ingress will chunk the stream into those segments(1-2 seconds long), remember the encoded video is packed in mp4 container, and pass them on to the egress/edge/cdn servers into their in-memory buffers. so the only processing will be done in regards to those chunks.

Re: Ask HN: Recommend video streaming CDN service

#29
post #26

https://github.com/cannonbeach/ott-packager Then feed that into any CDN which works with HLS, which should be all of them. All CDNs are going to charge based on usage, that's how they work, some offer a free tier but you have to take responsibility for managing your costs and ensuring your revenue scales (otherwise just use YouTube) Alternatively there's also: https://www.mux.com/live

Mux founder here, thanks for the mention!

The cost bit is one hear a lot, and it's tough. There's no way around it, video can just get expensive at scale. Services that try to get away from charging for usage are just trying to play an averages game; once you cost them enough you'll hear from them.[1]

We are looking at ways to help developers limit the risk of a runaway bill and just generally manage their cost shape a little more. If you're up for chatting about it feel free to shoot me a note (matt at mux).

[1] https://www.theverge.com/2022/3/15/22979126/vimeo-patreon-cr...

Re: Ask HN: Recommend video streaming CDN service

#30
For live video, bandwidth is a killer. If you have volume and do an upfront committment you can negotiate down to It's crazy how much people make off of bandwidth. From what I understand, that and RAM are huge margin products for AWS.

Also, you need to do the "get three quotes" thing. Akamai, fastly, and AWS will match/beat each other if you ask.

Post reply on HN