[android] LibVLC MRL loading error

This forum is about all development around libVLC.
theredfox
New Cone
New Cone
Posts: 2
Joined: 15 May 2015 15:16

[android] LibVLC MRL loading error

Postby theredfox » 16 May 2015 12:28

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: [android] LibVLC MRL loading error

Postby Jean-Baptiste Kempf » 19 May 2015 23:16

What logs?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 27 guests