Arnt Gulbrandsen
About meAbout this blog

Nexus Player

Our latest little film-playing box is a Nexus Player. It's good.

We have it connected to an Epson 1920×1080 projector and a Musical Fidelity amplifier.

The most remarkable features of the Nexus Player are that its remote control is simple and does not require line of sight, and that as of Android 6.0.1 it supports USB audio. Our amplifier happens to have USB input, so we get really good sound quality when we watch films.

Compared to the Popcorn Hour A-300 that's also connected to the same projector and amplifier, the Nexus Player has a real selection of apps and a much less confusing remote control. The A-300 can do better upscaling given the right video source, though, and has better support for playing from a local NAS.

Compared to the Roku 3 we have stopped using, the Nexus Player has better apps and no advertising. Roku really, really wants to display advertising to its paying customers. The Nexus Player (unlike the Roku 3) has a few annoying preinstalled apps, but it's possible to uninstall or disable all of those, and ours currently runs only Mubi and Plex.


Random notes on Roku programming

The Roku is not a general computer. It has no keyboard and no persistent storage.

There is an on-screen keyboard, but none of the examples use it, and so far I haven't seen an app use it either. The spirit of the Roku is that apps give users a screenful of things to choose from, and users choose. Equally, it has support for USB, but read-only so apps can see what's on a USB stick, but never, ever store anything. Very secure: A user can stream, but cannot store and therefore cannot copy. DRM taken to its logical conclusion.

Apps start from scratch every time. Stop and restart and app, and the app has lost all state. The only way to cache state is to use the device registry, which is limited to 16k and vaguely discouraged.

I like it, it has a certain honesty and simplicity.

There seems to be no way to cache web resources, so an app had better be able to start up without needing any web resources, or else it will start up very slowly.

The same applies later: If a web resource is slow, the UI blocks. I managed to avoid strict blocking using asyncGetToString() and asyncPostFromString(), but the result is still not quite good. Even though he UI reacts at once, the reaction is usually to present the outline of a screen at once and only fill it in a little later.

The key to achieving even this was to use the same roMessagePort for all screens and all roUrlTransfers, and write a function to process all roUrlEvents and perform callbacks to update whatever needs to be visited. I had to write three lines of boilerplate near every call to wait(), but the rest was quite pleasant. I got some HTTP caching for free too, so selecting the same item a second time works instantly.

There's a brightscript emacs mode floating around the web; I hacked a bit on it and someday maybe I'll post my version to github.

Mark Roddy, who I now see may be the original author of brightscript-mode.el, has written a test framework.

I cannot count the number of times I've expected a=b; to work. My fingers type semicolons on their own.


Blocking ads on the Roku media players

The Roku 2XS (like, I assume, the rest of the lineup) displays advertising on its home screen. I'm the kind of person who chooses paid android apps over the ad-ridden free versions, and I paid for the Roku, so why is there advertising there?

The home-screen advertising needs the domain. I have a NAS which can function as a DNS server, so I enabled that function, added an empty domain, and updated the DHCP server to make every device use my NAS as DNS server. Finally I power-cycled the Roku.

That was enough. No more ads.

(Note: This trick will not block ads in free streaming channels. I suggest you change to paid-for channels. Remember: If you aren't paying for it, you're not the customer, you're the product being sold.)


Comparing Roku and Popcorn Hour

I have a Roku 2XS in the office and a Popcorn Hour A-300 in the living room. The Roku is small — the Popcorn Hour is as big as a book, the Roku fits on the palm of my hand. I can almost close my hand around it.

The Roku doesn't have as many connectors as the Popcorn Hour. Getting a digital sound signal from the Roku to an amplifier won't be easy, and the box is small and light enough that it won't sit properly on my desk, which annoys me more than it should. The ethernet and HDMI cables are too heavy for it. Wiggling helps.

The Popcorn Hour is friendlier at setup time. I was able to play my ISO images (I rip all my DVDs at purchase time and play from a NAS) without giving anyone any credit card number. Roku demanded one, and the Roku privacy policy notes (in the small print) that information about anything I watch will be logged to their servers (and the NSA's, I suppose). That makes me want to cook up some attention-getting stream names.

The Roku shows advertising on the main screen, while the Popcorn Hour abstains from such ignoble behaviour.

Roku wins on UI (apart from the advertising). In particular, the remote is smaller, friendlier and doesn't suffer from button overdose syndrome. Both boxes are quiet.

Video quality isn't directly comparable: The Roku plays network streams to digital output, and the video quality depends mostly on the network connection. (There's an app to play files from USB sticks, which I haven't tried.) The Popcorn Hour also plays ISO, Matroska, AVI and MP4 streams from NAS, and scales them up to 1920×1080. The upscaling quality varies from astonishingly good in the best cases to not very good in the worst. (Some MP4s encoded directly from high-resolution masters are scaled up well, ditto most of my ISOs, but not all. Matroska files I made from the same ISOs are scaled up poorly.)

Sound quality is identical when comparable. The Popcorn Hour also has analog sound outputs (of poor quality), which the Roku does not.

Update: The Roku has more apps. None I really care about, partly because I use a projector and a largish canvas. For some reason, a large canvas demands a high bitrate in order to look good, and the streaming services generally stop below 3Mbps so the apps I've tried are useless. If you use a screen or small canvas, app availability may be an important factor to you.