VLC streaming on different ports simultaneously

About encoding, codec settings, muxers and filter usage
ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

VLC streaming on different ports simultaneously

Postby ziggyspaceman » 02 Sep 2010 17:17

Hi

Please forgive me if this question as been ask a million times, but I am unable to find any ref to such a matter, I have only started looking into VLC last couple of days & trying to find my feet.

My question/s are about VLC capability to act as a server to stream multiple audio/video/interface devices simultaneously on different ports on a localhost i.e live feeds.

Can this be done with VLC acting as a server? If so can any one point me in the right direction to a good tutorial on how to do this or any working examples or any information which will help, installed software version 1.1.4 on windows machine.

I have managed to run VLC as a server on one machine with a single video output stream & connect to it with VLC acting as a client from another machine but just on a single port ie {192.168.0.3:1234}

What I'm trying to do is have VLC act as a server doing for example:

stream on {192.168.0.3:1234}
stream on {192.168.0.3:1235}
stream on {192.168.0.3:1236}
etc...

Or is it a simple a matter of multiple instances of VLC streaming on different ports...

Best Regards
Steve

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: VLC streaming on different ports simultaneously

Postby Sébastien Escudier » 02 Sep 2010 19:28

Yes you can use VLM to stream multiple inputs.
And if you use rtp with sdp output, multiple clients can connect to these streams.

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 02 Sep 2010 20:12

Thanks for the reply

Are we talking load config file example:

new channel1 broadcast enabled
setup channel1 input http://host.mydomain/movie.mpeg
setup channel1 output #rtp{mux=ts,dst=192.168.0.3,port=1234,sdp=sap://,name="Channel 1"}

new channel2 broadcast enabled
setup channel2 input http://host.mydomain/movie.mpeg
setup channel2 output #rtp{mux=ts,dst=192.168.0.3,port=1235,sdp=sap://,name="Channel 2"}

control channel1 play
control channel2 play

then from command line enter
c:\vlc --vlm-conf vlm.conf

If not! any chance of an example
Many Thanks
Steve

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: VLC streaming on different ports simultaneously

Postby Sébastien Escudier » 03 Sep 2010 08:56

Yes that's what I was talking about.
But I thought you wanted differents input.
If you have one input and want to stream it multiple times, you can use #duplicate
You will use less CPU

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 03 Sep 2010 09:32

Sorry yes I did want different inputs, I just copied the above example and & only changed output part to suit.

Anyhow, I have now had a chance to test the method above & sure it works for different inputs & outputs on a specific port as required. So I suppose job done & many thanks Sébastien for the advice on this matter.

My next question is, is this method restricted only to rtp output or is there a way to output via http too?

Regards
Steve

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: VLC streaming on different ports simultaneously

Postby Sébastien Escudier » 03 Sep 2010 10:23

This method works for all input and stream output.

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 03 Sep 2010 10:40

Right

What would be the correct syntax for http output?

Example:
setup channel1 output #rtp{mux=ts,dst=192.168.0.3,port=1234,sdp=sap://,name="Channel 1"}

Would we just change the #rtp to #http value.

Regards
Steve

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: VLC streaming on different ports simultaneously

Postby Sébastien Escudier » 03 Sep 2010 10:47

please have a look to the documentation.
http://www.videolan.org/doc/videolan-howto/en/ch09.html

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 03 Sep 2010 13:48

Thanks for the link, had good look at the documentation but I'm still none the wiser on how to output http.

The syntax shown just makes ref to command line & there is no example shown of doing this in a config file like the method above.

Would it be at all possible for you to post an example on how to do this please, using the above method.

Best Regards
Steve

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 03 Sep 2010 14:48

“Solution to this problem http output”
found this viewtopic.php?t=54960

Create config file using notepad save as “vlm.conf” in VLC root dir.
Then add this to vlm.conf & save [change to suit].


new channel1 broadcast enabled
setup channel1 input c:\tmp\demo1.mp4
setup channel1 output #rtp
{mux=ts,dst=192.168.0.3,port=1234,sdp=sap://,name="Channel 1"}

new channel2 broadcast enabled
setup channel2 option sout-keep input c:\tmp\demo2.mp4
setup channel2 output #duplicate{dst=std{access=http,mux=ts,dst=192.168.0.3:1235}}-
-sout-keep**

control channel1 play
control channel2 play

Open console window navigate to VLC root
at command line enter> vlc --vlm-conf vlm.conf
This starts a single instance of VLC running as server

Open a second VLC client then Media>Open Network Stream
enter url 192.168.0.3:1234 or 192.168.0.3:1235 & then Play

[Done] multiple streams on different ports running simultaneously on a single VLC instance.

Hope this helps

Best Regards
Steve

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: VLC streaming on different ports simultaneously

Postby Sébastien Escudier » 03 Sep 2010 15:07

The syntax shown just makes ref to command line & there is no example shown of doing this in a config file like the method above.
The syntax is the same.
For example with http streaming, the doc says :
% vlc -vvv input_stream --sout '#standard{access=http,mux=ogg,url=server.example.org:8080}'
it becomes
setup my_srteam output #standard{access=http,mux=ogg,url=server.example.org:8080}

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 03 Sep 2010 15:45

Just amended config file & replaced line

**setup channel2 output #duplicate{dst=std{access=http,mux=ts,dst=192.168.0.3:1235}}-
-sout-keep**

with your suggestion of

setup channel2 output #standard{access=http,mux=ogg,url=192.168.0.3:1235}

But could not get it working unlike the line ** which worked fine, are both these lines suppose to achieve the same thing. Any reason why your suggestion didn't work?

Best Regards
Steve

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: VLC streaming on different ports simultaneously

Postby Sébastien Escudier » 03 Sep 2010 16:05

--sout-keep is invalid in your cammand, I think it is ignored so you can remove it.
the duplicate is useless because you have only one output

So it becomes #std{access=http,mux=ts,dst=192.168.0.3:1235}
Which is the same think than my suggestion except for mux=ts instead of mux=ogg.
And you're right mux=ogg is wrong here, it should be ts. It was just a copy/paste from the doc.

ziggyspaceman
Blank Cone
Blank Cone
Posts: 10
Joined: 02 Sep 2010 16:35

Re: VLC streaming on different ports simultaneously

Postby ziggyspaceman » 03 Sep 2010 18:23

Yes your last comment worked. Many thanks for the advice & code example.

Best Regards
Steve


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests