Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

man2manno

macrumors member
Original poster
Mar 21, 2009
55
0
Hey guys, so I have been reading around and I believe I have found that it is possible to stream live video from VLC on a computer to your iphone app. My question is how to do that? Is it more complicated than I think? Right now I have the following code:

Code:
	NSURL *url = [NSURL URLWithString:@"<ip address of computer>"];
	
	MPMoviePlayerViewController *playerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
	[self presentMoviePlayerViewControllerAnimated:playerController];
	
	playerController.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
	
	[playerController.moviePlayer play];
	
	[playerController release];playerController = nil;

Is there more to it or is it that simple? Also does the stream have to be HTTP or can it be like UDP or something else? Any good tutorials or anything?

Thanks a lot.
 
Thanks, that is what I am looking to do, but I want to code that for part of my app. Any ideas?

So I have the following code:

Code:
	NSURL *url = [NSURL URLWithString:@"http://xxx.xxx.xx.xx:8080"];
	[url scheme];

	MPMoviePlayerViewController *playerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];

	[self presentMoviePlayerViewControllerAnimated:playerController];
	playerController.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;

	[playerController.moviePlayer play];
	[playerController release];playerController = nil;

And I am trying to load a live video stream (from VLC) and the movieplayer opens but only for a quick second the dismisses. Any Idea why? Any thoughts would be much appericated.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.