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