Livestream is designed to stream videos, but specifically disallows the saving of live streams. Fortunately, if the data is allowed to reach your computer, be it by stream or otherwise, you can find a way to save it. This is how you can save Livestream stream data. The following may need a certain amount of technical knowledge to execute.
1) Find your stream
For this example I’ll use today’s stream of Manhattan Neighborhood Network’s public access television broadcast. The url for this particular stream looks like this: http://livestream.com/mnn5/events/4846282
Load this website in your favorite browser.
2) Find the playlist url
Open the developer console in your browser and type window.config.event.stream_info.m3u8_url
. The console will print out the url of the M3U playlist that describes the stream data location.
In my case this url looks like this:
Copy the url into your browser. Your browser will start to download a file called master.m3u
3) Find the other playlist urls
Open the file you just downloaded, master.m3u
in your favorite text editor. You should see text like this:
Each line that doesn’t start with a #
is the url of another M3U playlist that will finally contain your video data.
Copy the above url into your browser and another file named index_3096_av-p.m3u
will download.
4) Find the MPEG data urls
Again, open the downloaded file in your favorite text editor, and it should look like this:
Again, each line that doesn’t start with a #
is a url, except this time they each point to 10-second long MPEG-2 Transport Stream video files.
If you copy-paste each of these links into your browser you’ll download your video 10 seconds at a time.
5) Download the MPEG data
If there are too many video urls to download by hand you can use the following bash script to download the entire sequence of video:
Be sure to replace the numbers in your seq
call and the url in wget
to match the values from the M3U
6) Merge the data
After all the small video files are saved on your filesystem all you need to do is join them into a single video file. Simply cat
ing the files together works just fine:
cat *.ts* > full_video.ts
7) Play the video
At this point, the generated file full_video.ts
can be opened with any good video player like VLC
8) Optional: Compress the video
If the file you’ve downloaded is larger than you’d like, you can re-encode the video with better compression using, for example, Handbrake