Java and VLC - JVLC

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
spirit110

Java and VLC - JVLC

Postby spirit110 » 27 Oct 2005 12:01

I'm trying to use the JVLC on Windows, but nothing seems to work. I'm pretty much a newbie when it comes to stuff like this and any help or hints would be most appreciated. I've been using JMF (Java Media Framwork) but it's too slow and on Linux platforms (with slow GPUs) the playback performance is too bad.

enlopez

JVLC sample

Postby enlopez » 18 Nov 2005 09:24

I succeeded in having a running program that uses the java-gcj bindings in vlc 0.8.4 to stream and display a video on the screen. I just added some code to the VlcClient.java program to do my tests. Here is the code:

public class VlcClient {

public static void main(String[] args) {

JVLC vlc = new JVLC(args);
System.out.println(vlc.getVersion());

// Specify streaming options:
// - Use mp4v for video, mp3 for audio, etc.
// - Send the stream via RTP to X.X.X.X:1234
// - Display the stream on the screen also
String[] options = new String[1];
options[0] = ":sout=#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=rtp,mux=ts,url=127.0.0.1:1234},dst=display}";

// Specify the file to stream
String input = "./vts_16_1.vob";

// Add the file to the playlist. See documentation for the
// VLC_AddTarget function in the library libvlc.
vlc.addTarget(input, options, 1, -666);

// Display the inteface and start playing the video
vlc.addInterface(true, true);
vlc.die();
vlc.cleanUp();
}

}


Note that I had to change one line in the JVLC::addTarget function in vlc-glue.cc because I was getting a null pointer exception when calling addTarget:

//char** ppsz_options = NULL;

int options_number = 0;
char* ppsz_options[options_number];



Enrique

Waruwaru
New Cone
New Cone
Posts: 5
Joined: 06 Nov 2005 03:13

Postby Waruwaru » 18 Nov 2005 21:08

Hello Enrique,

Good to hear you got the binding to work. What system do you have? I didn't have much luck compiling the binding on Cygwin. Maybe I don't have the proper version of the GCJ/GCC installed or something.

Thanks,
Waruwaru

spiridonas
Blank Cone
Blank Cone
Posts: 22
Joined: 05 May 2006 12:32

Postby spiridonas » 07 Sep 2006 10:19

hello enlopez

I have a few questions:

1) what OS you are using?, is it possible to do this on windows Platform...I know that for Linux is possible!

2) Can you post the whole project source code or upload it somewhere?

Best Regards

Spirus

phmorin
New Cone
New Cone
Posts: 2
Joined: 12 Jul 2006 23:41

Postby phmorin » 13 Sep 2006 16:27

Hello,

JVLC is working on both win32 and Linux.

You can get a working copy at the main page of the project.

Check http://trac.videolan.org/jvlc


This is still a developer release. You must be familiar with Java ( compiling and executing
a program with an installed JDK or JRE) and follow the README instructions for settings
the execution environment.

If you can compile VLC on Cygwin, you can compile JVLC.
You must take care of setting a JAVA_HOME variable before compiling the bindings
and some other little things.

The next version will hopefully be more end-user friendly.

Philippe,

spiridonas
Blank Cone
Blank Cone
Posts: 22
Joined: 05 May 2006 12:32

Postby spiridonas » 14 Sep 2006 09:39

Hi

I think ypou miss understood....maybe I wasnt clear....my problem comes with the :sout...etc command where I want to stream a file...But as i can understand I smust alter the vlc-glue.cc file as mentioned above....

Thank you for your reply
Best Regards
Spiros


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 60 guests