我必须开发一款播放视频的iPhone播放器。我没有太多的视频编码和信号编码背景。当我测试一些.mp4和.mov文件时,我发现只能播放具有适合iPhone屏幕尺寸的分辨率的视频,并且无法播放更大的尺寸。在这种情况下,是否有任何解决方案可以在iPhone上播放所有电影大小。请给我一些指导。提前谢谢了。播放视频的代码如下:
NSURL *url = [NSURL URLWithString:@"http://192.65.123.108/test1.mov"];
//this movie has size of 480x272 can be played, other larger resolution cannot be played
_moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:url];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:_moviePlayer];
_moviePlayer.controlStyle = MPMovieControlStyleDefault;
_moviePlayer.shouldAutoplay = YES;
[self.view addSubview:_moviePlayer.view];
[_moviePlayer setFullscreen:YES animated:YES];
答案 0 :(得分:0)
我认为没有办法做到这一点,除非您可以在播放之前缩小视频。但它可能效率低下。