title: What format to use for playing video from Internet on Android?
body: <p>I'm trying to load a video into a <code>VideoView</code> and <code>MediaController</code> with the following code:</p>
  <pre><code>video.setVideoURI(Uri.parse(uri));
            
  mediaController = new MediaController(this);
  mediaController.setMediaPlayer(video);
  mediaController.setAnchorView(footer);
  video.setMediaController(mediaController);
  video.requestFocus();
  video.start();
  </code></pre>
  <p>If I use a .3gp file (such as <a href="http://rtsp://v6.cache1.c.youtube.com/CjYLENy73wIaLQnF4qJzpSt4nhMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYMDFmvL1wMysTQw=/0/0/0/video.3gp" rel="nofollow noreferrer">this</a>) it plays. But my MP4 file won't play just bringing up a dialog box saying:</p>
  <blockquote>
  <p>Sorry, this can't play this video</p>
  </blockquote>
  <p>I accept the video may not be in the correct formats for such a purpose as I didn't make it a colleague did. What format should the videos be in?</p>
  <p>I use Handbrake usually and am running Ubuntu.</p>
  <p>Format Currently:</p>
  <blockquote>
  <p><strong>Video:</strong></p>
  <p>Dimensions: 1024 x 624</p>
  <p>CODEC: H.264 /AVC</p>
  <p>Framerate: 30 frames per second</p>
  <p>bitrate: 1307kbps</p>
  <p><strong>Audio:</strong></p>
  <p>CODEC: MPEG-4 AAC audio</p>
  <p>Channels: Stereo</p>
  <p>Sample rate: 44100 Hz</p>
  <p>Bitrate: 63kbps</p>
  </blockquote>
  <p>Here are some errors from LogCat when playing it as a resource:</p>
  <pre><code>12-20 10:54:26.120: I/MediaPlayer(27966): uri is:android.resource://com.android.player/2130968576
  12-20 10:54:26.120: I/MediaPlayer(27966): path is null
  12-20 10:54:26.160: E/MediaPlayer(27966): Unable to to create media player
  12-20 10:54:26.160: D/MediaPlayer(27966): Couldn't open file on client side, trying server side
  12-20 10:54:26.160: I/MediaPlayer(27966): prepareAsync called in state 4
  12-20 10:54:26.160: E/MediaPlayer(27966): error (1, -2147483648)
  12-20 10:54:26.210: E/MediaPlayer(27966): Error (1,-2147483648)
  12-20 10:54:26.210: D/VideoView(27966): Error: 1,-2147483648
  </code></pre>