Page 1 of 1

libVLC on Android: can't see video.

Posted: 16 Sep 2014 21:02
by nirhal
Hi,
I'm trying to use the libVLC for playing a video file.
i have working audio but i can't see picture on the SurfaceView.
LogCat says: yuv_rgb_neon filter: can't get output picture.
also I've notice that the original VLC app doesn't load the yuv_rgb_neon filter, but my app does load it.
what is this filter? how can I disable this filter?

my Code:

Code: Select all

try { mLibVLC = VLCInstance.getLibVlcInstance(); } catch (LibVlcException e) { // faild return; } VLCInstance.updateLibVlcSettings(null); // aout = 1; vout = 0; deblocking = -1; hardwareAcceleration = 2; final SurfaceView mSurface = (SurfaceView) findViewById(R.id.player_surface); SurfaceHolder mSurfaceHolder = mSurface.getHolder(); mSurfaceHolder.setFormat(PixelFormat.RGBX_8888); mSurfaceHolder.addCallback(mSurfaceCallback); //mLibVLC.setHardwareAcceleration(LibVLC.HW_ACCELERATION_FULL); mLibVLC.eventVideoPlayerActivityCreated(true);
my SurfaceHolder Callback:

Code: Select all

private final SurfaceHolder.Callback mSurfaceCallback = new Callback() { @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { if(mLibVLC != null) mLibVLC.attachSurface(holder.getSurface(), MainActivity.this); } @Override public void surfaceCreated(SurfaceHolder holder) { } @Override public void surfaceDestroyed(SurfaceHolder holder) { if(mLibVLC != null) mLibVLC.detachSurface(); } };
playing a Video:

Code: Select all

mLibVLC.setMediaList(); String mLocation = "file:///storage/extSdCard/a.mp4"; mLibVLC.getMediaList().add(new Media(mLibVLC, mLocation)); int savedIndexPosition = mLibVLC.getMediaList().size() - 1; mLibVLC.playIndex(savedIndexPosition); mLibVLC.play(); mSurface.setKeepScreenOn(true);
thanks. :D

Re: libVLC on Android: can't see video.

Posted: 16 Sep 2014 21:31
by nirhal
Got it.
i needed to call "updateLibVlcSettings" before calling "init" on the libVLC instance.

Re: libVLC on Android: can't see video.

Posted: 11 Oct 2014 21:07
by edwardw
Cool.