libVLC and android

This forum is about all development around libVLC.
mckn
New Cone
New Cone
Posts: 1
Joined: 15 Feb 2020 14:00

libVLC and android

Postby mckn » 15 Feb 2020 14:10

Hello,

I am trying to integrate libVLC in my android application but I can't get the video to be displayed properly.
I don't get any errors in the logs and the video is being played as in the attached video below.

Logfile:
[url]https://pastebin.com/raw/czCZ03hE[/url]

Video example:
[url]https://imgur.com/7Rr3aNf[/url]

I am basically doing this:

Code: Select all

ArrayList<String> args = new ArrayList<>(); args.add("-vvv"); args.add("--http-reconnect"); LibVLC libVLC = new LibVLC(context, args); MediaPlayer player = new MediaPlayer(libVLC); SurfaceTexture texture = textureEntry.surfaceTexture(); IVLCVout videoOut = player.getVLCVout(); videoOut.setVideoSurface(texture); videoOut.attachViews(); Media media = new Media(libVLC, uri); player.setMedia(media); mediaPlayer.play();

Any ideas on how to make this work properly?
Thanks in advance!

someusername
New Cone
New Cone
Posts: 7
Joined: 31 Oct 2019 18:04

Re: libVLC and android

Postby someusername » 15 Feb 2020 19:11

works for me

~
VLCVideoLayout vlcVideoLayout = //findViewById VLCVideoLayout

MediaPlayer mediaPlayer = new MediaPlayer(new Media(new LibVLC(context, args), /*url path etc*/ ));

mediaPlayer.attachViews(vlcVideoLayout, null, false, false);
mediaPlayer.play();


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 27 guests