1

I searching a lot but cant find coding part. HTTP LIVE VIDEO STREAMING INTRO.

ts file image

In this Link i want to know how to make index file and '.ts' file and how to implement in iPhone. I have done that coding.

   -(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]; 

 }

but i dont want that. I want This

enter image description here

1 Answers1

0

It is really a difficult part first you have to download http live streaming tool from apple developing site. Then it will install some tools you can use media file segmenter to convert mp4 or any video to .ts and .m3u8 file by ( In terminal write-> mediafilesegmenter -t 10 fileName.mp4) that will convert ts file and m3u8 file. Then you can use in html and in vlc to check your index file. and check out this link

Community
  • 1
  • 1
Prabhjot Singh Gogana
  • 1,408
  • 1
  • 14
  • 39