Example how to use VLM functionality of jvlc

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
GX
New Cone
New Cone
Posts: 2
Joined: 02 Feb 2007 11:29
Location: Netherlands

Example how to use VLM functionality of jvlc

Postby GX » 06 Feb 2007 16:38

Hi,

does anybody have a working example of how to use the streaming server (VLM) functionality. like for example there is the UglyPlayer class to show how a video can be played.


Thanks and Regards,

Maarten.

littlejohn
Blank Cone
Blank Cone
Posts: 73
Joined: 04 May 2006 14:59

Re: Example how to use VLM functionality of jvlc

Postby littlejohn » 16 Mar 2007 16:25

Hi,

does anybody have a working example of how to use the streaming server (VLM) functionality. like for example there is the UglyPlayer class to show how a video can be played.


Thanks and Regards,

Maarten.
At the moment VLM functions are being refactored and cleanedup in VLC, so until then they will not be usable in JVLC either.

Cheers

Gujs
Blank Cone
Blank Cone
Posts: 74
Joined: 22 Oct 2004 19:28

Postby Gujs » 12 Apr 2007 12:44

Hello litlejohn,

do you know if in the latest trunk vlm works in jvlc? I am tryning something and it doesn't seem that it works, but than again I am not an expert in java developing.

I get this error:

Code: Select all

org.videolan.jvlc.VLCException: Media channel1 creation failed at org.videolan.jvlc.VLM._addBroadcast(Native Method) at org.videolan.jvlc.VLM.addBroadcast(VLM.java:39) at test.main(test.java:44)
Thanks

flascala
New Cone
New Cone
Posts: 1
Joined: 22 Apr 2007 10:03

jvlc using vlm doesn't seem to work

Postby flascala » 22 Apr 2007 10:14

I tried using both the addBroadcast and changeMedia methods but it seems that the parameters aren't what they seem, I put a name in the first parameter and it said it couldn't find the name, so I changed the parameter to the file location and even though the file exists, the error message returned says that it does not.

org.videolan.jvlc.VLCException: Media file://C:/eclipse/rebelproject/jvlc/man.mpg does not exist
at org.videolan.jvlc.VLM._changeMedia(Native Method)
at org.videolan.jvlc.VLM.changeMedia(VLM.java:95)
at au.com.fls.VLCExample.main(VLCExample.java:35)

All I wanted to do was transcode a file to be saved into another file. Although the original VLCExample code from the latest truck works, I don't see how this snippet of code

JVLC jvlc = new JVLC(args);
jvlc.vlm.changeMedia(input, input, output, options, enabled, loop);

can result in an error. This there another way of transcoding without trying to use the vlm?

I have the VLC version 0.8.6b installed and the latest jvlc binary from the trunk.

signed "Franco La Scala".

Gujs
Blank Cone
Blank Cone
Posts: 74
Joined: 22 Oct 2004 19:28

Postby Gujs » 24 Apr 2007 10:15

I am using latest vlc-trunk. My code for adding VLM looks like this

Code: Select all

name = "channel1"; input = "dvb://"; output = "#duplicate{dst=std{dst=227.111.1.1:12345}}"; ch1options = new String[8]; ch1options[0] = "programs=3201"; ch1options[1] = "dvb-adapter=0"; ch1options[2] = "dvb-frequency=12303000"; ch1options[3] = "dvb-srate=27500000"; ch1options[4] = "dvb-voltage=13"; ch1options[5] = "dvb-satno=1"; ch1options[6] = "dvb-caching=500"; ch1options[7] = "sout-udp-caching=500"; try { dvbCard1.vlm.addBroadcast( name, input, output, ch1options, true, false ); } catch (VLCException e) { // TODO Auto-generated catch block e.printStackTrace(); }
And error I get is:

Code: Select all

Starting test of jVLC! [00000292] main playlist error: Reloading playlist not implemented. [00000295] telnet interface: using the VLM interface plugin... [00000295] main interface: International Domain Names not supported [00000295] main interface error: socket bind error (Address already in use) [00000295] main interface error: socket bind error (Address already in use) [00000295] telnet interface error: cannot listen for telnet [00000295] main interface error: no suitable interface module [00000001] main libvlc error: interface "telnet,none" initialization failed [00000299] logger interface: using logger... org.videolan.jvlc.VLCException: Media channel1 creation failed at org.videolan.jvlc.VLM._addBroadcast(Native Method) at org.videolan.jvlc.VLM.addBroadcast(VLM.java:39) at test.init(test.java:144) at test.<init>(test.java:19) at test.main(test.java:26)
Does somebody knows what am I doing wrong. Is it possible that in trunk vlm functionality for jvlc doesn't work!

shereen ahmed
New Cone
New Cone
Posts: 7
Joined: 27 Aug 2007 10:20

Re: Example how to use VLM functionality of jvlc

Postby shereen ahmed » 27 Aug 2007 10:43

Dear all

i used Vlm of jvlc but not work with me
can anyone help me ?

I found on net the documentation of Nested Class called JVLC.StreamGobbler , any one know from where can io download ??????


thanks
shereen

dsgallo
New Cone
New Cone
Posts: 5
Joined: 09 Oct 2007 20:31

Re: Example how to use VLM functionality of jvlc

Postby dsgallo » 28 Feb 2008 22:57

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

kobe08
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Nov 2007 03:06

Re: Example how to use VLM functionality of jvlc

Postby kobe08 » 08 Apr 2008 18:47

"--security-policy=1" argument not working here.

Code: Select all

[00000001] main libvlc debug: VLC media player - version 0.9.0-git Grishenko - (c) 1996-2008 the VideoLAN team [00000001] main libvlc debug: libvlc was configured with ./configure '--enable-ffmpeg' '--with-ffmpeg-libpostproc' '--with-ffmpeg-mp3lame' '--with-ffmpeg-zlib' '--with-ffmpeg-faac' '--enable-mostly-builtin' '--enable-dvb' '--disable-wxwidgets' '--disable-skins2' '--enable-debug' '--enable-vlm' '--enable-sout' '--enable-live555' '--enable-dvbpsi' '--enable-v4l' '--enable-v4l2' '--enable-screen' '--enable-realrtsp' '--enable-snapshot' [00000001] main libvlc debug: translation test: code is "C" [00000001] main libvlc: Found old config file at /home/jhenriques/.vlc/vlcrc. VLC will now use /home/jhenriques/.config/vlc/vlcrc. libvlc: unknown option or missing mandatory argument `--security-policy=1' Try `libvlc --help' for more information. # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0xad3876e3, pid=25720, tid=2906712976 # # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode) # Problematic frame: # C [libvlc-control.so+0x76e3] # # An error report file with more information is saved as hs_err_pid25720.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #

sibayu
New Cone
New Cone
Posts: 1
Joined: 22 Apr 2008 14:57

Re: Example how to use VLM functionality of jvlc

Postby sibayu » 22 Apr 2008 15:04

Hi all,

I followed the guide by dsgallo. However, I also got the same problem like kobe08. Did anybody manage or know how to solve this problem?
Thank you in advance.

Bayu


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 6 guests