Page 1 of 1
UDP/RTP command line
Posted: 06 Dec 2004 02:16
by fanecco
Hi, how can I open VLC with UDP/RTP (port 2150) stream receiver enabled from command line? I mean, which is the right command line I have to type to automatically do this?
Posted: 06 Dec 2004 09:00
by Sigmund
vlc udp://:2150
or
vlc rtp://:2150
Posted: 06 Dec 2004 15:48
by fanecco
Thanks!
I tried this command line and it works running from a shell (bash) window. Now I need to do the same thing in a C program written by myself. I tried to use this instruction:
execlp("vlc","udp://:2150",--quiet",NULL)
It correctly opens VLC, but doesnt enable udp stream receiving.
How can I modify/change this command to do this?
Thank you for helping me!
Posted: 06 Dec 2004 16:33
by Sigmund
from execlp man-page:
The first argument, by convention, should point to the file name asso-
ciated with the file being executed. The list of arguments must be
terminated by a NULL pointer, and, since these are variadic functions,
this pointer must be cast (char *) NULL.
I guess this should give you a hint.
Posted: 06 Dec 2004 16:38
by fanecco
Nothing changes, sorry
If you know another way (i.e. another system call) to do this, I ll try
Posted: 06 Dec 2004 18:35
by markfm
How about:
execlp("vlc","udp://@:2150", 0)
Not sure about the "quiet", but if you wish to use it, probably need "--quiet", not --quiet"
Posted: 06 Dec 2004 21:27
by Sigmund
if you didn't understand it you need two "vlc" parameters to the call.
Posted: 07 Dec 2004 01:24
by fanecco
yes, I understood it: I also tried:
execlp("vlc","udp://@:2150", 0)
and
execlp("vlc","udp://@:2150", (char *)NULL)
and
execlp("vlc","udp://@:2150","--quiet", 0)
and
execlp("vlc","udp://@:2150", "--quiet",(char *)NULL)
but nothing changed...so how about running a script insted of vlc directly?