Page 1 of 1

[android] LibVLC MRL loading error

Posted: 16 May 2015 12:28
by theredfox
Hi everybody, 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 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

Code: Select all

libvlc.playMRL(videoMedia.getMrl());
This is my code, it basically initializes LibVLC and try to load a video from a path.

Code: Select all

// 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"); String[] options = libvlc.getMediaOptions(0); Log.d(TAG, options.toString()); 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.

Re: [android] LibVLC MRL loading error

Posted: 19 May 2015 23:16
by Jean-Baptiste Kempf
What logs?