Hi all!
Finally I could make the VLM work... after trying a lot to find some example on the internet without success.
Basically there are several relevant points to note:
1st) you have to get the latest version/code of jvlc for linux (0.9.0... but the code itself, not the release... i think the vlm option is not enabled in the binary version)
2nd) compiling jvlc with the --enable-vlm option (besides all other hundreds of options that you should enable)
3rd) The option --security-policy=1 is required
after that, you should be able to run something like this:
Code: Select all
JVLC jvlc = new JVLC(new String[]{"--security-policy=1"});
try {
jvlc.vlm.addBroadcast("Test", "/media/a.avi", "#rtp{mux=ts,dst=224.123.111.101,port=1234,ttl=1}", null, true, false);
jvlc.vlm.playMedia("Test");
Thread.sleep(5000);
jvlc.vlm.stopMedia("Test");
jvlc.vlm.deleteMedia("Test");
} catch (Exception e) {
e.printStackTrace();
}
Hope this helps! It worked for me... after waaaaaaaaayyyy tooo much time trying to do this...
Diego
ps. Here is a "guide" that I have done about how to compile/install jvlc 0.9.0 on Ubuntu 7.10 (64bits) if you have trouble with this too...
#### Installing in a fresh Ubuntu 7.10 (64bits) machine ####
sudo apt-get install sun-java6-jdk
sudo apt-get install subversion automake g++ libtool libgcrypt-dev liba52-dev libfaac-dev liblame-dev libtheora-dev \
libvorbis-dev libx264-dev libxvidcore-dev libavcodec-dev gettext libxext-dev cvs libmad0-dev libmpeg2-4-dev \
libfribidi-dev libdvbpsi4-dev nvidia-glx-dev X11proto-*
# compile/install ffmpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-shared \
--enable-libmp3lame \
--enable-libvorbis \
--enable-libtheora \
--enable-libfaac \
--enable-libxvid \
--enable-liba52 \
--enable-pp \
--enable-gpl \
--enable-libx264
make
sudo make install
cd ..
#rm -rf ffmpeg
# export JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/java-6-sun
### compile/install jvlc
svn co svn://svn.videolan.org/vlc/trunk vlc-trunk
cd vlc-trunk
./bootstrap
./configure --enable-libdvbpsi \
--enable-vlm \
--enable-sout \
--enable-a52 \
--enable-vorbis \
--enable-x264 \
--enable-ffmpeg \
--with-ffmpeg-a52 \
--with-ffmpeg-mp3lame \
--with-ffmpeg-zlib \
--with-ffmpeg-faac \
--with-ffmpeg-theora \
--with-ffmpeg-vorbis \
--enable-libmpeg2 \
--enable-mad \
--enable-java-bindings \
--enable-shared-libvlc
make
sudo make install
### Generating jar file with jVLC classes
#cd bindings/java
#jar cvf jvlc_0.9.0.jar org
#mv jvlc_0.9.0.jar ~/workspace/iptvwp3/lib
cd ..
#rm -rf vlc-trunk
###Sometimes if you don't run ldconfig some libraries cannot be found...
#sudo ldconfig