Magic Poster on the Wall

Magic Poster on the Wall

You're the Coolest AI of All

https://www.youtube.com/watch?v=YLpIcAdQxrI

From a young age, I’ve always loved the magical experience of going to the movies. Torn ticket stubs, big booming sound, giant screens, and popcorn fill my heart with joy. There is nothing in the world quite like sharing in the community experience of enjoying a blockbuster in a movie theater. I suppose it's no surprise that I’ve loved living in LA so much!

Since 2020, theaters have struggled quite a bit, and for good and obvious reasons. I’ve truly missed taking my family to the theater. I’m a bit of a digital packrat, with a healthy collection of Blu-Rays stored on my home NAS. About a year ago, I finished renovating my home theater, which was a big step toward recapturing the magic of the movies with my family. But, no matter how great the picture and sound are, I still felt something was missing.

If you’ve been following me, you’ll be unsurprised to hear that I decided to scratch my itch with technology. What better way to explore the emerging and promising power of GenAI while honing my skill with HTML, CSS, JavaScript, and WebSockets?

Picture This

Part of visiting a movie theater is walking by a wall of big, colorful movie posters, which are, in my view, an underappreciated art form. A great movie poster creates a sense of excitement, anticipation, and wonder. A few months ago I stumbled on a project called Movie Posters Perfected, which was a huge inspiration for this project. While I could have gone down the path of just showing movie posters from this curated collection using a Fire TV stick, I wanted to create something even more magical. So, armed with inspiration, I set to the task of creating what I call my “Magic Poster.”

The hardware ingredients for the Magic Poster are simple:

Assembly was straightforward, thanks to double sided tape and zip ties. The one piece of hardware I wouldn’t use again is the Samsung monitor, which is a little too “smart” for it's own good. Getting it to be happy in portrait orientation was a nightmare! Still, I soldiered on and was able to mount the TV on the wall and drive the display with my Raspberry Pi 5, with the LED backlight matching the content on screen. Now, it was time to build some software.

Magic Poster’s Software Stack

While Raspberry Pis have become surprisingly powerful, they are still constrained computers with limited performance. I knew that I wanted to do more than just display static posters. I wanted to enhance the magic factor with animations, context awareness, and generative AI. When it comes to rendering performance, modern web browsers have decades of optimization, hardware acceleration, and features. I decided that my best bet was to use Chromium in “kiosk” mode, which displays websites in full screen, free of window decorations, toolbars, and tabs.

For the backend, I chose my programming language of choice, Python, along with libraries like Flask and SocketIO. Magic Poster is a JavaScript-powered frontend that communicates with a Python backend using WebSocket. I deployed modern CSS animations and transitions to create delightful views that can scroll, flip, and fade in and out.

After a few weeks of insomnia-fueled development, I had Magic Poster serving up beautiful posters from a hand-picked set of over 1,200 high-resolution movie posters, with four different styles: single poster, a “marquee” view with dozens of small animated posters, a “scroll” view that shows medium sized posters with a smooth scrolling animation, and a “flip” view that experiments with animation that really make the LED backlight sing.

Context Awareness

One of the benefits of powering Magic Poster with a network attached Raspberry Pi is that it can integrate with other systems on my home network. In my theater, I have an Apple TV 4K, a Zidoo Z9X, and a gaming PC running ChimeraOS. Thanks to open APIs, I am able to detect when I am watching a movie or show, or when a game is being played. Using these APIs, I was able to have a small overlay appear on Magic Poster that displays information about the current activity.

Magic Poster was really taking shape, with a variety of different modes, context awareness, and even a simple REST API for controlling what is on screen at any given time. Still, I felt that there was something missing: interactivity. With the rapid and accelerating evolution of AI, there was an opportunity to take Magic Poster to the next level.

A Magic Sprinkle of GenAI and ML

Interactivity requires two-way communication. Attaching a keyboard or physical buttons to Magic Poster would be an easy path to providing input, but buttons are decidedly un-magical. I wanted Magic Poster to have a personality – to feel alive. Technology has an opportunity to become increasingly personal and interactive thanks to AI, and I concluded that the most magical way to interact with Magic Poster would be through conversation. Could I simply speak to Magic Poster, and more importantly, have Magic Poster respond?

Voice assistants have been “a thing” for quite some time. My experience with the three major players (Apple’s Siri, Google, and Amazon’s Alexa) have been mixed at best. All three assistants require “wake words” to begin an interaction, which feels forced. In the years since these assistants were developed, technology has evolved and advanced significantly. If possible, my goal was to have conversations with Magic Poster feel more natural.

As a longtime member of the Python community and a Fellow in the Python Software Foundation, I follow a number of prominent community members. Simon Willison is a Python developer that has become deeply interested in AI and LLMs, producing some great tools including Datasette, and more recently, Python LLM, which makes using both local and hosted LLMs from Python fun and easy. Through Simon, I discovered Vosk, which is an open source ML powered speech recognition toolkit with impressive accuracy and a very small footprint. I was quickly able to leverage Vosk to have Magic Poster passively listening to me in the background, ready to respond or take action based upon my feedback, including changing views, requesting specific posters, and more.

Now that Magic Poster could listen and take action, I wanted to give it the power to respond in its own voice. One of my favorite sites on the web is The Movie Database (TMDb), which is a free platform chock full of features, including an API with excellent Python client libraries. TMDb contains a lot of user-generated content, including a large number of reviews, with useful insights from a broad range of people. I decided to give Magic Poster the power to take hundreds of user reviews to generate a short summary of audience sentiment. When requested, Magic Poster reached out to The Movie Database, quickly pulls down all of the reviews for a movie, and then generates a summary using Ollama and the Llama 3 LLM. Finally, I feed the generated content to a text-to-speech system, and Magic Poster finally has a voice.

What’s Next?

It's been a lot of fun working on Magic Poster, and I am really happy with where it stands today. Of course, I have so many ideas about where to go from here, with additional voice features, display styles, and more. What do you think about Magic Poster? Do you have any suggestions for how to make it even more magical? Talk soon!


Balvin Jayasingh

Software Engineer | Ex-Microsoft

1mo

It sounds like Jonathan's home project is blending AI with nostalgia for the movie theatre experience. Using technology to recreate memories is fascinating. It highlights how AI can enhance our daily lives beyond just practical applications. Integrating fun and joy into tech projects is refreshing. It shows the creative potential of technology to connect us with our past experiences. I'm curious to learn more about how he's using AI to achieve this nostalgic ambiance.

Like
Reply
Olivia Martinez Goetz, MHA

AI-Forward Marketer 🧠 | Turning B2B to B2Human 💪🏼 | Stepmom & Dog mom | Running Enthusiast

1mo

I love this. So cool!

Like
Reply

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics