libVLC on Android: can't see video.

This forum is about all development around libVLC.
nirhal
New Cone
New Cone
Posts: 4
Joined: 16 Sep 2014 20:50

libVLC on Android: can't see video.

Postby nirhal » 16 Sep 2014 20:59

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15231
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 16 Sep 2014 22:29

yuv_rgb_neon converts YUV video to RGB colour space with the NEON vector unit. It is there because your application requests RGB format.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 08 Jul 2015 17:14

Was there ever a resolution to this actual issue (the video not showing)?

I'm getting the same error trying to integrate libVLC into an Android app. Thx.

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 09 Jul 2015 17:31

As further information - the first fishy thing I see in the log is this warning:

Code: Select all

W/VLC﹕ [5d1e0d0c] core video output: Not enough display buffers in the pool, requested 3 got 1
Next is:

Code: Select all

E/VLC﹕ [5d0ade94] core vout display: Failed to change zoom
And then it starts producing these:

Code: Select all

W/VLC﹕ [5d26acbc] yuv_rgb_neon filter: can't get output picture

Rémi Denis-Courmont
Developer
Developer
Posts: 15231
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 09 Jul 2015 20:32

This means that, for whatever reasons, YUV to RGB conversion was necessary, and the conversion filter was unable to allocate an output buffer.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 09 Jul 2015 21:37

Okay, so what could be some of those reasons?

Have I not initialized something properly?

Can you give me any pointers for where to look in my logic flow?

Thanks for your help.

Rémi Denis-Courmont
Developer
Developer
Posts: 15231
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 09 Jul 2015 22:41

I don't know.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 11 Jul 2015 18:24

For anyone else that has this issue, I solved it - at least for my case.

It turned out to be an order of operations problem. I was calling init() on my LibVlc instance before I had set options like hardware acceleration, etc.

Setting these options first and then calling the init solved the problem.

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: libVLC on Android: can't see video.

Postby Jean-Baptiste Kempf » 15 Jul 2015 23:18

For anyone else that has this issue, I solved it - at least for my case.

It turned out to be an order of operations problem. I was calling init() on my LibVlc instance before I had set options like hardware acceleration, etc.

Setting these options first and then calling the init solved the problem.
Those options should now be on the media level.
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.

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 16 Jul 2015 13:53

Can you please explain what you mean? Looking at the source here:

https://github.com/simonlinj/vlc-androi ... tance.java

All of those options are set when the libVlc instance is created.

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: libVLC on Android: can't see video.

Postby Jean-Baptiste Kempf » 16 Jul 2015 14:38

This is not the source of VLC/Android.
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.

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 16 Jul 2015 18:56

Okay. Is there a repo with the official source?

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: libVLC on Android: can't see video.

Postby Jean-Baptiste Kempf » 16 Jul 2015 21:16

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.

ebr
Blank Cone
Blank Cone
Posts: 18
Joined: 08 Jul 2015 17:07

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

Postby ebr » 16 Jul 2015 22:20

Thanks very much.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests