Page 1 of 1

VLM auto-start ?

Posted: 20 Mar 2008 16:25
by kmarchand
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

Re: VLM auto-start ?

Posted: 21 Mar 2008 18:29
by revolunet
hello

maybe you can start vlc with telnet and qt ?

Code: Select all

start vlc -I telnet --extraintf qt --vlm-conf c:\vlmtest.txt

Re: VLM auto-start ?

Posted: 24 Mar 2008 22:36
by kmarchand
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

Re: VLM auto-start ?

Posted: 22 Apr 2008 15:48
by dionoea
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.

Re: VLM auto-start ?

Posted: 22 Apr 2008 16:14
by kmarchand
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.

Re: VLM auto-start ?

Posted: 22 Apr 2008 16:20
by dionoea
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)

Re: VLM auto-start ?

Posted: 31 May 2008 12:38
by vibes992000
Thanks.... for solving VLM Crashing Thing.