Change input in a VLM element

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Change input in a VLM element

Postby vice » 12 Jun 2008 17:33

Excuse for reposting this text, but I think this is the correct place, sorry.

I'm trying to figure out how to change the input of a VLM element by VLM commands and haven't found anything. I'm trying to use the input list of a broadcast VLM element as a basic playlist, but I need the command to select the input number.

I'm scripting remotely a VLC media player a this could be very usefull to implement some kind of switching functionality to the broadcast VLM elements.

My fisrt input is a live stream so its never ends, but I need to switch to others inputs on demand.

For example, we could relay a live streaming and from time to time switch to some anouncement, advertisement, replay action or whatever. With the option sout-keep to keep the streaming going.

If this is imposible, the only way to do it is:
  • 1. Stop the VLM element, destroy its input, set the new input, and play again the VLM element. Restart the process to get back to the old input.
    2. Or, Stop and play differents VLM elements all of them with the same output.
    3. Use the VLC media player own playlist and forget about VLM.
Searching for possible VLM commands, I found:
control (name) [instance_name] (command)
with control commands:
play, stop, pause and seek.

of all those, seek sounds promising but it only handles seeking in the current input (I understand), perhaps we could add a new control command like this:

Code: Select all

control (name) [instance_name] inputn (input number)
or play command with opcional input number:

Code: Select all

control (name) [instance_name] play [input number]
event extend the seek control command with an optional input number, so it could be written:

Code: Select all

control (name) [instance_name] seek [+-](percentage) | [+-](seconds)s | [+-](milliseconds)ms [input number]
Where could I found more information about VLM commands?
If this functionality is missing, could it be a good adition?
I don't think this could be hard to implement.

Thanks in advance!

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Change input in a VLM element

Postby vice » 13 Jun 2008 13:29

Code: Select all

control (name) [instance_name] play [input number]
implemented for the upcomming 0.9 version.
(Saw in git repository)

yohann.martineau
Blank Cone
Blank Cone
Posts: 84
Joined: 27 Aug 2007 15:22

Re: Change input in a VLM element

Postby yohann.martineau » 26 Jun 2008 16:09

in this case, how must we create the vod?

Code: Select all

new test vod enabled setup test input /home/my/file.mpg 1 setup test input /home/my/file2.mpg 2 setup test output #std{access=udp,mux=ts,dst=1.2.3.4:1234} control play test 1 control play test 2
Like this?

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Change input in a VLM element

Postby vice » 03 Jul 2008 10:22

in this case, how must we create the vod?

Code: Select all

new test vod enabled setup test input /home/my/file.mpg 1 setup test input /home/my/file2.mpg 2 setup test output #std{access=udp,mux=ts,dst=1.2.3.4:1234} control play test 1 control play test 2
Like this?
No, I don't think that works. But you need to try it.
I think you can't send a control play command to a VOD element. The VOD play is controlled by the client a not by VLM commands.
(Remenber to try, just in case...)
But if you create instead a broadcast element with lines similar to the first 4, you can control what input is playing by sending VLM commands like those in lines 5 and 6.

And remenber that this only works for the forcomming 0.9 version.

yohann.martineau
Blank Cone
Blank Cone
Posts: 84
Joined: 27 Aug 2007 15:22

Re: Change input in a VLM element

Postby yohann.martineau » 04 Jul 2008 11:14

ok, thank you for your answer.

I've tried the following commands with latest sources (0.9.0-test2)

Code: Select all

> new test broadcast enabled > setup test input /home/yohann/media/out/ad_mercedes.mpg 1 setup : Wrong command syntax
how did you configure vlc?

I configured vlc with the following line:

./configure --disable-qt4 --disable-skins2

and i launched vlc with this command line:

./vlc -I telnet --rtsp-host 0.0.0.0:5554

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Change input in a VLM element

Postby vice » 07 Jul 2008 09:54

[quote="yohann.martineau"]

Code: Select all

> new test broadcast enabled > setup test input /home/yohann/media/out/ad_mercedes.mpg 1 setup : Wrong command syntax
I think the wrong command syntax could be because of the last number that you put at the end of the line.
As far as I know you only can setup input <and the media location> or MRL as the VLC Team like to name.

So because you can't put any input number, the list are ordered as you enter input commands first setup input determines the first input and so on with the followings setup input commands.

yohann.martineau
Blank Cone
Blank Cone
Posts: 84
Joined: 27 Aug 2007 15:22

Re: Change input in a VLM element

Postby yohann.martineau » 08 Jul 2008 10:38

ok, thank you for your reply. I will perform some tests with input order, without this explicit number.

thanks,

yohann

xsimio
Blank Cone
Blank Cone
Posts: 13
Joined: 07 Jul 2008 15:24

Re: Change input in a VLM element

Postby xsimio » 08 Jul 2008 11:21

use:
inputn X

is working for me.

