Downloading broadcasts in 31 sloc

Our national television station Canvas ( recently decided to add a extensive bunch of high quality broadcasts to its streaming selection. However, streaming often is slow, tends to have hiccups on unstable connections and the selection isn’t forever. Broadcasts seem to disappear from the site 30 days after initial publication.

So I made a tiny shell script to make it easier to save some stuff for later. makes this quite easy by using a public JSON API to list up the Transport Stream chunks that contain a broadcast. The shell script queries this API to request the list of chunks, and nicely concatenates all TS chunks to one usable file. And it only takes about 110th of the regular streaming time to download to file.

Have a look here if you’re interested:

Update: Canvas doesn’t like me

In November last year, I published a simple bash script that could talk to the streaming API, allowing a techie to download a stream from their website to their own harddisk. As a good Internet citizen, I posted the script on my GitHub account.

This evening, about five months after initial publication, I received an email from the VRT (Flemish Radio- and Television Network Organisation) legal counsel urging me to cease and desist. So I have printed out the 31 lines of source code and shredded them with knives and other household tools, of course only after making each line unreadable with whiteboard markers.

However, the “vulnerability” on their website has not yet been addressed, and anyone with a modern browser (e.g. Chrome) can see in their Dev Tools network tab what is going on. Quite publicly. Which is perhaps unfortunate for a brand new, and probably expensive website. Anyhow: the script has been removed and is no longer available on GitHub.