dragon
dragon

Reputation: 317

MPMoviePlayerController Play only audio not video

I have downloaded two .mov files from internet and add it to resource folder in my project.

Then i play both video files using MPMoviePlayerController..

One file play audio and video ,but another one only plays audio file not video...

Can anyone help me ?

Thanks in advance........

Both files are .mov files.

Upvotes: 0

Views: 1465

Answers (1)

lewiguez
lewiguez

Reputation: 3823

I would check the video encoding of the files. MOV files can contain a whole bunch of different video codecs (audio too) and if you downloaded them from the Internet, there could be a chance that it was encoded with a video codec not supported on the iPhone. That would explain why one plays and the other only plays audio (can't read video).

I'd try re-encoding as H.264 content (maybe as an MP4 too...) in Quicktime (or whatever else video encoding software you might have) and see if both are being played or if you're still only getting one to play.

Edit

The iPhone SDK has this to say about MPMoviePlayerController and its supported formats

Supported Formats

This class supports any movie or audio files that already play correctly on an iPod or iPhone. This includes both streamed content and fixed-length files. For movie files, this typically means files with the extensions .mov, .mp4, .mpv, and .3gp and using one of the following compression standards:

  • H.264 Baseline Profile Level 3.0 video, up to 640 x 480 at 30 fps. (The Baseline profile does not support B frames.)

  • MPEG-4 Part 2 video (Simple Profile)

If you use this class to play audio files, it displays a white screen with a QuickTime logo while the audio plays. For audio files, this class supports AAC-LC audio at up to 48 kHz, and MP3 (MPEG-1 Audio Layer 3) up to 48 kHz, stereo audio.

Upvotes: 1

Related Questions