novamxd
New Cone
New Cone
Posts: 7
Joined: 11 Aug 2008 00:40

Re: Change input in a VLM element

Postby novamxd » 15 Aug 2008 00:19

*bump*

You could also try something like:

Code: Select all

new broad1 broadcast enabled setup broad1 input *live stream* setup broad1 output #transcode{acodec=mp4a,ab=128,channels=2}:std{access=http,mux=ts,dst=127.0.0.1:1000} new broad2 broadcast enabled setup broad2 input "c:\addvert1.mp3" setup broad2 output #transcode{acodec=mp4a,ab=128,channels=2}:std{access=http,mux=ts,dst=127.0.0.1:1000} new mystream vod enabled setup mystream input "127.0.0.1:1000"
Toggle them by:

Code: Select all

control broad1 stop control broad2 play or control broad1 play control broad2 stop
Access via RTSP:

Code: Select all

rtsp://*serveraddr*/mystream

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: Change input in a VLM element

Postby publicENEMY » 26 Aug 2008 10:59

*bump*

You could also try something like:

Code: Select all

new broad1 broadcast enabled setup broad1 input *live stream* setup broad1 output #transcode{acodec=mp4a,ab=128,channels=2}:std{access=http,mux=ts,dst=127.0.0.1:1000} new broad2 broadcast enabled setup broad2 input "c:\addvert1.mp3" setup broad2 output #transcode{acodec=mp4a,ab=128,channels=2}:std{access=http,mux=ts,dst=127.0.0.1:1000} new mystream vod enabled setup mystream input "127.0.0.1:1000"
Toggle them by:

Code: Select all

control broad1 stop control broad2 play or control broad1 play control broad2 stop
Access via RTSP:

Code: Select all

rtsp://*serveraddr*/mystream
Doesnt work. heres my command
new broad1 broadcast enabled
setup broad1 input C:\Videos\video1.avi
setup broad1 output #duplicate{dst=std{access=http,mux=ts,dst=127.0.0.1:1234}}

new broad2 broadcast enabled
setup broad2 input C:\Videos\video2.avi
setup broad2 output #duplicate{dst=std{access=http,mux=ts,dst=127.0.0.1:1234}}

new stream1 vod enabled
setup stream1 input "127.0.0.1:1234"

control broad1 play
control broad2 stop
and in vlc
rtsp://10.44.39.89:5554/stream1
gives the error
Unable to open 'rtsp://10.44.39.89:5554/stream1'
when i tried play streams from 127.0.0.1:1234(which is broad1), it works fine.

please help.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Change input in a VLM element

Postby dionoea » 26 Aug 2008 22:20

Suppose you have this:

Code: Select all

new foo broadcast enabled input somefile.mpeg control foo play
To change the input list you can use:

Code: Select all

setup foo inputdel all input someotherfile.mpeg
I suggest that you run the telnet interface and type "help" to get all the available commands.

Cheers,
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Change input in a VLM element

Postby vice » 03 Sep 2008 13:06

Suppose you have this:

Code: Select all

new foo broadcast enabled input somefile.mpeg control foo play
To change the input list you can use:

Code: Select all

setup foo inputdel all input someotherfile.mpeg
I suggest that you run the telnet interface and type "help" to get all the available commands.

Cheers,
So this is basically the method described in my first post as number 1 but without stopping and starting the VLM element. Does it works? Has anybody tried it?

If I can test it I post results here.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Change input in a VLM element

Postby dionoea » 03 Sep 2008 15:02

It should work :) Maybe you have to add the new input first and the delete the other inputs one by one.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: Change input in a VLM element

Postby publicENEMY » 04 Sep 2008 05:39

i believe, telnet interface does not work properly under windows.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Change input in a VLM element

Postby dionoea » 04 Sep 2008 14:10

It works fine :) It just doesn't work fine with the native windows telnet client. Try another one like putty.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: Change input in a VLM element

Postby publicENEMY » 05 Sep 2008 05:12

i have tried using putty and while it does work, it also crash frequently, just not as frequent as windows client.

maybe thats just me.

hillbilly1980
Blank Cone
Blank Cone
Posts: 13
Joined: 14 Oct 2008 04:07
VLC version: 1.1.4
Operating System: Ubuntu
Location: Nelson, BC
Contact:

Re: Change input in a VLM element

Postby hillbilly1980 » 14 Oct 2008 04:12

I've tried the inputdel all method and it doesn't switch streams unless you stop and then restart the broadcast control. I'm still trying to work how to broadcast to 127.0.0.1:1000 and switch using the vod method but keep gettign "no access modules" found and the like.

chinnaedu
Blank Cone
Blank Cone
Posts: 28
Joined: 08 Feb 2010 08:51

Re: Change input in a VLM element

Postby chinnaedu » 03 Jun 2010 14:48

if anyone here came up with any solution to this please do post here....
Thank you


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 1 guest