Live data from Hacker News

Prime Video Uses WebAssembly

amazon.science

51–60 of 254 posts

Re: Prime Video Uses WebAssembly

#51

Personally, to me , whenever I read these stories about how Amazon is doing this novel use of WebAssembly, or how Uber is doing ludicrous engineering effort to keep their React-based app under 300MB for the App Store, I can't help but think: "Man, that's an awful lot of work to avoid writing a native app."

Writing a native app for every conceivable platform someone might want to watch Prime Video on seems an awful lot of work

"But why, though?" I keep asking myself, from a "how many darn buttons and doodads does it really need to have?" perspective. I suspect the issue is that people write entirely too much dang code to solve what is, after all, a fairly simple UI problem [1]. I mean, seriously. The Alto had less than a megabyte of RAM and managed to invent the GUI--menus, mouse, all. How have we managed to make this harder in 40 years?

[1]...until Branding(tm) enters the chat.

Re: Prime Video Uses WebAssembly

#52
The egui framework they mention is pretty neat:

https://emilk.github.io/egui/

It an entirely custom toolkit, so don't expect it to have a native look and feel, but it's a GPU-first design with multiple back-ends. It can be used in native OpenGL apps too. It's an immediate-mode UI, so it's very easy to build and update even complex windows. Great choice if you want to prototype a game.

Re: Prime Video Uses WebAssembly

#53
post #32

Earlier quoted context omitted.

The challenge would be that Prime Video is distributed on many client devices. Here’s a list of a few TV OSes: https://en.m.wikipedia.org/wiki/List_of_smart_TV_platforms . How would you manage a different native app for each of them? Caveat: previously worked at Prime Video though not in this area, still at Amazon

I could be incorrect, but last time I did some reverse-engineering, Netflix had a Qt application that used native C++ bindings to knock out huge sections of that list. That Qt application was only lightly modified for each platform, IIRC, and it appeared all over the place from those cheap Linux-based Blu-ray players to Smart TV clients. Anywhere that was embedded, generally Linux-based, and unlikely to get frequent…

It all kind of undermines your original comment tho that they're trying to avoid native. It seems more likely that they're goal is to reach as many devices as they can and be able to do updates frequently. In the first paragraph of the linked article the guy says the trade-off is between "updatability and performance".

Re: Prime Video Uses WebAssembly

#54
post #51

Earlier quoted context omitted.

Writing a native app for every conceivable platform someone might want to watch Prime Video on seems an awful lot of work

" But why , though?" I keep asking myself, from a "how many darn buttons and doodads does it really need to have?" perspective. I suspect the issue is that people write entirely too much dang code to solve what is, after all, a fairly simple UI problem [1]. I mean, seriously. The Alto had less than a megabyte of RAM and managed to invent the GUI--menus, mouse, all. How have we managed to make this harder in 40 years?…

Because it's not just buttons and doodads, it's all the error handling and loading indicators and UI edge cases that are needed to make it seamless and good. Title too long? Does it get truncated or shrunk? Does the UI reverse itself for RTL languages? Does the focus ring move in a sensible order?

This is front end engineering. It's a whole profession, and when it's done poorly, folks think your software is garbage. Forty years ago half of the software was in English and required a specific screen resolution. Of COURSE it's going to be harder.

Re: Prime Video Uses WebAssembly

#55

Earlier quoted context omitted.

Can you recommend any resources for learning about video codecs?

doom9 has a lot of good discussion.

I remember back in the day when doom9 was blocked at the corp firewall level because it had posts on how to circumvent things. Nevermind it was the unofficial support for things like AVISynth, x264, etc. Even the nascent days of ffmpeg were there. It took a lot of cajoling and back and forth with legal depts, but eventually, was allowed to be granted access on an individual basis

I owe a lot of what was accomplished to folks like DG and the other troopers from the bad ol' days of VFW based apps. It was like monkeys throwing rocks at the space ships compared to whats now. Remember when 2 cores was fast?

