After following the instructions from this initial blog post, I managed to extract the ISS live url for NASA TV and get it playing in VLC.
Please first install
vlc, as you require them to follow this article.
Notes and Updates:
Important Update (June 28, 2013): the script from the above site does not now correctly locate the broadcasts, so you must use the updated script at at Github. Download it and make it executable; call it
I have rewritten the article so that it is still useful. You will need to repeat the following process below each time you wish to watch a live broadcast as the rtmp streams do not remain valid for long.
Another update (September 2013): the regex for parsing the urls in the ustream script seems to need fixing (I'll try..), but in the meantime, we can use the iphone streaming url, at least for the main NASA TV on the desktop, as found using the online ustream url converter. Vlc can be used to open the url and stream the content:
See also at the end of this article for information on downloading or streaming recorded ustream videos (NASA or otherwise) with
For each NASA channel listed on ustream.tv, you must run the script against the correct url to discover the valid stream information:
python /location/of/ustream_recorder http://www.ustream.tv/nasahdtv
Now you will receive the following output with the rtmp url that you need to use:
Opening url: http://www.ustream.tv/nasahdtv
AMF URL: http://cdngw.ustream.tv/Viewer/getStream/1/6540154.amf
Channel ID: 6540154
Channel Title: nasahdtv
RTMP URL: rtmp://ustreamlivefs.fplive.net/ustream3live-live/
RTMP Streamname: stream_live_1_1_6540154
RTMP Command: rtmpdump -v -r "rtmp://ustreamlivefs.fplive.net/ustream3live-live//stream_live_1_1_6540154" -W "http://www.ustream.tv/flash/viewer.swf" --live
The 'RTMP Command' part of the above output is what you need to take note of and use in your commands to either stream, record, or stream and record the media.
(Please be aware that you need to use the script to generate the rtmp server address everytime, so the rtmp url below will probably not work after a few days when ustream rotates the servers.)
To just play the media, add
| vlc - to the rtmp command discovered by the script:
rtmpdump -v -r "rtmp://ustreamlivefs.fplive.net/ustream3live-live//stream_live_1_1_6540154" -W "http://www.ustream.tv/flash/viewer.swf" --live | vlc -
To play and record, add
| tee "$(date +'%F_%H_%M_%S')".flv | vlc - to the rtmp command:
rtmpdump -v -r "rtmp://ustreamlivefs.fplive.net/ustream3live-live//stream_live_1_1_6540154" -W "http://www.ustream.tv/flash/viewer.swf" --live | tee "$(date +'%F_%H_%M_%S')".flv | vlc -
To just record, add
-o "$(date +'%F_%H_%M_%S')".flv to the rtmp command:
rtmpdump -v -r "rtmp://ustreamlivefs.fplive.net/ustream3live-live//stream_live_1_1_6540154" -W "http://www.ustream.tv/flash/viewer.swf" --live -o "$(date +'%F_%H_%M_%S')".flv
I have used
date with the filename created, so a unique filename is created and thus any files will not clash or be overwritten.
Again, remember that you will need to run the ustream-recorder script yourself to find valid rtmp urls, as these example urls above will only be valid for a short time.
It is also possible to use the
get-flash-videos Perl script to stream or download pre-recorded ustream NASA content. It is in the repositories, but you may need the latest version. It is best to install the repository version, as a lot of dependencies are needed, and then run the latest version from $HOME if you need to, as noted here.
There are actually a couple of dependencies that I also needed
To download a pre-recorded program:
Using method 'ustream' plugin version 0.01 for http://www.ustream.tv/recorded/25391855
The_Challenges_of_Mars_Exploration.flv: 1% (6017.34 / 387974.54 KiB)
To play and download a pre-recorded program, just use the -p option
get_flash_videos -p --player=vlc http://www.ustream.tv/recorded/25391855
See important note at the top of the post regarding updating the rtmp url information and using the correct script to find the rtmp urls.