Page 1 of 1

VLC Java Development

Posted: 07 Jun 2010 15:28
by mtear
Hey,

I just wanted to make a really simple AVI player in Java using JVLC or VLCJ.
I don't want the full functionality of VLC with streams and DVDs and etc. Just an avi player.
I'm really hoping it would be independent of the OS it's running on but it seems like the source code really depends on that when it shouldn't.
Is there any way around this? Can anyone give me an example of just a simple Canvas that runs a video file? I can't even get the VLCJ samples to compile. It uses things from Apache and etc that even though I went searching for it's still having runtime errors.
Thanks.

Re: VLC Java Development

Posted: 07 Jun 2010 17:09
by sherington
I'm really hoping it would be independent of the OS it's running on but it seems like the source code really depends on that when it shouldn't.
libvlc works slightly differently or has different initialisation/setup issues and different limitations on each different OS. How do you propose those problems are solved in Java without the OS-specific workarounds?
I can't even get the VLCJ samples to compile. It uses things from Apache and etc that even though I went searching for it's still having runtime errors.
You need log4j, that's all. Add the log4j jar to your project classpath.

If you check out the project from subversion, you will have everything you need.

Re: VLC Java Development

Posted: 08 Jun 2010 05:43
by gnosygnu
Just to chime in with sherington. I also use vlcj. I think it's fairly light, and the extra functionality (DVD/streams) should not interfere with AVI playback.

Also, I remember I had similar compile issues on an early version. I commented out the log4j references as well as some button images, and I was set to go. All told, I think I commented out 20 lines or so.

Hope this helps.

Re: VLC Java Development

Posted: 08 Jun 2010 17:01
by sherington
I don't want the full functionality of VLC with streams and DVDs and etc. Just an avi player.
Here is the result of five minutes of effort to produce a junk absolute minimum video player, maybe it will give you some ideas to get you started.

http://code.google.com/p/vlcj/source/br ... layer.java

To compile/run you will need:
- vlcj
- log4j
- JNA (jna.jar and platform.jar)

You should know how to configure your own classpath if you're a Java developer.