Accessing a remote DVR by VLCJ

This forum is about all development around libVLC.
vhugo006
New Cone
New Cone
Posts: 6
Joined: 05 Dec 2013 19:56

Accessing a remote DVR by VLCJ

Postby vhugo006 » 05 Dec 2013 20:08

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); } }

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: Accessing a remote DVR by VLCJ

Postby sherington » 05 Dec 2013 20:19

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.

vhugo006
New Cone
New Cone
Posts: 6
Joined: 05 Dec 2013 19:56

Re: Accessing a remote DVR by VLCJ

Postby vhugo006 » 05 Dec 2013 20:33

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?

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: Accessing a remote DVR by VLCJ

Postby sherington » 05 Dec 2013 20:54

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.
Last edited by sherington on 05 Dec 2013 22:07, edited 1 time in total.

vhugo006
New Cone
New Cone
Posts: 6
Joined: 05 Dec 2013 19:56

Re: Accessing a remote DVR by VLCJ

Postby vhugo006 » 05 Dec 2013 21:16

Thank you so much sherington. It's fine.

probably meet again. Until next.

Hug.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests