So I enjoy watching the NASA’s High Definition Earth-Viewing System (HDEV) live stream on ustream and NASA’s page.

however I don’t like to have to keep a window on my browser dedicated to viewing this. So I decided to build a viewer box with a raspberry pi. So I can put it on my already cluttered desktop but have a constant view of the stream. The stream will drop out/black out depending on the position of the International Space Station (ISS). I also am a trekkie , so I decided to combine the two together. So I feel like I’m on the Enterprise of TNG watching earth , much like the movie “First Contact.”

Here is the final result:

So what did I use?

Hardware:

Raspberry Pi B+ (cause I had some lying around from a previous project)

7 Inch HDMI Screen. (any screen would do but I wanted a small screen factor so I could position it on my desk among the other things )

Software:

Jessie Lite ( I wanted to run the Raspberry in a minimal configuration and not use the X-windows, so I went no X windows , Jessie Lite)

OMX Player (this is the actual core player playing the video feed and the background. -I’ll explain more later)

libav-tools (mainly avconv to create a looping video of the LCARS background)

livestreamer (the grab the stream of the ustream.tv NASA channel and feed it to omxplayer)

Once it ran , it seemed simple but the process wasn’t.

Initially I thought of just building a raspberry pi with a TFT shield , running the Iceweasel browser in full screen. This was a long road into the abyss, the TFT shield I have did not like the frame buffer output , Iceweasel can’t play the ustream etc etc…Now there might be a way but I also felt it was a bit of overkill for a simple stream viewer to have a full X-windows+browser setup. So omxplayer to the rescue. With omxplayer I can still view the stream via live streamer without having to boot fully into a x-windows environment.

So based on the Miguel Grinberg’s blog post about building a raspberry pi NASA live stream viewer , the first step it to set up livestreamer to capture the NASA’s stream and hand it over to omxplayer.

So the idea is that the lcars.mkv is playing at a lower layer and the NASA feed is on top of that video. (thanks to Brad’s Blah Blog for the idea)

basic LCARS image. (lcars.png)

This is were the omxplayer “–layer” option comes in, the higher the number , the closer to the screen the video play is. So the LCARS video plays on layer 10 and the NASA video plays on layer 20. Now since the LCARS interface is just there as a container this video does not have to loop indefinitely , so I decided to pause it after it loads. So using FIFO file , I send a “p” to the player causing to the stream to pause. (updated: I realised I could use the fbi image viewer to layout the background instead of using 2 instances of omxplayer, the background generating one tended to crap out randomly anyway . )