Recently, NASA has mounted four HD cameras ISS onboard with live Earth image streaming.

ISS HDEV Stream Screenshot

These Earth views are so gorgeous so you surely would like to grab this stream into local drive video file. Also you would like to drop out dark frames when ISS is on night side of Earth and nasty long gray frames filling the screen during cameras switching or communication link loss.

So we have two problems: how to capture live stream and how to get rid of repeated black and gray frames.

But if you're Linux user, you're lucky - there are two console utilities to do both jobs - Livestreamer and mencoder.

Livestreamer is CLI program that extracts streams from various services and pipes them into a video player, file or standard output.

So, we need most recent Livestreamer version (1.8.1 at this moment):

# pip install livestreamer

Livestreamer latest version is mandatory due to the bug in earlier versions causing capture process hanging in case of video streams without sound track (like ISS HDEV stream).

Check Livestreamer installation by issuing this command:

$ livestreamer best

Default video player (VLC) should be opened with live ISS HDEV video played with best available resolution (1280x720).

Stream could be captured to AVI file using -o option:

$ livestreamer best -o iss-hdev.avi

Finally, repeated static frames could be eliminated from stream using this command:

$ livestreamer best -O | mencoder -ovc lavc -ofps 30 -noskip -vf decimate=-0:150 - -o iss-hdev-decimated.avi

CLI utility mencoder is part of MPlayer project and could be installed using your Linux distro package manager (yum/apt/etc). Note option -vf decimate=-0:150, where 150 is maximum difference threshold for consequent frames treated as identical.

Moreover, you could use this command to obtain video of any Earth place from space - just schedule it using at command. Аll visible ISS passes for next 10 days could be obtained using Heavens Above site. Enter the place of interest coordinates as your location and don't forget to check "Passes to include - All"