Page 1 of 1
Streaming Multiple Files Over RTSP Using Multiple Instances
Posted: 06 Feb 2013 12:29
by hi_ajit
I am just getting started with VLC and am a complete newbie.
So there are many fundamentals that I am unaware of, please excuse that.
What am I using?
I am using VLC media player 2.0.5 Twoflower
In that, I am using the GUI for streaming files because I simply have zero knowledge of programming.
What have I achieved till now?
I have been successful in streaming a single file over RTSP by using the GUI of VLC.
I can connect to this rtsp live stream from multiple devices simultaneously without any problem whatsoever -- mobile phones, desktops, laptops
Now here's the situation:
I have about 8-10 files that are streaming simultaneously on my machine.
They are available on:
rtsp://myIP:8554/1.sdp, rtsp://myIP:8554/2.sdp, rtsp://myIP:8554/3.sdp... rtsp://myIP:8554/10.sdp
However, of all these streams, I am able to connect to just one of them. Am I missing something in the settings? It looks like a very basic step I am missing somewhere.
I do notice that the port 8554 is constant. When the ports are variable like 8554, 554, etc, I am able to connect to them simultaneously.
Is this something about unicast/multicast/broadcast? As I said above, I am unaware of a lot of fundamentals... Will appreciate if someone can take me through this...
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 06 Feb 2013 13:05
by mundu
You will need to use VLM to stream several files in one VLC instance.
If you start several VLC instances you will bind only one process to 8554.
Use telnet server to connect and to load several movies if you want. Or use VLM conf.
Code: Select all
--daemon --ttl 12 -I telnet --miface ${BINDINT} --rtsp-host ${ETH1}:${STREAM_PORT_VLC} --rtsp-session-timeout 60 -v --syslog --file-logging --syslog-facility local0 --sout-all --demux ffmpeg --vlm-conf ${VLMCONF}
I then use scripting to load all movies into vlm-conf
Code: Select all
find ${MOVIES_PATH} -type f | sed -e "s_${MOVIES_PATH}/\(.*\)_\1_" | xargs -I% echo -e "new ${URL}/% vod \nsetup ${URL}/% input file://${MOVIES_PATH}/%\nsetup ${URL}/% mux mp2t\nsetup ${URL}/% enabled" > ${VLMCONF}
But in plain words this is what you need to put in the telnet server/VLM conf:
new file.ts vod
setup file.ts input file ://...
setup file.ts mux mp2t
setup file.ts enabled
for each TS file you get the url rtsp://server:port/file.ts...
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 06 Feb 2013 18:02
by hi_ajit
Thanks for your reply...
So in summary, opening several instances of VLC is just not an option.
The 2 possible options are:
1. Using the Telnet Server
OR
2. Using VLM Conf
Both these are quite new to me anyway. Could you point to any resources where I can read up on this?
Thanks in advance!
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 06 Feb 2013 20:46
by mundu
If you're using windows I can't help you much. Try checking VLM Configuration (Ctrl+W) in All at Settings, there you have VOD option with import/export option. You can try and enable telnet also.
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 07 Feb 2013 09:12
by hi_ajit
All right. I'll give these a shot.
Coming to VLM, it is basically VideoLan Manager and I can control multiple streams with only one instance of VLC.
So while searching google trying to get a sense of it, some ad about Wowza Media Server popped up and also a lot of blog posts seem to be mentioning it. Is VLM the same as Wowza, just that VLM is free.
Because I believe using VLM I will be able to control multiple streams, transcode them and stuff like that... Is there something that I am limited from doing if I use VLM?
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 07 Feb 2013 12:27
by hi_ajit
Well I tried launching the VLM using Ctrl+W.
Was able to accomplish what I wanted to - multiple files being streamed on my PC could be accessed from other devices at the same time over the port 8554.
A big thanks to you for that Mr. Mundu!
Appreciate your responses to my amateurish queries and doubts...
2 more follow up questions...
1. As mentioned in my post above,
Is there something that I am limited from doing if I use VLM as compared to using some paid Media Streaming Server (eg: Wowza)
2. Port 8554 is an alternate port to Port 554 for RTSP. Is this correct? Are there any implications of using 8554 over 554 or the other way round?
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 07 Feb 2013 23:43
by mundu
About the limits:
Well it depends on what you want to do. For personnal use I think you are clear to use VLM however you like, at your own risk obviously. For commercial use there are a lot of implications, specially the MPEG Systems (Transport stream) and MPEG-1/2 or whatever video codec you might be using that may be proprietary. Unfortunately VLC creates its own TS containers with the mux option. So there's at least one royalty there.
I can't really talk about Wowza. Wowza has a paid license but it has also a wider support I guess. Wether you're looking for troubleshooting or if you're looking for other kind of platform media support. Like HLS for HLS enabled devices (e.g. iOS). Which I do not know the VLC support status right now.
Port limit:
The port will simply depend on what you really want. 554 is the standard port, meaning that all the clients will know that the rtsp:// url means 554 port. But some server systems might block the 554 port due to port restrictions for non root users.
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 08 Feb 2013 06:52
by hi_ajit
So the gist is you cant use VLM for commercial use? Really?
Thanks for explaining about the port query.
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 08 Feb 2013 13:19
by mundu
You misunderstood my answer. In commercial use you would need to pay royalties I think. But I'm not 100% sure about this. Perhaps someone else can help you better on this matter.
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 08 Feb 2013 18:07
by hi_ajit
Yeah... I actually meant that cant one use VLM for commercial purposes unless one pays royalties for the codecs used...
More information about this can be found on http://www.mpegla.com/
I will try reading up on this and post the relevant information here.
In the meanwhile, can someone can clarify whether one needs to pay royalties, obtain licenses or pay any other fees if audio-visual content is being streamed to the end-user over the internet for free and the monetization comes from advertising on the pages?
Re: Streaming Multiple Files Over RTSP Using Multiple Instan
Posted: 08 Feb 2013 23:04
by RĂ©mi Denis-Courmont
It depends whom you ask and the geography involved. If unsure, check with a lawyer.