x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to load video in mediaplayer from Android external storage?

Hello,

I'm doing an application that will show some videos. They are big (hundreds of MBs) and they could be numerous /changed (e.g. I could phisically load them via USB or download them from the internet), so I would like to store them in the Android External Storage / sdcard, or somewhere else in the filesystem, and then reference them and load them in the MediaPlayer. Is it possible, either with blueprint or C++ scripting?

Product Version: UE 4.11
Tags:
more ▼

asked May 20 '16 at 01:09 PM in Using UE4

avatar image

ocramot
200 16 15 23

avatar image haruna Jun 16 '16 at 02:37 AM

Hi!

Have you configured the Android Manifest to request permissions to access files in the SD Card? You should add this command to your Project Settings→Platforms - Android→Advanced APKPackaging Extra permissions.

https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE

You'll need to do that for starters.

avatar image ocramot Jun 17 '16 at 12:29 PM

Thank you! I didn't notice that I could add specific extra permissions to the manifest ( I didn't event thought that I should... I thought that UE4 packaging was handling these by itself) Still I don't know what path I have to use to access the sdcard or Internal Storage, but that's a start.

avatar image haruna Jul 04 '16 at 01:32 AM

You can get the file path this way: adb shell "echo $EXTERNAL_STORAGE" I don't know if you can run that command from within UE4 and check the validity of the result or not.

avatar image newtori Apr 17 '17 at 03:26 PM

Hello,

I'm having the same problem and would like to know if you could figure out a solution? I tried using LoadVideo, but I could not make the video work and I didn't find the documentation for that function.

alt text

Also I tried to generate a DLC package, they work very well, but I could not make the videos stay inside the DLC package :(

alt text

The DLC installation was done this way below alt text

avatar image ocramot Apr 18 '17 at 07:34 AM

Hello, I'm sorry but I eventually gave up and stored the files I needed in the /Movie filder, inside the .obb file. Of course I couldn't download any other. Still, I tried to solve this problem in 4.11, before the MediaPlayer overhaul in 4.13 (or was it 4.14?), so my answer would probably not be valid anymore.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question