我搜索了很多,但找不到编码部分。HTTP 实时视频流介绍。
在此链接中,我想知道如何制作索引文件和“.ts”文件以及如何在 iPhone 中实现。我已经完成了编码。
-(void)replayVedio
{
NSURL *url = [NSURL URLWithString:@"http://www.cwtmedia.se/cwtiphone/cwtvideo.mp4"];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[moviePlayer setControlStyle:MPMovieControlStyleDefault];
moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
CGRect frame;
if(self.interfaceOrientation ==UIInterfaceOrientationPortrait)
frame = CGRectMake(0, 0, 320,400);
// else if(self.interfaceOrientation ==UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation ==UIInterfaceOrientationLandscapeRight)
// frame = CGRectMake(0,0, 210, 170);
[moviePlayer.view setFrame:frame]; // player's frame must match parent's
[self.view addSubview: moviePlayer.view];
[self.view bringSubviewToFront:moviePlayer.view];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
[moviePlayer prepareToPlay];
[moviePlayer play];
}
但我不想要那个。我要这个