Page 1 of 1

streaming by command line parameters

Posted: 13 Jul 2009 21:02
by or_b_s
Hello everyone,

I'm able to use the UI to stream media (both screen:// and DirectShow of a web-cam) from one PC to another via LAN (both Windows XP, VLC version 0.8.6i).

On the server side, by the UI, I use the wizard to stream screen:// to network, via http, in asf format, with ttl=1. I assume if i could stream screen:// then streaming the web-cam would be simple.
the client is using the following command line parameters:
http://<server ip address>:8080
and it works fine. so i know there's no firewall issue or something like that.

Now i want to start the server automatically, i.e. by command line parameters. tried pretty much every option I could find with --sout, read the wiki and the forum, tried and tried different parameters, all should be working... to no avail.

if anyone has done that before, please specify the parameters you used.

Thanks,
Or

Re: streaming by command line parameters

Posted: 14 Jul 2009 11:52
by thannoy
So you should already have crossed the Documentation:Streaming_HowTo wiki page.

Streaming in command line can be as simple as this:

Code: Select all

vlc input.file --sout=udp://ip:port
or

Code: Select all

vlc.exe input2.file --sout=udp/ts://ip:port
If you do not use shortcut syntax, here is an example:

Code: Select all

vlc input.file --sout='#standard{mux=ts,access=udp,dst=ip:port}'
or

Code: Select all

vlc.exe input.file --sout=#standard{mux=ts,access=udp,dst=ip:port}

Re: streaming by command line parameters

Posted: 15 Jul 2009 10:39
by or_b_s
Thanks, but I already tried that. Either i'm wrong with the client's command line parameters or UI settings, or there's something i'm missing here.

How exactly should the client parameters be ?

PS when i'm starting to stream by http, the counter in the lower-left corner of the VLC windows is running, even when the client is not connected yet. Is that the case for udp streaming also? because my server (when using udp as in your examples) does not start the counter when the client is not connected.

BTW it would be nice if the guys who write the wiki about this topic would mention if a specific parameter is optional or mandatory, e.g. the dst=ip:port.

Re: streaming by command line parameters

Posted: 15 Jul 2009 11:59
by thannoy
How exactly should the client parameters be ?
If the stream is udp, dest is the receiver on a given port. The receiver just listen this port.
Command line: vlc udp://@:port or vlc://@LocalIpAddress:port if you have several network cards.
Graphicaly, open a network stream, udp and just fill the port.

If the stream is http (I do not use it), the receiver have to connect to the server on the given port. You can check firewalls on the server side. If you are using the http interface too, it is locked to 127.0.0.1 as default so you will have to moduty VLC httpd .host file.
command line (I guess): vlc http://server:port
PS when i'm starting to stream by http, the counter in the lower-left corner of the VLC windows is running, even when the client is not connected yet. Is that the case for udp streaming also? because my server (when using udp as in your examples) does not start the counter when the client is not connected.
It is the case of UDP streaming since the stream is sent on the network and it is impossible to detect if someone is receiving it I think. I don't know how your server can detect if someone is listening its udp stream, so maybe I am wrong somewhere.
BTW it would be nice if the guys who write the wiki about this topic would mention if a specific parameter is optional or mandatory, e.g. the dst=ip:port.
Documentation:Streaming_HowTo/Advanced_Streaming_Using_the_Command_Line wiki page seems to be clear to me.
When access is http, "dst is the address, port and path of the local network interface on which the server should listen for requests. If no address is given, VLC will listen on all the network interfaces". Well, the port is not given. I guess it is 8080 :) (the logs will give it)

Re: streaming by command line parameters

Posted: 21 Jul 2009 12:00
by or_b_s
Sorry for the long delay. But i still can't get the streaming to work.

I tried udp with the following parameters
server side: vlc.exe d:\bla.wma --sout=udp://192.168.7.177:1234
where d:\bla.wma is a simple media file, just for testing ( eventually it will be replaced with dshow:// ).
192.168.7.177 is the client ip address, 1234 is the port for udp.
client side: vlc.exe udp://@:1234

there is no connection problem between the machines, no firewall, no ports blocking.
the server starts streaming (time counter moves), but the client doesn't show anything.
i tried many syntax formats for the parameters, to no avail.

what am i doing wrong ?

thanks,
Or

Re: streaming by command line parameters

Posted: 21 Jul 2009 12:13
by thannoy
your syntax seems ok.

Have you tried with a mpeg-ts file for example? Or using "udp/wma://blabla" on the server side (absolutely untested).

Re: streaming by command line parameters

Posted: 12 Aug 2019 07:58
by bhaveshk
hey thanks man it worked for me. Try using a mp4 file and it is working absolutely fine. Is there any way to keep the file in loop so that it keep on streaming?
thanks