1
votes

I am using MPMoviePlayerController to play .mp4 file, while I'm testing .mp4 recorded in windows platform its working fine, however .mp4 recorded using Android is not playing in my iOS device(iPod touch), Player keeps on buffering it.. Any Idea what could be the problem? And please help me, how to debug the issue in MPMoviePlayerController.

        NSURL *file_url = [NSURL fileURLWithPath:filepath];
        moviePlayer =  [[MPMoviePlayerController alloc]
                        initWithContentURL:file_url];

        moviePlayer.controlStyle = MPMovieControlStyleDefault;
        moviePlayer.shouldAutoplay = YES;
       // moviePlayer.useApplicationAudioSession = YES;
        [self.view addSubview:moviePlayer.view];
        [moviePlayer setFullscreen:YES animated:YES];

thanks

1
Mp4 file recorded from iOS, windows is working fine, But from Android, it's not playing. - Newbee
Since MP4 is just a container file format, it does not define the codec used. So the android probably uses another codec. You can check this by loading the file in VLC and checking the codec used. If the code that android uses is not supported by iOS that you will not be able to play the file with MPMoviePlayerController. - rckoenes
I have downloaded the file and played with quick time, it is playing fine. Problem is with MPMoviePlayerController. - Newbee
No, the problem is that iOS does not have the correct codec to play the file. QuickTime will play more files then iOS will. - rckoenes
@rckoenes May be you are right, Any idea, what should I do now? - Newbee

1 Answers

2
votes

I have found the problem, iOS not supporting the audio format, which is recorded in Android. Now I recorded using AAC it is playing fine.