Importing Live Internet Video in Processing


Hi there, I was just wondering if it is possible to import a live internet video feed from the following weblink into Processing:

Ultimately I wish to manipulate the live video but for now I would just like to import it into the Processing window.

Thanks for you help.


If the direct video link is http you should be able to pass it in where you’d normally pass the file in Processing Video’s Movie class. For some reason the url protocols are restricted. You could also use PraxisLIVE - the video library there doesn’t have that restriction.


Thanks for replying. So you’re saying because the link has some restrictions, there’s no way I can bring it into my Processing sketch?


I have no idea without digging into the source of that webpage and finding the actual link to the video stream.

i could open in VLC


I think it works as http too so you might be in luck. Use a Movie example from the Video library and pass in that link (as http not https) instead of the filename. Does it work?


I’m new to all this, not sure where in the code I should paste the http link. The video library examples all read from an existing video file.


In place of the file name. eg. In the Loop example in place of "launch2.mp4" put "http://<whatever the link is>"


Thanks for replying, I’ve tried that but nothing is playing in my sketch. Here is the code, I don’t know if I’m doing something wrong:

Movie syn;

void setup() {

  syn = new Movie(this, "");

void draw() {
  image(syn, 0, 0);


Not the .html link, the .m3u8 link that was posted earlier.


Just tried it but it still doesn’t work, any idea why?

Movie syn;

void setup() {

  syn = new Movie(this, "");

void draw() {
  image(syn, 0, 0);


The link has changed - it’s now

The problem you’ll have is finding the link each time. It will probably change every few hours. I used a Linux CLI tool called youtube-dl to extract the link. It’s currently working in PraxisLIVE with GStreamer 1.x so should work with Video Library v2 beta if not v1.


If the page url is stable, and the form of the link is stable – but the subdomain and suffix changes all the time – then you can retrieve the url dynamically at run time using a regex. Something like this:

String[] pageHTML = loadStrings("");
String camURLpattern = "'(https://hddn)(\\d*)(*?)(.m3u8)(.*?)'"; // pg04frmj4t7csjlsufthoqsqm1"
String[] m = match(join(pageHTML, ""), camURLpattern);
String camURL = m[1] + m[2] + m[3] + m[4] + m[5] + m[6];

As long as the url follows the pattern you specify, the code will pick it up – assuming you can then load the live video directly with (untested).


Try the IPCapture library that you can install in Processing using the Contribution Manager. Unsure if it will work with your video format but worth checking:



@jeremydouglass that depends on the link being in the HTML source, which as far as I can tell it isn’t or I wouldn’t have needed to use youtube-dl in the first place :smile: It’s a blob uri. I had a quick look and couldn’t find any easy obvious way to extract it in Processing. eg.

@kfrajer as far as I can tell that library says it’s just for MJPEG? Which would make sense if it’s pure Java. The Video library should be able to play this, GStreamer certainly is fine, but getting the actual link is more “fun”.

@kll How did you get the link when you first posted?


i dig website with inspect ?media? …
but when i call it in browser a download started.
when i click that: vlc started and show the stream
for a few seconds. reloading the same link does not work,
must run program again to get a new “a=xxxxx”

that way can find it, BUT not show it??

again call browser, get download, click VLC works

String theURL = "";
String thestart = "";
String theend = "'},";
String[] incoming;
int srcindex, srcend;
String line,picsrc;
PImage found;
boolean foundone = false;

void setup() {
  incoming = loadStrings(theURL);

  for (int i=0; i<incoming.length; i++) {
    line = incoming[i];
    srcindex = line.indexOf(thestart);
    if ( srcindex > 0 )//&& srcend > 0 && srcend > srcindex) 
      picsrc   = line.substring(srcindex);                        // use second part
      srcend   = picsrc.indexOf(theend);                          // search end in that part only
      println("i "+i+" srcindex "+srcindex+" srcend "+srcend);
      picsrc = picsrc.substring(0, srcend);                       // cut of rest
      //found = loadImage(picsrc);
      foundone = true;

void draw() {
//  if ( foundone ) image(found,0,0);