VLM auto-start ?

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
kmarchand
New Cone
New Cone
Posts: 5
Joined: 20 Mar 2008 15:41

VLM auto-start ?

Postby kmarchand » 20 Mar 2008 16:25

I am using VLM to transcode about a dozen high rez WMV feeds (528Kbps) to low rez WMV (96Kbps) so I can embed them all into a website without the CPU overloading.

When using the GUI and loading a vlm config file everything runs fine for a few hours, then some of the vlm items stop playing. I think it may be due to CPU load or memory leak.

I have to work in an Windows environment so I'm writing a script to kill the process and relaunch at regular intervals.

In the bat file, i'm using:

Code: Select all

@echo off c: cd\ cd "program files\videolan\vlc" start vlc -I qt --vlm-conf c:\vlmtest.txt
Which launches VLC with the VLM playlist (~12 transcode) loaded. The only problem is that the transcodes don't start until I open VLM manually (using the menu, or CTRL+V). I've tried to use dos edit to add the CTRL+V character in the bat file but it won't open VLM automatically. I also tried the original interface and the qt interface and it's the same both ways.

My current option is to launch it with the telnet interface, which works, however I wanted to use to GUI so the operators working with the system can see if all the items in the VLM list are in a 'play' mode.

So my two questions:
1) Is there a way to launch VLM from a .bat while launching VLC?
2) If the telnet interface is the only/best option, how can I provide a status display while it is running?

Any help would be greatly appreciated.

Kind Regards,
Kevin

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: VLM auto-start ?

Postby revolunet » 21 Mar 2008 18:29

hello

maybe you can start vlc with telnet and qt ?

Code: Select all

start vlc -I telnet --extraintf qt --vlm-conf c:\vlmtest.txt
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

kmarchand
New Cone
New Cone
Posts: 5
Joined: 20 Mar 2008 15:41

Re: VLM auto-start ?

Postby kmarchand » 24 Mar 2008 22:36

hello,

thanks for the suggestion but it won't launch both.

the solution i've found is to just use the telnet interface, which allows the VLM playlist to load and start running automatically (with the "control start" command for each transcode). i've written a .bat file which runs on a loop and acts as a watchdog. it uses netstat to dump a list of the outgoing ports created by VLM to a file (c:\ns-dump.txt) which, if everything is running, should always be the same size (726 bytes). the bat file will then check the size of c:\ns-dump.txt and if it isn't 726, then it will kill the vlc.exe and restart it with the playlist.

here's the full bat file (with help from alt.msdos.batch for the size comparison), if anyone else is interested:

Code: Select all

@echo off :start cls echo. echo. echo Verifying that all VLM services are transcoding... netstat -n -a |findstr "192.168.100.7:10" |findstr "0.0.0.0" >c:\ns-dump.txt goto :sizecheck :sizecheck set ExpectedSize=726 for %%g in (c:\ns-dump.txt) do set "actual=%%~zg" if %actual% equ %ExpectedSize% ( goto :allrunning ) else ( goto :restart ) :allrunning echo. echo All services are running. Verification will restart in 10 seconds... echo. PING 1.1.1.1 -n 1 -w 10000 >NUL goto :start :restart echo. echo One or more services are missing. VLM is being restarted... echo %date% %time% - VLM was restarted >> c:\vlm-log.txt c: cd\ echo. echo Shutting down VLC... taskkill /im vlc.exe /f echo. echo Restarting VLC... cd "program files\videolan\vlc" start vlc -I telnet --vlm-conf c:\vlm-config.txt echo Transcode services are buffering... echo Monitoring will resume in 15 seconds. echo. PING 1.1.1.1 -n 1 -w 15000 >NUL goto :start
i'm using ports 1001-1011 for the outgoing streams generated by VLM so that's why i specified "192.168.100.7:10" in the netstat dump (where 192.168.100.7 is the IP address of the server being used). the bat file will also generate a log to keep track of how often the restart occured.

i think the VLM transcodes kept halting because i was running it on a server that was pushing the CPU load near 95%. i moved it off to another dedicated (and better) server and it's sitting around 35%. i don't think i'll have problems with the halting anymore but now it's protected.

i also wrote a standalone netstat display .bat to have an on-screen display showing that the outgoing ports are active (i.e. that VLM is working):

Code: Select all

@echo off :start echo. echo VLM Broadcast Ports: 1001-1011 echo. netstat -n -a |findstr "192.168.100.7:10" |findstr "0.0.0.0" PING 1.1.1.1 -n 1 -w 1000 >NUL echo. cls goto :start
while the services are being restarted, the website that has all the embeded wmv streams stops but then starts again automatically after about 10 seconds so it's working pretty well.

thanks.
regards,
kevin

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

Re: VLM auto-start ?

Postby dionoea » 22 Apr 2008 15:48

vlc -I qt --extraintf telnet should definitively work. Since you're using a development version, you could just grab a newer version: --vlm-conf now automatically starts VLM when specified.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

kmarchand
New Cone
New Cone
Posts: 5
Joined: 20 Mar 2008 15:41

Re: VLM auto-start ?

Postby kmarchand » 22 Apr 2008 16:14

Hello,

Thanks for getting back to me.

I downloaded the latest version (0.8.6f) today and get the following results:

1)

Code: Select all

vlc -I qt --vlm-conf c:\vlm-config.txt
= GUI interface opens, VLM config is loaded. The problem is that the VLM playlist command "control test play" doesn't take effect until I open the VLM GUI (view, VLM control).

2)

Code: Select all

vlc -I qt --extraintf telnet --flm-conf c:\vlm-config.txt
= GUI interface opens, VLM config is loaded, playout starts automatically. The problem with that is that the GUI only shows the normal controls... I had hoped that the VLM section could be opened automatically so it would be obvious as to which services were in play mode and which weren't.

The .bat file method I'm using for monitoring the network ports and restarting VLC if anything goes down is working perfectly well for my need at this point. Rather than have the VLM GUI open for 'at-a-glance' monitoring, the .bat file is always running and provides a message stating that all services are running.

Thanks again.

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

Re: VLM auto-start ?

Postby dionoea » 22 Apr 2008 16:20

1)
* qt isn't available in 0.8.6 releases ... (-I wx would be what I expect you to use)
* 0.8.6 isn't the latest development version :)

2)
* same remark about qt
* I doubt that you can ask it to open the VLM panel upon startup (the interface remembers some window positions from the previous time you used it but I doubt that the VLM panel is one of those)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

vibes992000
Blank Cone
Blank Cone
Posts: 61
Joined: 29 Feb 2008 12:05
VLC version: 0.86i
Operating System: Windows XP
Location: INDIA
Contact:

Re: VLM auto-start ?

Postby vibes992000 » 31 May 2008 12:38

Thanks.... for solving VLM Crashing Thing.
vibs


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 3 guests