ios - MPMoviePlayerViewController not playing the video mp4 -


https://dl.dropboxusercontent.com/u/52719649/69090d547c8d47dd27b6d271649c59ae.mp4

nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *documentsdirectory = [paths objectatindex:0]; nsstring *path = [documentsdirectory stringbyappendingpathcomponent:@"samplevideo.mp4"]; nsurl *url = [nsurl fileurlwithpath:path]; self.controller = [[mpmovieplayerviewcontroller alloc] initwithcontenturl:url]; [self.controller.movieplayer setcontrolstyle:mpmoviecontrolstyledefault]; [self presentmovieplayerviewcontrolleranimated:self.controller]; [self.controller.movieplayer play]; 

you need recompress video current compression incorrect:

  • h.264 main profile level 4.0 video

here guidance form apple:

  • h.264 baseline profile level 3.0 video, 640 x 480 @ 30 fps. (the baseline profile not support b frames.)
  • mpeg-4 part 2 video (simple profile)

the audio might need changed according to:

(...) class supports aac-lc audio @ 48 khz, , mp3 (mpeg-1 audio layer 3) 48 khz, stereo audio.

for mpmovieplayercontroller (class reference in apple's documentation).


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -