androidvideomp4playing

Why not all mp4 videos played on Android device?


I tried to play the following two urls by video view on Android device, the first one has worked fine but the second one is not working. the second one may needs ssl certificate but i don't know how to play it the error code appears when I am trying to play it is :

 E/MediaPlayer error (1, -4)

I checked a link that mentioned list of error codes and it said that error(1,-4) means NotSupportedFormat. So why this error doesn't appear in the first link although both videos links are .mp4

The first working link :

 http://i250.photobucket.com/download-albums/gg264/APT08/APTAd3.mp4 

The second not working link :

  http://*********/xxxxxxxxxxxxxxxxxxxxx.mp4
  https://**********/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.mp4

Note1: I asked a question related to this it helps to play the first link but the second still not working on android device

Note2: I am using the following code to play both links:

  VideoView myVideo = (VideoView) findViewById(R.id.videoView1);
         myVideo.setVideoPath("https://*********/bbbbbbbbbbbbbbbbbbb.mp4");
//       myVideo.setVideoURI(Uri.parse("https://*************/bbbbbbbbbbbbbbbbbbbbbbbbb0.mp4"));
    MediaController mc = new MediaController(this);
    mc.setMediaPlayer(myVideo);
    myVideo.setMediaController(mc);
    myVideo.requestFocus();
    mc.show();

Solution

  • we dont have https playback support for android 3.0 - only from 3.0 and above refer http://developer.android.com/guide/appendix/media-formats.html