Using libVLC to create simple rtp server

This forum is about all development around libVLC.
ogi11
New Cone
New Cone
Posts: 2
Joined: 18 May 2011 17:48

Using libVLC to create simple rtp server

Postby ogi11 » 19 May 2011 14:09

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....

sokrat3s
New Cone
New Cone
Posts: 7
Joined: 12 Apr 2011 16:48

Re: Using libVLC to create simple rtp server

Postby sokrat3s » 19 May 2011 16:28

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Using libVLC to create simple rtp server

Postby Rémi Denis-Courmont » 19 May 2011 17:09

Nobody has yet had time to write a proper API for streaming output. Same goes for the documentation of the (non-existent) API.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

sokrat3s
New Cone
New Cone
Posts: 7
Joined: 12 Apr 2011 16:48

Re: Using libVLC to create simple rtp server

Postby sokrat3s » 19 May 2011 17:50

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Using libVLC to create simple rtp server

Postby Rémi Denis-Courmont » 20 May 2011 09:54

I don't know. VLC only uses live555 on client side.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Re: Using libVLC to create simple rtp server

Postby Moriquendi » 01 Jun 2011 16:04

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests