Streaming NASA ISS live on Raspberry Pi

omxplayer is good command line player, will be suing it for streaming videos on Pi, it also support hardware decoding. and also with omxplayer you do not even need to run GUI to watch videos on pi on the console.

$ sudo apt-get install omxplayer

The livestreamer utility helps simplify the process of downloading video from UStream and other video stream providers. It does the processing and converts stream to a standard video file that can be sent to a player like omxplayer.

$ sudo apt-get install python-pip
$ sudo pip install livestreamer

In order to access ustream’s HD streams, Livestreamer needs python-librtmp, which also is available using pip. The library needs cffi, so we have to install its dependencies, too. They are python2.7-dev and libffi-dev. python-librtmpneeds librtmp-dev.

sudo apt-get install python2.7-dev libffi-dev librtmp-dev

After installing those development headers, we can install cffi and python-librtmp.

sudo pip install cffi
sudo pip install python-librtmp

Once that is done, Livestreamer can be installed.

sudo pip install livestreamer


$ livestreamer mobile_480p --player omxplayer --fifo

The command that combines livestream and omxplayer and starts the ISS stream in full screen mode is as follows:

$ livestreamer http
:// mobile_480p --player omxplayer --fifo \ > --player-args "--win \"0 0 1600 1200\" {filename}"


To avoid having to manually restart the process each time it stops, a wrapper bash script can be created to do this for us:

while true
 livestreamer mobile_480p --player omxplayer --fifo --player-args "--win \"0 0 1600 1200\" {filename}"

so If  above file is named iss-streamer make it executable and run it as  command:

$ chmod +x iss-streamer
$ ./iss-streamer

I thought it would also be useful to have the stream autostart when the Pi is plugged in, so that it can run completely unattended. This is achieved by adding the command to the /etc/rc.localfile, right before the exit 0 line:

# start the ISS video stream
sudo -u pi /home/pi/iss/iss-streamer >/dev/null 2>&1 &



For fixing the issues with python-librtmp, thanks  —

One thought on “Streaming NASA ISS live on Raspberry Pi

  1. Thanks for all the work to update this. I keep getting 2 errors when I try to run the livestreamer code. The first one says there is no stream at that URL. If I try again, it says there was a bad handshake. Ideas? Thanks!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s