How to import a Live stream link to processing?

Hi alls!

I am newbie to Processing. I have an idea to create a visual interaction with live-stream video from facebook, twitter or from other source as Vimeo, youtube.
I think what is needed is the IP address of the person who got on stream (that is not a problem).

Then does anyone know how to create a proper code for doing so?

Thank you so much! I would very much appreciate!

luonglinhle.

Unfortunately this is a really hard problem. Facebook, Twitter, Vimeo, and YouTube all use different livestreaming systems, and all try (in various ways) to prevent you from interacting with it programmatically. Most of them also rely on a full web browser to run a stream – e.g. you can’t contact a url directly and get the stream without loading facebook.com in the browser and logging in. If they find out there is a way around that, they stop it – that’s how they keep people viewing their advertising.

I am not an expert, and things are changing rapidly. If you were able to run Processing p5.js code in a web browser, you might be able to interact with a live html5 video object – but I wouldn’t bet on it. This is a hard problem – I would definitely not recommend it for a new programmer. Instead, you might focus on one re-streaming technology for one platform (e.g. youtube) and have your sketch interface with just that. Still hard, but less hard.

1 Like

Hi Jeremy,

I don’t understand why it is hard? Can I just do it on p5.js with node.js to create rtsp live streaming through a server? I have not yet tried but just read about that. It would only be problem with talking to client receiving data from server, I guess.

Well, sure, if you think it is easy, maybe it is–try it!

Do you want your sketch to send video TO facebook, or get video FROM Facebook? Very different. TO facebook is well-understood–they have an API. But I thought you wanted to load streams from facebook and process them in your sketch. Maybe I don’t understand what your sketch is supposed to do–you could explain more.

You might also consider looking at work by p5.js users who work with streaming video–for example, I believe that @lmccart does.

See also related discussions of point-to-point streams (non-platform), like