Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Trying to play mp4 video file but getting error(This is my simple code whats the problem ?)
Trying to play mp4 video file but getting error [message #712561] Sun, 07 August 2011 12:33 Go to next message
Chocolade Missing name is currently offline Chocolade Missing nameFriend
Messages: 3
Registered: August 2011
Junior Member
" Cannot play video sorry,this video cannot be played."

First here is the manifest xml code:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="(cant post links so)"
      <uses-permission android:name="android.permission.INTERNET"></uses-permission>
      <uses-permission android:name="android.permission.STORAGE"></uses-permission>
    <uses-sdk android:minSdkVersion="8" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".AllFormatsVideoPlayActivity"
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />


And the main code:

package com.AllFormatsVideoPlay;

import android.os.Bundle;
import android.os.Environment;
import android.widget.*;

public class AllFormatsVideoPlayActivity extends Activity {
    /** Called when the activity is first created. */
	VideoView vView;
	String vSource;
    public void onCreate(Bundle savedInstanceState) {
        //File clip=new File(Environment.getExternalStorageDirectory(),"VIDEO0030.mp4");
        vView = new VideoView(this);
        vView = (VideoView)findViewById(;
        //vSource ="";
        vView.setMediaController(new MediaController(this));

I marked with // some lines in my code i used to play before a file on my android device from the internet but now i want to play a video file wich is on my memory card on my android device or maybe its not on the memory card the directory is in the code.

I tried without i: but it didnt work either.

Thanks for help.
Re: Trying to play mp4 video file but getting error [message #1702720 is a reply to message #712561] Fri, 24 July 2015 09:38 Go to previous message
Grab Betterlife is currently offline Grab BetterlifeFriend
Messages: 1
Registered: July 2015
Junior Member
As we all know, Android does announce that MP4 is one of Android compatible formats. However, people still encounter the issue of Android won't play MP4. Why?

The reason is MP4 is a container format which means this format may contain various kinds of audio and video codecs while Android is only compatible with MP4 encoded with MPEG-4 or H.264 AVC.

In order to solve Android doesn't play MP4 videos and successfully play all kinds of MP4 files on Android devices; we had better use iDealshare VideoGo to convert Android unsupported MP4 to Android more supported MP4.

Previous Topic:Upgrading from deprecated action framework
Next Topic:Premature end of file under linux in CLI / not seen under Windows
Goto Forum:

Current Time: Thu Jun 21 22:22:35 GMT 2018

Powered by FUDForum. Page generated in 0.01202 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top