stream video from the internet
in
Core Library Questions
•
8 months ago
I am using processing 2.0 beta 7 on a Mac. It has a new gstream API to play videos.I can use the processing.movie.Movie to play local video files without any problems, but how can I play stream video from the internet?
public void setup()
{
size(WIDTH, HEIGHT);
myMovie = new Movie(this, "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();
}
I tried to change the filename to a url link which ends with .mp4, but it did not work. Anyone has an idea?
2