Page 1 of 1
UDP TS MUX ?
Posted: 23 May 2008 10:09
by Skinnersplace
Dear All,
I am new to VLC and as such am over my head, I have tried searching the forum but am not sure I am searching for the right topics.
What I want to do is multiplex several "live" TS into a single multichannel TS.
I have successfully set up several installations of VLC to created individual TS's from capture cards and broadcast them over UDP.
Is there a way to then simultaneously load all the 4 streams and mux them into a single multichannel TS to be broadcast ?
Any asisstance would begratly appreatiated.
Re: UDP TS MUX ?
Posted: 23 May 2008 16:11
by Rémi Denis-Courmont
In principle, that would be do-able with slave inputs, but I don't really see the point - you might as well send multiple UDP streams.
Re: UDP TS MUX ?
Posted: 24 May 2008 11:24
by Skinnersplace
Hi Remi,
Thanks for the swift reply,
The reason I want to mux the streams is to create a DVB compatible TS, which I can transmit to a set top box.
I use multiple instances of VLC broadcasting of UDP to make those TS available in one place.
I have tried searching for -- input slave, but am not having much luck tracking down the correct syntax.
Sorry I am new to all this ! - is there somewhere I can get a working example ?
Regards
Skinner
Re: UDP TS MUX ?
Posted: 24 May 2008 13:00
by ph0t0n
'vlc --advanced --longhelp' gives this info:
--input-slave <string> Input slave (experimental)
This allows you to play from several inputs
at the same time. This feature is
experimental, not all formats are supported.
Use a '#' separated list of inputs.
I tried it on two source files awhile back, specifying it like so:
vlc -vvvv file1.mp4 --input-slave file2.mp4
It worked, however, I did not try the #-separated input list method described above.
Re: UDP TS MUX ?
Posted: 25 May 2008 09:50
by Skinnersplace
Thanks for the help Photon,
I tried the code you sugested with TS files but had no luck.
I am now working on another route of using VLM form the comand line,
That does not seam to be working yet either, but should be able to do what I need in principle.
I have posted the following in the VLM area, but so foar have had no responce :
I have a batch file wich loads C:\Program Files\VideoLAN\VLC" VLC -I telnet --vlm -conf Broadcast.cfg
As a test I created a CFG file to output on seperate ports :
new channel1 broadcast enabled
setup channel1 input BARS.TS
setup channel1 output #transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8080,chsdp=sap,name="Channel 1"}
new channel2 broadcast enabled
setup channel2 input BARS2.TS
setup channel2 output #transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8081,chsdp=sap,name="Channel 2"}
control channel1 play
control channel1 play
I run the batch file, and get an instance of VLC visable in my task manager but am unable to view either of the two ports in a second instance of VLC ?
my ultimate goal is to combine the two TS into a single multi program stream (so I will have to add PID's etc) and output that single streem on a single port.
Can someone plase help me to work out what is wrong with my test config above ?
Re: UDP TS MUX ?
Posted: 19 Jun 2008 21:19
by Spice_Boy
Hi Skinnersplace (and others)
Did you end up having any luck with this? I'm trying to do something very similar (I think).
I have 2 dvb-t cards and want to stream a bunch of channels from one frequency on one card, and some more channels on a different frequency on the other card.
I can do this with a couple of very long VLC commands, but every channel has to have it's own ip address.
Using dvbstream I can stream the whole transport stream over udp, but only one card can use one ip address.
The goal is to get all channels (from both dvb-t cards) onto one stream on one udp ipaddress/port, so that the client can select them under the 'navigation' menu and have them instantly available. Is that similar to what you're trying to do?
Re: UDP TS MUX ?
Posted: 24 Jun 2008 20:25
by hihi
works only with the linux version ...
Re: UDP TS MUX ?
Posted: 03 Jul 2008 14:38
by Skinnersplace2
Hi Spice boy,
Yes that is exactly what I am trying to do ! - still have had no luck though
Have been trying to do it with VLM but not having much sucess.
Re: UDP TS MUX ?
Posted: 03 Jul 2008 14:40
by Skinnersplace2
Hello hihi
what only works with the linux version ?
I am sure i have used vlm to send single streems in on windows, so is it only that it can not mux them ?
Do you know any way that i could mux multiple inputs to a single ts streem using vlc ?
Re: UDP TS MUX ?
Posted: 03 Jul 2008 16:00
by hihi
Hi Skinnersplace2,
the option
sout-ts-muxpmt
does not work in windows, someone told me that it only works in Linux
following ex. mux 2 files and 2 single program transport streams into one multiple program transport stream
Code: Select all
# reset VLM configuration
del all
# Input options
# Input 1: File
new Channel1 broadcast enabled loop
setup Channel1 input "E:\file1.ts"
setup Channel1 output #duplicate{dst=bridge-out{id=110},select=video,dst=bridge-out{id=120},select=audio}
control Channel1 play
# Input 2: File
new Channel2 broadcast enabled loop
setup Channel2 input "E:\file2.ts"
setup Channel2 output #duplicate{dst=bridge-out{id=210},select=video,dst=bridge-out{id=220},select=audio}
control Channel2 play
# Input 3: UDP
new Channel3 broadcast enabled
setup Channel3 input "udp://@224.1.105.201:2000"
setup Channel3 option program=501
setup Channel3 output #duplicate{dst=bridge-out{id=310},select=video,dst=bridge-out{id=320},select=audio}
control Channel3 play
# Input 4: UDP Output: UDP
new Channel4 broadcast enabled
setup Channel4 input "udp://@224.1.101.202:2000"
setup Channel4 output #bridge-in:duplicate{dst=display,dst=std{access=udp{ttl=5},mux=ts,dst=225.1.1.95:2000}
control Channel4 play
# TS options
setup Channel4 option sout-ts-pid-audio=420
setup Channel4 option sout-ts-pid-video=410
setup Channel4 option sout-ts-tsid=4
setup Channel4 option sout-ts-netid=511
setup Channel4 option sout-ts-program-pmt="100,200,300,400"
setup Channel4 option sout-ts-muxpmt="110,120,,210,220,,310,320,,410,420"
setup Channel4 option sout-ts-sdtdesc="company,file1,company,file2,company,udp1,company,udp2"
# end MUX config
Re: UDP TS MUX ?
Posted: 04 Jul 2008 07:58
by Skinnersplace2
Thank's for the swift reply,
I have not tried the example yet, but are you saying it is only for linux or is this an example that will run in windows ?
Cheers for all the help !
Re: UDP TS MUX ?
Posted: 04 Jul 2008 09:13
by hihi
hi Skinnersplace2,
it's in the line
setup Channel4 option sout-ts-muxpmt="110,120,,210,220,,310,320,,410,420"
this is a lineup for the PID's
for the first service in the MPTS this means that it's called "file1" broadcasted by "company" (see sdtdesc), ServiceID=100 (see program-pmt), and Video PID=110, Audio PID=120 (see muxpmt)
i think the reason is located at the comma separated line-up, an array. this dll is not created in windows. since linux don’t use dll this is implemented somewhere in the vlc package ...
i'm not shure if thats the reason but this config will not work on windows and ... i work with window since i'm a noob at linux ... to bad for me.
Re: UDP TS MUX ?
Posted: 04 Jul 2008 14:11
by mrosche
Hi all,
I have tried the example config on a linux box and it does not work correctly...the pid are getting mixed up because when using the bridge-in, the bridge-ids are not converted to the ts-pids correctly. The client opens all of the mux video in seperate widows and plays the audio stream from the first input.
I am really interested in getting this working as I wish to mux various files in one ts stream and use the navigation option in the vlc player to switch between the "channels".
I have tried various options such as setting sout-ts-es-id-pid, etc. and cannot get the beast to work the way I want it.
Any and all help is greatly welcome!!!
Cheers!
mark
Re: UDP TS MUX ?
Posted: 04 Jul 2008 15:41
by Skinnersplace
Thanks HiHi,
I now understand why it will not work. Can you tell me how to achieve this in widows then ?
I think there are a lot of people who would be interested in taking inputs form multiple soucres, giving them unique pid's and creating a ts with channels that can be selected form the navigation menu.
Thanks
Re: UDP TS MUX ?
Posted: 04 Jul 2008 15:46
by Skinnersplace
Hi all,
THis is probably related to the above but......
I have broadcast the following from the windows gui fine, so I know it works.
I copied the following directy from the config file it created :
new broadcast enabled loop
setup input "some random music file form my hard drive"
setup output #transcode{vcodec=DIV3,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8080,sap,group=test,name=Channel 1}}
added Channel 1 to the description and the play comand to get :
new Channel 1 broadcast enabled loop
setup Channel 1 input "some random music file form my hard drive"
setup Channel 1 output #transcode{vcodec=DIV3,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8080,sap,group=test,name=Channel 1}}
control Channel 1 play
then ran it using C:\Program Files\VideoLAN\VLC" VLC -I telnet --vlm -conf Broadcast.cfg
and get nothing ! - VLC appears in my process manager but I recieve no audio on that address
It works when I create the stream from the gui, so what am I doing wrong by running it form the comand line ?
any help would be usefull !
Re: UDP TS MUX ?
Posted: 04 Jul 2008 15:49
by hihi
Hi Skinnersplace,
Like I told you, I'm a noob in programming or windows/linux at all. I think there is a need of a dll to interpret the comma separated array from the muxpmt ...
Have no clue how to, maybe some specialists from VLC can help us ... I'm interested in this feature for months (years) ...
Good luck
By the way, does it works in linux? I got the config build up reading the help file ... so I dont have any proof ...
Re: UDP TS MUX ?
Posted: 04 Jul 2008 15:52
by hihi
Hi all,
THis is probably related to the above but......
I have broadcast the following from the windows gui fine, so I know it works.
I copied the following directy from the config file it created :
new broadcast enabled loop
setup input "some random music file form my hard drive"
setup output #transcode{vcodec=DIV3,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8080,sap,group=test,name=Channel 1}}
added Channel 1 to the description and the play comand to get :
new Channel 1 broadcast enabled loop
setup Channel 1 input "some random music file form my hard drive"
setup Channel 1 output #transcode{vcodec=DIV3,vb=1024,scale=1,acodec=mp3,ab=192,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8080,sap,group=test,name=Channel 1}}
control Channel 1 play
then ran it using C:\Program Files\VideoLAN\VLC" VLC -I telnet --vlm -conf Broadcast.cfg
and get nothing ! - VLC appears in my process manager but I recieve no audio on that address
It works when I create the stream from the gui, so what am I doing wrong by running it form the comand line ?
any help would be usefull !
Channel_1 in stead of Channel 1 ?
Re: UDP TS MUX ?
Posted: 06 Jul 2008 14:59
by Skinnersplace
Thanks for the help all,
I fixed the running vlm problem, needed to use short file names in the paths (c:\Docume~1......).
So I can now get VLM to play multiple files, I am working on adding PID's so that I can see them form the navigation bar.
will something like this work ? :
new chan1 broadcast enabled loop
setup chan1 input "C:\Docume~1\ASkinner\Desktop\BRDXXX_SAF_MED_VIDEO_LINK\BARS.ts"
setup chan1 output #transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=512}:std{access=udp,mux=,dst=127.0.0.1:8080},dst=bridge-out{id=110},select=video,dst=bridge-out{id=120},select=audio
new chan2 broadcast enabled loop
setup chan2 input "C:\Docume~1\ASkinner\Desktop\BRDXXX_SAF_MED_VIDEO_LINK\BARS2.ts"
setup chan2 output #transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=512}:std{access=udp,mux=,dst=127.0.0.1:8081},dst=bridge-out{id=210},select=video,dst=bridge-out{id=220},select=audio
control chan1 play
control chan2 play
Skinner
Re: UDP TS MUX ?
Posted: 06 Jul 2008 16:07
by hihi
I dont think that works, you are using different ip ports 8080 and 8081. this means they are in different transport streams .
Re: UDP TS MUX ?
Posted: 10 Jul 2008 14:56
by Skinnersplace
Cheers Hi Hi,
Ok so if I set them both to the same port, will the pid information syntax etc be right ?
I am trying to get them so they show up as separate channels in the navigation bar.
Re: UDP TS MUX ?
Posted: 10 Jul 2008 16:30
by hihi
Hi Skinnersplace,
I try that a long time now, I like to join 2 live Single Program Transport Streams and 2 files into one Multiple Program Transport Stream so I can sellect in the Navigation dropdown but without succes.
If you (or someone else) can do it, please let me know
regards
Re: UDP TS MUX ?
Posted: 26 Sep 2008 08:54
by Skinnersplace
hello Hi Hi,
I have been working on the problem for a while, and have taken two different aproaches :
The first creates a two channel stream but only populates the first channel :
new chan1 broadcast enabled loop
setup chan1 input "C:\Docume~1\ASkinner\Desktop\BARS.ts"
setup chan1 output #transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=512}:std{access=udp,dst=127.0.0.1:8081}
setup chan1 option sout-ts-es-id-pid
setup chan1 option sout-ts-pid-audio=110
setup chan1 option sout-ts-pid-video=120
setup chan1 option sout-ts-program-pmt="100"
setup chan1 option sout-ts-sdtdesc="chan1"
new chan2 broadcast enabled loop
setup chan2 input "C:\Docume~1\ASkinner\Desktop\Mid Season review.mp4"
setup chan2 output #transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=512}:std{access=udp,dst=127.0.0.1:8082}
setup chan2 option sout-ts-es-id-pid
setup chan2 option sout-ts-pid-audio=210
setup chan2 option sout-ts-pid-video=220
setup chan2 option sout-ts-program-pmt="200"
setup chan2 option sout-ts-sdtdesc="chan2"
control chan1 play
control chan2 play
new channel1 broadcast enabled loop
setup channel1 input udp://@127.0.0.1:8082
setup channel1 input udp://@127.0.0.1:8081
setup channel1 option sout-ts-es-id-pid
setup channel1 option sout-ts-tsid=1
setup channel1 option sout-ts-netid=510
setup channel1 option sout-ts-program-pmt="100,200"
setup channel1 option sout-ts-muxpmt="110,120,,210,220"
setup channel1 option sout-ts-sdtdesc="MY TV,Channel 1,MY TV,Channel 2"
setup channel1 output #std{access=udp,mux=ts,dst=127.0.0.1:8083}
control channel1 play
The second loads two channels into a single stream and plays them together in a single channel :
new chan1 broadcast enabled loop
setup chan1 input "C:\Docume~1\ASkinner\Desktop\BARS.ts"
setup chan1 output #transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=512}:std{access=udp,dst=127.0.0.1:8081}
setup chan1 option sout-ts-es-id-pid
setup chan1 option sout-ts-pid-audio=110
setup chan1 option sout-ts-pid-video=120
setup chan1 option sout-ts-program-pmt="100"
setup chan1 option sout-ts-sdtdesc="chan1"
new chan2 broadcast enabled loop
setup chan2 input "C:\Docume~1\ASkinner\Desktop\Mid Season review.mp4"
setup chan2 output #transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=512}:std{access=udp,dst=127.0.0.1:8082}
setup chan2 option sout-ts-es-id-pid
setup chan2 option sout-ts-pid-audio=210
setup chan2 option sout-ts-pid-video=220
setup chan2 option sout-ts-program-pmt="200"
setup chan2 option sout-ts-sdtdesc="chan2"
control chan1 play
control chan2 play
new chan3 broadcast enabled loop
setup chan3 input "udp://@127.0.0.1:8081"
setup chan3 output #duplicate{dst=bridge-out{id=120},select=video,dst=bridge-out{id=110},select=audio}
setup chan3 option sout-ts-es-id-pid
setup chan3 option sout-ts-pid-audio=110
setup chan3 option sout-ts-pid-video=120
setup chan3 option sout-ts-program-pmt="100"
setup chan3 option sout-ts-sdtdesc="chan1"
control chan3 play
new channel1 broadcast enabled loop
setup channel1 input "udp://@127.0.0.1:8082"
setup channel1 option sout-ts-es-id-pid
setup channel1 option sout-ts-tsid=1
setup channel1 option sout-ts-netid=510
setup channel1 option sout-ts-program-pmt="100,200"
setup channel1 option sout-ts-muxpmt="110,120,,210,220"
setup channel1 option sout-ts-sdtdesc="MY TV,Channel 1,MY TV,Channel 2"
setup channel1 output #bridge-in:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:8083}
control channel1 play
neither works properly - I think the problem with the first one is that I do not alocate the inputs to the channels properly ?
for the second one I belive the bridg in / bridge out command is intended for mosaics not creating multi channel transport streams.
Any one else got any ideas ?
Re: UDP TS MUX ?
Posted: 30 Sep 2008 13:03
by Skinnersplace
Ok, I have this working now, had to add {id-offset=0} to the Bridge in command.
Also the ts-es pid's and sdtdesc dont need to be set every time, as the channel names are set in the final channel, and the pid's are set in the bridge out commands.
Re: UDP TS MUX ?
Posted: 12 Aug 2010 16:20
by jpincheira
could you be more specific, Skinnersplace?
are you making these changes on your first or second approach?
I still can't get it to work
Could you post your vlm file?
Thanks in advance!