We write .mp4 files to a “Movies” in Android’s default storage location. We know the path of the video on this device is /storage/emulated/0/Movies/movie.mp4. Using mediaplayer’s openfile() and openurl() we cannot get the movie to play on Android (PC in editor with a mediasource works fine).
In general, this is what we see in logcat:
LogAndroidMedia: Warning: File doesn’t exist
Looking at the mediaplayer source, there are multiple points at which the provided directory is changed to “asset” and “local” paths. I’ve added and now removed numerous engine changes to force usage of the provided path, as it is generated in GameActivity.Java, and we access the string via AndroidJNI changes.
Also tried: Appending “file://” before all paths
Paths relative to UE4Game folder using …/ convention
I’ve even printed the changed & resolved paths, and copied the movie to every location that MediaPlayer may be reading from. Are there any examples of playing an external, non-asset video with OpenFile() or OpenURL() on Android?