Live data from Hacker News

We replaced H.264 streaming with JPEG screenshots (and it worked better)

blog.helix.ml

71–80 of 332 posts

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#71

I’m surprised that H264 I-frame only compresses less than JPG. Maybe because the basic frequency transform is 4x4 vs 8x8 for JPG?

Their h264 iframes were bigger than the jpegs because they told the h264 encoder to produce bigger images. If they had set it to produce images the same size as the jpegs it most likely would have resulted in higher quality.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#72

webp is smaller than jpeg https://developers.google.com/speed/webp/docs/webp_study ALSO - the blog author could simplify - you don't need any code at all at the web browser. The tag automatically does motion jpeg streaming.

… and JPEG XL is smaller than WebP.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#73
If you are ok with a second or so of latency then MPEG-DASH (standardized version of HTTP Live Streaming) is likely the best bet. You simply serve the video chunks over HTTP so it should be just as compatible as the JPEG solution used here but provide 60fps video rather than crappy jpegs.

The standard supports adaptive bit rate playback so you can provide both low quality and high quality videos and players can switch depending on bandwidth available.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#74

Earlier quoted context omitted.

1Mbps for video is rule of thumb I use. Of course that will depend on customer expectations. 500K can work, but it won’t be pretty.

For normal video I think that's a good rule of thumb. For mostly-static content at 4fps you can cut a bunch more bitrate corners before it looks bad. (And 2-3 JPEGs per second won't even look good at 1Mbps.)

[deleted]

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#75
post #24
post #5

> The constraint that ruined everything: It has to work on enterprise networks. > You know what enterprise networks love? HTTP. HTTPS. Port 443. That’s it. That’s the list. That's not enough. Corporate networks also love to MITM their own workstations and reinterpret http traffic. So, no WebSockets and no Server-Side Events either, because their corporate firewall is a piece of software no one in the world wants and…

Corporate IT needs to die.

It's not corporate IT's fault, it's usually corporate leaderships fault who often cosplay leading technology and not understanding it.

Wherever Tech is a first class citizen and seat at the corporate table, it can be different.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#76
post #5

> The constraint that ruined everything: It has to work on enterprise networks. > You know what enterprise networks love? HTTP. HTTPS. Port 443. That’s it. That’s the list. That's not enough. Corporate networks also love to MITM their own workstations and reinterpret http traffic. So, no WebSockets and no Server-Side Events either, because their corporate firewall is a piece of software no one in the world wants and…

> And you have to work around that, because IT dept of the corporation will never lift restrictions.

Unless the corporation is 100% in-office, I’d wager they do in fact make exceptions - otherwise they wouldn’t have a working videoconferencing system.

The challenge is getting corporate insiders to like your product enough to get it through the exception process (a total hassle) when the firewall’s restrictions mean you can’t deliver a decent demo.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#77
post #72

webp is smaller than jpeg https://developers.google.com/speed/webp/docs/webp_study ALSO - the blog author could simplify - you don't need any code at all at the web browser. The tag automatically does motion jpeg streaming.

… and JPEG XL is smaller than WebP.

JPEG XL looks to have pretty poor support.

https://caniuse.com/jpegxl

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#78
No mention of PNGs? I don’t usually go to jpegs first for screenshots of text. Did png have worse compression? Burn more cpu? I’m sure there are good reasons, but it seems like they’ve glossed over the obvious choice here.

edit: Thanks for the answers! The consensus is that PNG en/de -coding is too expensive compared to jpeg.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#79
post #5

> The constraint that ruined everything: It has to work on enterprise networks. > You know what enterprise networks love? HTTP. HTTPS. Port 443. That’s it. That’s the list. That's not enough. Corporate networks also love to MITM their own workstations and reinterpret http traffic. So, no WebSockets and no Server-Side Events either, because their corporate firewall is a piece of software no one in the world wants and…

At the same time, enterprise is where the revenue is.

Re: We replaced H.264 streaming with JPEG screenshots (and it worked better)

#80
This reminds me of the time we built a big angular3 codebase for a content platform. When we had to launch, the search engines were expecting content to be part of page html while we are calling APIs to fetch the content ( angular3 didn’t have server side rendering at that point)

So only plausible thing to do was pre-build html pages for content pages and let load angular’s JS take its time to load ( for ux functionality). It looked like page flickered when JS loads for the first time but we solved the search engine problem.

Post reply on HN