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

Fontano

macrumors member
Original poster
Jun 27, 2008
72
0
For the last week or so, I have been trying to get MPMoviePlayerController working with streaming video feeds...

No luck.

I am using the MoviePlayer sample as the base...
And I have been working with the movieURL function, to change the source video.

I have been successfully at access video outside of the package, on the local hard drive, and on network access drives... but not streaming to an HTTP or an RTSP.

My latest attempt, was altering the line in movieURL (in MyViewController.m) to
NSString *moviePath = @"http://www.itc.virginia.edu/network/videotest/when-lg.mov";

When the app plays, I get an on screen of:
This Movie Could Not Be Played

The Debug/Log reports:
2008-07-17 10:20:12.194 MoviePlayer[4395:20b] ERROR! Please file a bug report!
2008-07-17 10:20:12.195 MoviePlayer[4395:20b] Could not play the movie http://www.itc.virginia.edu/network/videotest/when-lg.mov. We received the AVController_ItemFailedToPlayNotification with info: Error Domain=NSOSStatusErrorDomain Code=-12783 UserInfo=0x1083d20 "This movie could not be played."


Any ideas on how to go getting this to work?
 

cwoloszynski

macrumors member
Jul 21, 2005
57
6
Progress on this?

Any chance you figured this out? I am seeing the same pop-up but I don't get the notification you do? Would you be willing to share the Notification registration code you used to get it?
 

Fontano

macrumors member
Original poster
Jun 27, 2008
72
0
Any chance you figured this out? I am seeing the same pop-up but I don't get the notification you do? Would you be willing to share the Notification registration code you used to get it?

I was able to access Movies via HTTP progressive download.
I have not returned to accessing a true streaming server, the files I have been able to access where complete video files on the server.

IIRC, I posted this when I was having a problem with the player.
Which ultimately ended up being an incompatibility issue with the DiVX codec/player being installed (The actual one from http://www.divx.com)

The other Problem I was having at the time, is that I didn't change the URL building to use a URL link instead of a local file.

However, at the end of the work, it did work in the simulator, but not the device. And priorities have shifted, so I haven't returned to getting the streaming video to play.
 

developer.in

macrumors newbie
Nov 5, 2008
8
0
I was able to access Movies via HTTP progressive download.
I have not returned to accessing a true streaming server, the files I have been able to access where complete video files on the server.

IIRC, I posted this when I was having a problem with the player.
Which ultimately ended up being an incompatibility issue with the DiVX codec/player being installed (The actual one from http://www.divx.com)

The other Problem I was having at the time, is that I didn't change the URL building to use a URL link instead of a local file.

However, at the end of the work, it did work in the simulator, but not the device. And priorities have shifted, so I haven't returned to getting the streaming video to play.

Hi Fontano

Can you please explain how you achieved it? Are you saving the whole file locally and then playing it?
 

CommanderData

macrumors 6502
Dec 1, 2007
250
3
For the last week or so, I have been trying to get MPMoviePlayerController working with streaming video feeds...

No luck.

I am using the MoviePlayer sample as the base...
And I have been working with the movieURL function, to change the source video.

I have been successfully at access video outside of the package, on the local hard drive, and on network access drives... but not streaming to an HTTP or an RTSP.

My latest attempt, was altering the line in movieURL (in MyViewController.m) to
NSString *moviePath = @"http://www.itc.virginia.edu/network/videotest/when-lg.mov";

When the app plays, I get an on screen of:
This Movie Could Not Be Played

The Debug/Log reports:
2008-07-17 10:20:12.194 MoviePlayer[4395:20b] ERROR! Please file a bug report!
2008-07-17 10:20:12.195 MoviePlayer[4395:20b] Could not play the movie http://www.itc.virginia.edu/network/videotest/when-lg.mov. We received the AVController_ItemFailedToPlayNotification with info: Error Domain=NSOSStatusErrorDomain Code=-12783 UserInfo=0x1083d20 "This movie could not be played."


Any ideas on how to go getting this to work?

Would you care to share code for what you've got so far? I think streaming video off a local network drive would be quite useful by itself... probably even more useful than internet streaming from HTTP. Especially when combined with the VPN access of the iPhone, where I could access many Gigabytes of my LAN content while traveling :)
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
I'm not the original poster, but here's the code I'm using MPMoviePlayer to "stream" (progressive download) movies over HTTP. It's extremely simple:

Code:
NSString *url = @"http://www.example.com/path/to/movie.mp4";
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]];
[moviePlayer play];

This often does not work in the simulator, but is always fine on the device. MPMoviePlayer does not appear to support RTSP.

I think streaming video off a local network drive would be quite useful by itself...

For local files, just substitute the remote URL for a local one:

Code:
NSString *path = [bundle pathForResource:@"movie" ofType:@"mp4"];
NSString *url = [NSURL fileURLWithPath:path];
 

CommanderData

macrumors 6502
Dec 1, 2007
250
3
I'm not the original poster, but here's the code I'm using MPMoviePlayer to "stream" (progressive download) movies over HTTP. It's extremely simple:

Code:
NSString *url = @"http://www.example.com/path/to/movie.mp4";
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]];
[moviePlayer play];

This often does not work in the simulator, but is always fine on the device. MPMoviePlayer does not appear to support RTSP.



For local files, just substitute the remote URL for a local one:

Code:
NSString *path = [bundle pathForResource:@"movie" ofType:@"mp4"];
NSString *url = [NSURL fileURLWithPath:path];


Hmmm. Am I missing something or are you suggesting local as in locally on the iPhone? What I want to do is use Wifi on the iPhone to access networked hard drives. Let's say I have a 2 Terabyte NAS on my local network that I want to access over Wifi from my iPhone for example (which I currently do from my laptop).

If I take the MoviePlayer sample code, can I just supply it the network location like @"smb://NAS/media/videos/mytestvid.mov" or is it more complex than that?
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
are you suggesting local is actually on the iPhone?

Yup, my misunderstanding.

If I take the MoviePlayer sample code, can I just supply it the network location like @"smb://NAS/media/videos/mytestvid.mov" or is it more complex than that?

AFAIK, the movie player doesn't support Samba shares natively. You'd have to start an httpd to serve the videos, and set the URL to be its address on your local network (http://192.168..., etc.), or write your own Samba client to convert it on-the-fly.
 

nikihana

macrumors newbie
Feb 6, 2009
1
0
Sample, please

Hi,

Can you post the code fragment that actually plays a progressive download mp4 strea,?

My app simple crashes when I try it :-(

I am using the MoviePlayer sample as a base...
Thanks,


I was able to access Movies via HTTP progressive download.
I have not returned to accessing a true streaming server, the files I have been able to access where complete video files on the server.

IIRC, I posted this when I was having a problem with the player.
Which ultimately ended up being an incompatibility issue with the DiVX codec/player being installed (The actual one from http://www.divx.com)

The other Problem I was having at the time, is that I didn't change the URL building to use a URL link instead of a local file.

However, at the end of the work, it did work in the simulator, but not the device. And priorities have shifted, so I haven't returned to getting the streaming video to play.
 

iGrump

macrumors newbie
Feb 27, 2009
1
0
If you're having trouble playing m4v etc from a web URL, make sure that the web server has the correct MIME types set up otherwise you will receive an error when trying to stream within iPhone app.

You can check this by trying to view the movie directly in a web browser - if you get a 404/Page not Found error - this is likely to be MIME types.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.