i am trying to use the vlc library to reproduce a video in my application.
I must be missing something because if i run the vlc-android application it works.
I thought it was a fault due to the file location but then i took the location string from the vlc app using the logging system but it doesn't work anyway.
Quite strange there must be some parameter to set before call libvlc.playMRL(videoMedia.getMrl());
This is my code, it basically initializes LibVLC and try to load a video from a path.
// Create a new media player
libvlc = new LibVLC();
libvlc.init(this);
libvlc.setHardwareAcceleration(LibVLC.HW_ACCELERATION_DISABLED);
libvlc.setSubtitlesEncoding("");
libvlc.setAout(LibVLC.AOUT_OPENSLES);
libvlc.setTimeStretching(true);
libvlc.setVerboseMode(true);
if(LibVlcUtil.isGingerbreadOrLater())
libvlc.setVout(LibVLC.VOUT_ANDROID_WINDOW);
else
libvlc.setVout(LibVLC.VOUT_ANDROID_SURFACE);
EventHandler.getInstance().addHandler(mHandler);
holder.setKeepScreenOn(true);
Media videoMedia = new Media(libvlc, "file:///storage/emulated/0/DCIM/Camera/20150513_005427.mp4");
libvlc.playMRL(videoMedia.getMrl());
And this is the error i get:
core input: open of `file:///storage/emulated/0/DCIM/Camera/20150513_005427.mp4' failed core input: Your input can't be opened core input: VLC is unable to open the MRL 'file:///storage/emulated/0/DCIM/Camera/20150513_005427.mp4'. Check the log for details.