Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Could not play mp4 video with VideoView?
    primarykey
    data
    text
    <p>I am trying to stream mp4 video with fullscreen activity only contain of videoview. But even though it easily play on my galaxt s3, it does not play most of the devices. I suspect its about encoding of the video (by the way you have to be codec guru to know which video play which not).</p> <p>Here is the code I am using.</p> <pre><code> //make screen full with video requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.full_screen_video); //get extra video source string Intent intent = getIntent(); if(intent != null){ videoSrc = intent.getStringExtra(TefalTvApp.RECIPE_VIDEO_SOURCE); if (DEBUG) { Log.d(TAG, "Recipe title : " + videoSrc); } } video = (VideoView) findViewById(R.id.recipeVideo); controller = new MediaController(FullScreenVideoActivity.this); controller.setMediaPlayer(video); video.setMediaController(controller); video.setVideoPath(videoSrc); video.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub if (DEBUG) { Log.d(TAG, "Hello wworld"); } } }); video.setOnPreparedListener(new OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { video.requestFocus(); video.start(); } }); </code></pre> <p>Here is the debug result. You have the video url in the debug.</p> <pre><code>08-23 23:25:53.349: D/RecipeDetailActivity(18179): Video src : http://www.tefaltv.com/Upload/Video/acticook_kiymalifasulye.mp4 08-23 23:25:53.379: I/ApplicationPackageManager(18179): cscCountry is not German : TUR 08-23 23:25:53.389: D/FullScreenVideoActivity(18179): Recipe title : http://www.tefaltv.com/Upload/Video/acticook_kiymalifasulye.mp4 08-23 23:25:53.399: D/VideoView(18179): onMeasure() 08-23 23:25:53.399: I/VideoView(18179): Setting size: 480x295 08-23 23:25:53.439: I/MediaPlayer(18179): uri is:http://www.tefaltv.com/Upload/Video/acticook_kiymalifasulye.mp4 08-23 23:25:53.439: I/MediaPlayer(18179): path is null 08-23 23:25:53.439: D/MediaPlayer(18179): Couldn't open file on client side, trying server side 08-23 23:25:53.519: D/VideoView(18179): onMeasure() 08-23 23:25:53.519: I/VideoView(18179): Setting size: 480x295 08-23 23:25:57.689: I/VideoView(18179): start() 08-23 23:25:57.739: D/VideoView(18179): onMeasure() 08-23 23:25:57.739: I/VideoView(18179): Setting size: 480x270 08-23 23:25:57.759: E/MediaPlayer(18179): error (1, -2147483648) 08-23 23:25:57.769: I/VideoView(18179): start() 08-23 23:25:57.779: E/MediaPlayer(18179): start called in state 0 08-23 23:25:57.779: E/MediaPlayer(18179): error (-38, 0) 08-23 23:25:57.799: E/MediaPlayer(18179): Error (1,-2147483648) 08-23 23:25:57.799: D/VideoView(18179): Error: 1,-2147483648 08-23 23:25:57.799: E/MediaPlayer(18179): Error (-38,0) 08-23 23:25:57.799: D/VideoView(18179): Error: -38,0 </code></pre> <p>UPDATE : Video encoding details : Format : H.264, 624 x 351 AAC, 44100 Hz, Stereo (L R) FPS : 25 Data Rate: 2.23mbit/s Current size : 624x351 px actual</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload