Processing has a Movie class (http://processing.org/reference/libraries/video/Movie.html) which is capable of playing videos. I have no problem with playing local video files with the following code.
public void setup()
{
size(WIDTH, HEIGHT);
myMovie = new Movie(this,/Users/mike/Documents/abc.mp4");
myMovie.play();
}
public void draw()
{
//(WIDTH-myMovie.width)/2
image(myMovie, 0, 0);
}
// Called every time a new frame is available to read
public void movieEvent(Movie m)
{
m.read();
}
But now i want to play streaming video from the internet, I don't know how to do it. I tried to just change the file name to a url link which ends with .mp4 (such as http://www.abc.com/abc.mp4), but it didn't work.
Anyone knows how to play streaming videos with processing?