Note that there are some explanatory texts on larger screens.

plurals
  1. POerror (1, -2147483648) Cannot Play this Video
    primarykey
    data
    text
    <p>I am trying to play an .mp4 video file, which I have added in a <code>raw</code> folder. The result is that I always get an <code>error (1, -2147483648)</code>in LogCat.</p> <p>After some research I notice this is caused by an unsupported codec/format. But the last 2 days I rendered the video in Adobe Premiere according to <a href="http://developer.android.com/guide/appendix/media-formats.html" rel="nofollow">http://developer.android.com/guide/appendix/media-formats.html</a>? in ALL supportd formats and many more.The result is always the same: I get the error and a "Can't play this video." when the app launches.</p> <p>My JAVA code is this:</p> <pre><code>public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); VideoView vv = (VideoView) findViewById(R.id.videoView); String fileName = "//BioLab/res/raw/sequence"; vv.setVideoURI(Uri.parse(fileName)); vv.start(); } } </code></pre> <p>And the main activity is this:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" &gt; &lt;VideoView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/videoView"/&gt; &lt;/RelativeLayout&gt; </code></pre> <p>I have seen games where they play fullscreen videos, like the company logo video. How do they do it? There must be a universal way.</p> <p>NOTE: I use in the java code the path <code>"//BioLab/res/raw/sequence"</code> because if I use <code>"/BioLab/res/raw/sequence.mp4"</code> or <code>“android.resource://” + getPackageName() +”/”+R.raw.video</code> I get another Error in </p> <p>Logcat: <code>error opening trace file: No such file or directory (2)</code></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.
 

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