-2

I am usign Gary example from here.

The only modify is that I load a local video like this:

    mMediaUrl = "/storage/emulated/0/MyFolder/20161003_1217.mp4";

and I get the following error:

10-03 12:54:13.588 16681-17397/windylabs.com.vlcplayersample E/VLC-std: Warning: input_item_SetURI("/storage/emulated/0/MyFolder/20161003_1217.mp4"): file path instead of URL.
10-03 12:54:13.588 16681-17397/windylabs.com.vlcplayersample E/VLC-std: input_SplitMRL("/storage/emulated/0/MyFolder/20161003_1217.mp4") probably not a valid URI!
10-03 12:54:15.718 16681-17399/windylabs.com.vlcplayersample E/VLC: [dece4214] core input: open of `/storage/emulated/0/MyFolder/20161003_1217.mp4' failed
10-03 12:54:15.728 16681-17399/windylabs.com.vlcplayersample E/VLC: [dece4214] core input: Your input can't be opened
10-03 12:54:15.728 16681-17399/windylabs.com.vlcplayersample E/VLC: [dece4214] core input: VLC is unable to open the MRL '/storage/emulated/0/MyFolder/20161003_1217.mp4'. Check the log for details.

I don't know where the logs specified on the error are. The example, with the video streamed from here it is working, but the video from my sdcard isn't played!

ghita
  • 2,746
  • 7
  • 30
  • 54

2 Answers2

1

I have found the solutin, maybe wil help someone, sometime.

You need to load file like this:

mMediaUrl = Uri.fromFile(pathToMediaFile).toString();
ghita
  • 2,746
  • 7
  • 30
  • 54
0

Try this

mMediaUrl = "/sdcard/MyFolder/20161003_1217.mp4";

or check READ_EXTERNAL_STORAGE permission in manifest.

Piyush
  • 18,895
  • 5
  • 32
  • 63
D.J
  • 1,439
  • 1
  • 12
  • 23