Page 1 of 1

Using libVLC to create simple rtp server

Posted: 19 May 2011 14:09
by ogi11
Hi, i am new to VLC and i would like to do the following for start:

-write doen simple code to stream out media file via rtp protocol to specific location (like from command line)

Comand line for doing this is: vlc -v --loop file:///home/student/vlc-1.1.9/VlcIgranje/mission_impossible.ts :sout=#transcode\{vcodec=h264,vb=0,width=100,acodec=mp4a,ab=128,channels=2,samplerate=44100\}:rtp\{dst=192.168.3.63,port=6969,mux=ts\} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep

Please, write down some suggestions or post some useful links....

Re: Using libVLC to create simple rtp server

Posted: 19 May 2011 16:28
by sokrat3s
Hello,
I am interested in exactly the same thing. (I want to stream h264 encoded data from my c application, and not a file) Is there any documentation about the rtp module of lib vlc or something similar ?

I have seen the vlc/modules/rtp.c code, it is useful in a way, however, if there is some example or API that describes the basic components/calls needed would be really great.
Thank you very much.

Re: Using libVLC to create simple rtp server

Posted: 19 May 2011 17:09
by Rémi Denis-Courmont
Nobody has yet had time to write a proper API for streaming output. Same goes for the documentation of the (non-existent) API.

Re: Using libVLC to create simple rtp server

Posted: 19 May 2011 17:50
by sokrat3s
Thank you very much Rémi Denis-Courmont for your fast answer.
In anyway, is rtp.c and rtcp.c the proper place to look at, and try to implement in my code the streaming of raw 264 data? Or will I need something more?
And one other thing please, you use live 555 library just for the client side right? I mean vlc's implementation of server is different from live555's?

Thank you once more for your time.

Re: Using libVLC to create simple rtp server

Posted: 20 May 2011 09:54
by Rémi Denis-Courmont
I don't know. VLC only uses live555 on client side.

Re: Using libVLC to create simple rtp server

Posted: 01 Jun 2011 16:04
by Moriquendi
Hey sokrat3s, let me know if this code helps to you:

Code: Select all

char *vlcOptions[] = {""}; vlcInstance = libvlc_new(1, vlcOptions); libvlc_vlm_add_broadcast(vlcInstance, "test", "file:///home/student/vlc-1.1.9/VlcIgranje/mission_impossible.ts", "#transcode{vcodec=h264,vb=0,width=100,acodec=mp4a,ab=128,channels=2,samplerate=44100\}:rtp\{dst=192.168.3.63,port=6969,mux=ts},dst=display}", 0, NULL, TRUE, 0); libvlc_vlm_play_media(vlcInstance, "test");
Make sure to NOT put ":no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep" part.