0

I need to build my own video player with AVFoundation and came way far. But the player only plays the .mp4-file in simulator. No video shows up if I run the app on a device. But if I use a .mov-file all is working fine. Also when I play the video file inside an MPMoviePLayer the file shows up and plays well.

the .mp4-file uses

AVC Coding, 2.048 x 1.536 AAC, 48000 Hz, Stereo (L R)

The audio track is empty.

Does anybody know why? Here is some sample code.

headkit
  • 3,307
  • 4
  • 53
  • 99

1 Answers1

2

Because your introCycle_sml.mp4 is of 2048x1536 pixels and data rate is 3.71 Mbits/s, while iOS supports MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels.

onegray
  • 5,105
  • 1
  • 23
  • 29
  • hm - ok. sounds like it could be the reason. thnx! but I need to have a crisp video on retina iPad3. what is the best solution here? – headkit Aug 30 '12 at 10:30
  • I suggest to recompress video to H.264 1080p - the max allowed resolution for iPad3. – onegray Aug 30 '12 at 12:25
  • Sorry, my bad. Even New iPad able to play h264 1080p video, but `MPMoviePlayerController` supports "H.264 Baseline Profile Level 3.0 video, up to 640 x 480 at 30 fps". – onegray Aug 30 '12 at 12:44