For the person up thread talking about learning things, I wish I was in that position today with them rather than 20 odd years ago where everyone was in the dark, and thank the heavens for sites like doom9 that shone lights in dark places!

Re: Prime Video Uses WebAssembly

#56
post #19

Earlier quoted context omitted.

There is a cross sectional problem between what codecs that specific hardware supports (and generally is supported by all the popular devices), how much bandwidth you have on your connection and how many different codecs the various streaming services can support and cache locally. There are trade offs to be made.

Fair, but in this case I think the tablet should be usable. Sure it's old and only a dual-core cpu, but checking the list of hardware accelerated qualcomm decoder codecs it supports, it lists: vc1, divx, divx311, divx4, avc, mpeg2, mpeg4, h263. Surely AVC which is h.264 should still be supported.. Maybe it gets tripped up trying to use the software google decoder codecs instead? That said, I am not able to test it an…

"Supports AVC" doesn't mean a great deal on its own. H264 has a number of different profiles (over 20, although only 3 are commonly used), and 20 different levels. Most of the potential combinations aren't relevant, but supporting the full range of hardware decoders while also sending something reasonably close to the best quality that the device supports can mean encoding ten different versions.

If it's a particularly low-end/old device, Amazon may have simply decided it's no longer worth encoding a version supported by your device's hardware encoder, while Netflix still does.

Re: Prime Video Uses WebAssembly

#57

Personally, to me , whenever I read these stories about how Amazon is doing this novel use of WebAssembly, or how Uber is doing ludicrous engineering effort to keep their React-based app under 300MB for the App Store, I can't help but think: "Man, that's an awful lot of work to avoid writing a native app."

Writing a native app for every conceivable platform someone might want to watch Prime Video on seems an awful lot of work

A company that makes an awful lot of money can afford to not make an awful app on major platforms.

A native app on Windows, macOS, iOS and Android (TV), and some other solution for other platforms, isn't an unreasonable ask in this context.

Re: Prime Video Uses WebAssembly

#58

Personally, to me , whenever I read these stories about how Amazon is doing this novel use of WebAssembly, or how Uber is doing ludicrous engineering effort to keep their React-based app under 300MB for the App Store, I can't help but think: "Man, that's an awful lot of work to avoid writing a native app."

The Uber app is naive, not React

https://eng.uber.com/how-uber-deals-with-large-ios-app-size/

Re: Prime Video Uses WebAssembly

#59

Earlier quoted context omitted.

Writing a native app for every conceivable platform someone might want to watch Prime Video on seems an awful lot of work

A company that makes an awful lot of money can afford to not make an awful app on major platforms. A native app on Windows, macOS, iOS and Android (TV), and some other solution for other platforms, isn't an unreasonable ask in this context.

It takes an awful lot more money to ask engineers to do boring things like, “reciprocate this behaviour from iOS to Android “

Re: Prime Video Uses WebAssembly

#60

Earlier quoted context omitted.

While app the performance is just poor on my 2019 LG OLED TV I find HDR content to be unwatchable on it, seemingly a long running problem across multiple platforms: https://www.amazonforum.com/s/question/0D54P00007HLPkoSAH/le... HDR content is somewhat better when played through the Prime Video PS5 app, though it still seems much darker than HDR content played on the Netflix/AppleTV/HBO LGTV apps.

It's not just HDR content. I was watching a 2008 BBC drama called Little Dorrit on a Roku in 1080p streaming, no HDR because that didn't exist when it was filmed. It was super smeary, had terrible blacks, tons of obvious banding artifacts, it was really bad. I bought the 1080p Blu-Ray version from the UK, and even my parents standing 10 feet away from our 48" 1080p TV (without me explaining the problems with the Prim…

Could possibly be an issue with the HDMI Black Level setting on the Roku's input.
Post reply on HN