Play RTSP stream from vlcj

This forum is about all development around libVLC.
_severin_
New Cone
New Cone
Posts: 1
Joined: 15 Apr 2015 14:13

Play RTSP stream from vlcj

Postby _severin_ » 15 Apr 2015 14:20

Hello!

Please help me with making an application that can use vlcj to play an rtsp stream.
I can play this url from a vlc player: "rtsp://:8554/test"
I can play a local file from vlcj.
But when I try to open the rtsp stream from vlcj then I get this error:

Code: Select all

run: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/E:/kafir/dev/rtsp_vlcj/slf4j/slf4j-jcl-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/E:/kafir/dev/rtsp_vlcj/slf4j/slf4j-jdk14-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/E:/kafir/dev/rtsp_vlcj/slf4j/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/E:/kafir/dev/rtsp_vlcj/slf4j/slf4j-nop-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/E:/kafir/dev/rtsp_vlcj/slf4j/slf4j-simple-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.JCLLoggerFactory] SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details. Apr 15, 2015 2:01:38 PM uk.co.caprica.vlcj.Info info INFO: vlcj: 3.6.0 Apr 15, 2015 2:01:38 PM uk.co.caprica.vlcj.Info info INFO: java: 1.7.0_72 Oracle Corporation Apr 15, 2015 2:01:38 PM uk.co.caprica.vlcj.Info info INFO: java home: C:\Program Files\Java\jdk1.7.0_72\jre Apr 15, 2015 2:01:38 PM uk.co.caprica.vlcj.Info info INFO: os: Windows 8.1 6.3 amd64 Apr 15, 2015 2:01:38 PM uk.co.caprica.vlcj.binding.LibVlcFactory info INFO: vlc: 2.2.0 Weatherwax, changeset 2.2.0-0-g1349ef2 Apr 15, 2015 2:01:38 PM uk.co.caprica.vlcj.binding.LibVlcFactory info INFO: libvlc: C:\Program Files\VideoLAN\VLC\libvlc.dll [000000000fef89e0] core stream error: corrupt module: C:\Program Files\VideoLAN\VLC\plugins\stream_filter\libdash_plugin.dll [000000000fe85fe0] core demux meta error: corrupt module: C:\Program Files\VideoLAN\VLC\plugins\meta_engine\libtaglib_plugin.dll [000000000feaa7a0] core vout display error: Failed to set on top
I think the last few lines are the interesting ones here.

This is the java code:

Code: Select all

package vlcj.test; import javax.swing.JFrame; import javax.swing.SwingUtilities; import uk.co.caprica.vlcj.binding.LibVlc; import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; import uk.co.caprica.vlcj.runtime.RuntimeUtil; import com.sun.jna.Native; import com.sun.jna.NativeLibrary; import uk.co.caprica.vlcj.player.MediaPlayerFactory; import uk.co.caprica.vlcj.player.headless.HeadlessMediaPlayer; /** * * @author bnovak */ public class VlcjTest2 { private final EmbeddedMediaPlayerComponent mediaPlayerComponent; public static void main(final String[] args) { NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "C:\\Program Files\\VideoLAN\\VLC"); Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new VlcjTest2(args); } }); } private VlcjTest2(String[] args) { JFrame frame = new JFrame("vlcj Tutorial"); mediaPlayerComponent = new EmbeddedMediaPlayerComponent(); frame.setContentPane(mediaPlayerComponent); frame.setLocation(100, 100); frame.setSize(500, 500); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); mediaPlayerComponent.getMediaPlayer().playMedia("rtsp://:8554/test"); } }
I have a 64 bit PC, 64 bit JRE, 64 bit VLC player (and vlclib). I am not sure if the vlcj library is 32 or 64 bit.

So please tell me how to purify that corrupt module :)

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: Play RTSP stream from vlcj

Postby Jean-Baptiste Kempf » 19 Apr 2015 13:29

Your VLC is miscompiled.
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.

slimeball
New Cone
New Cone
Posts: 1
Joined: 05 May 2015 17:10

Re: Play RTSP stream from vlcj

Postby slimeball » 05 May 2015 17:12

You are using to many SLF4J bindings. http://www.slf4j.org/codes.html#StaticLoggerBinder


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests