There’s nothing fairly like film night time. A projector and display mixed with a encompass sound system give me a style of the actual film expertise, and a bowl of popcorn provides to the impression. What’s lacking is a film poster for no matter I am watching, so I made a decision to see if I might discover a technique to make that occur, too.

I wished to construct a “now displaying” show for my TV

A film poster for the present content material

Angled iPad view of Jellyfin movie poster grid on a wood table. Credit score: Patrick Campanale / How-To Geek

The idea was pretty easy. Among the apps, providers and units that I exploit to look at exhibits and films have integrations that expose “now taking part in” information to Dwelling Assistant. For instance, utilizing the Jellyfin integration, Dwelling Assistant can see info equivalent to the present play state, the title of the film, and most significantly for my wants, an entity_picture attribute that exposes the film poster from Jellyfin.

I wished to discover a technique to have this poster picture mechanically show in my lounge after I begin watching a film. For this to occur, I wanted a display to show the picture. There have been loads of choices, equivalent to wall-mounting a pill or having the poster present on the tiny screen of my Echo Show 5, however utilizing a complete pill appeared like overkill, and the Echo Present was far too small.

Home Assistant Green

Dimensions (exterior)

4.41″L x 4.41″W x 1.26″H

Weight

12 Ounces

Dwelling Assistant Inexperienced is a pre-built hub straight from the Dwelling Assistant group. It is a plug-and-play resolution that comes with every part it’s worthwhile to arrange Dwelling Assistant in your house without having to put in the software program your self. 


An outdated iPad 2 was sitting unused

The glass was cracked however the show was tremendous

I’ve 4 outdated iPad 2 fashions in a field in my residence workplace. They’re too outdated to have the ability to run something helpful; I am unable to even open Dwelling Assistant in Safari, because the browser is so outdated. Two of the iPads even have cracked screens.

I puzzled whether or not it might be doable to tear the show out of one in every of these iPads, hook it up to a Raspberry Pi, and stick the show into a photograph body. I might then use the iPad show to indicate the film poster for no matter I used to be watching.

A bit of web analysis revealed that this was fully doable. I might purchase a controller board for the iPad 2 display that might enable me to attach it to my Raspberry Pi utilizing an HDMI cable. I might then present no matter I wished on the show.

The controller board set me again about $15 (though it is costlier from Amazon), and that was my solely expense, as I already had the required 12V 3A energy provide with 5.5 × 2.1 mm connector in my field of unused tech, together with an HDMI cable. I made a decision to build the project with my Raspberry Pi 3B+ as a proof of idea; that is additionally overkill for my wants, however I did not have a spare mini HDMI to HDMI cable, and the Pi Zero 2 W that I might have used in any other case solely has a mini HDMI port.

Dismantling the iPad wasn’t too horrific; I used a hair dryer to melt the adhesive across the edges and pried the display off. I solely wanted to unclip one connector to extract the show. Hooking it as much as the controller board simply concerned attaching the board’s cable to the show and connecting my Pi to the board utilizing the HDMI cable. As soon as related, I powered every part on, and Raspberry Pi OS appeared on the iPad’s show.


A popcorn bucket with several spilled popcorns, the Jellyfin logo at the center, and the Plex logo blurred in the background.


5 Reasons I Use Jellyfin Instead of Plex

Jellyfin’s value is not the one factor going for it.

Displaying the present content material on the display

Jellyfin and Sky Q uncovered what I wanted

The subsequent section was to get the show to indicate the poster for the present film. The Jellyfin integration in Home Assistant already gave me a hyperlink to the picture I wanted, so I simply wanted a technique to get this picture to show on the display.

I attempted just a few completely different strategies to get this to work, together with running Chromium in kiosk mode, utilizing a framebuffer picture viewer command-line device, and utilizing Pygame, however these strategies have been both unnecessarily heavy, gave me scaling points, or have been unreliable when referred to as from a background service.

In the long run, I opted to transform the picture into uncooked pixel information and write it on to the Linux framebuffer. There was no want for a desktop surroundings, browser, or show server simply to indicate the picture. This technique gave me a ravishing picture on the iPad show with none scaling points, and it was greater than quick sufficient for a picture that solely must replace after I begin or cease a film or TV present.

In addition to getting now taking part in info from Jellyfin, I used to be in a position to pull it from my Sky Q set-top field too, so I might create a now taking part in picture when watching stay TV channels. An automation detects when Jellyfin or Sky Q starts playing and makes use of a REST command to ship an HTTP POST request to a Flask server working on the Raspberry Pi, with a payload containing the poster picture URL.

The Pi downloads the picture and processes it to go well with the show. The paintings is resized whereas preserving its facet ratio, positioned onto a customized canvas, given a blurred background to fill any unused display house, and rotated to match the portrait orientation of the show. The ultimate picture is then transformed into RGB565 format, the 16-bit pixel format utilized by the framebuffer.

The uncooked information is written to /dev/fb0, which updates the display to show the transformed poster picture. The upshot is that I get stunning film poster paintings on the iPad’s show at any time when I begin a present or film in Jellyfin or watch one thing on my Sky Q field.


Repurposing my iPad feels nice

I have been eager to discover a genuinely helpful technique to repurpose my old iPads for a very long time, and it is a smart way to take action. My subsequent steps are to have the display show household pictures after I’m not watching TV, and to show the present PS5 sport I am taking part in after I’m gaming. At round $40 for a Pi Zero 2 W and the iPad show controller board, I am positively going to tear the screens out of my different outdated iPads pretty quickly.


Source link