Page 1 of 1

Accessing a remote DVR by VLCJ

Posted: 05 Dec 2013 20:08
by vhugo006
Hello,

I need your help. I'm new in this platform. I'm trying to execute the code below.
But, it's throwing this error:

Code: Select all

libdvdnav: Using dvdnav version 4.2.0 libdvdread: Could not open C:\Documents and Settings\Administrador\workspace\VLCJ\rtsp:\\admin:admin@10.140.562.98:554\cam\realmonitor?channel=1&subtype=0 with libdvdcss. libdvdread: Can't open C:\Documents and Settings\Administrador\workspace\VLCJ\rtsp:\\admin:admin@10.140.562.98:554\cam\realmonitor?channel=1&subtype=0 for reading libdvdnav: vm: failed to open/read the DVD
I'm trying to access a DVR. Can you you see the problem?

Code: Select all

public class Tutorial1B { private final EmbeddedMediaPlayerComponent mediaPlayerComponent; public static void main(String[] args) { NativeLibrary.addSearchPath( RuntimeUtil.getLibVlcLibraryName(), "C:\\Arquivos de programas\\VideoLAN\\VLC" ); Native.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class); SwingUtilities.invokeLater(new Runnable() { public void run() { new Tutorial1B(); } }); } private Tutorial1B() { JFrame frame = new JFrame("HUY vlcj"); mediaPlayerComponent = new EmbeddedMediaPlayerComponent(); frame.setContentPane(mediaPlayerComponent); frame.setLocation(100, 100); frame.setSize(1050, 600); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); String mrl = new RtspMrl().host("admin:admin@10.140.562.98") .port(554) .path("/cam/realmonitor?channel=1&subtype=0") .value(); System.out.println(mrl); mediaPlayerComponent.getMediaPlayer().playMedia(mrl); } }

Re: Accessing a remote DVR by VLCJ

Posted: 05 Dec 2013 20:19
by sherington
1. Which version of vlcj are you using?
2. Start your JVM with -Dvlcj.log=DEBUG and find that part starting with "setMedia(media=" and post what follows.

Re: Accessing a remote DVR by VLCJ

Posted: 05 Dec 2013 20:33
by vhugo006
1. Which version of vlcj are you using?
2. Start your JVM with -Dvlcj.log=DEBUG and find that part starting with "setMedia(media=" and post what follows.
sherington
1. <dependency>
<groupId>uk.co.caprica</groupId>
<artifactId>vlcj</artifactId>
<version>2.1.0</version>
</dependency>


2. Can you help me with the second?

Re: Accessing a remote DVR by VLCJ

Posted: 05 Dec 2013 20:54
by sherington
OK, something changed with regards to URL handling but I don't recall which version of vlc/vlcj.

At least one fix was made for URL handling in vlcj so you really should upgrade to the latest version, which right now is 2.4.1.

If that still doesn't work, then you should post the logs - so what you do is when you run your Java program:

a) assuming the command-line, when you execute the java command you must do "java -Dvlcj.log=DEBUG <your other command-line here>", or;
b) assuming Eclipse, you change the "Environment" options in your "Run Configuration" to specify "-Dvlcj.log=DEBUG"

But I'm pretty sure upgrading to the latest version will fix your problem.

Re: Accessing a remote DVR by VLCJ

Posted: 05 Dec 2013 21:16
by vhugo006
Thank you so much sherington. It's fine.

probably meet again. Until next.

Hug.