Page 1 of 1

Launching VLC From A Script

Posted: 29 Sep 2005 07:12
by cheeseness
G'day

I'm having a bit of a problem with VLC. I'm looking to stream video from a machine on our network. I'm planning on putting a login script for certain users so that VLC will be launched in client or server mode as appropriate and automatically connect, etc.

I'm using a .vbs (which is entirely evil) which looks something like this:

Code: Select all

Set objShell = CreateObject("Wscript.Shell") objShell.Run(CHR(34) & "C:\Program Files\VideoLAN\VLC\vlc.exe" & CHR(34) & " --intf dummy --dummy-quiet --video-on-top --width 120 --height 90 dshow:// :dshow-adev=none :no-dshow-config :no-dshow-tuner --sout #transcode{vcodec=mp4v,vb=384,scale=1}:duplicate{dst=display,dst=standard{access=udp,mux=ts,url=239.255.42.12:1234}}"), 1, TRUE
I'm using CHR(34) to insert double quotes around the path to the executable, but it doesn't seem to work for any of the arguments.

I've got a web cam that reboots the computer if no size is specified, and if that's not in quotes, it doesn't seem to launch.

Has anybody else had any experience with launching VLC from a .vbs script?

Posted: 29 Sep 2005 11:37
by zcot
not really positive on vbs but often there's a translation phase and so:

\\ translates to \
\" translates to "

see how that goes..

Posted: 30 Sep 2005 01:47
by cheeseness
On the Microsoft site they talk about two "" in a row being converted into the double quote character within a string, but I was never able to get that working.

It turns out my problem was not so much to do with the quotes as it was to do with the fact that VLC doesn't want to let me use mp4v encoding with the Quickcam IM. Works fine for the Express, but when I plug the IM in, it says it was unable to create the stream.

--dummy-quiet wasn't helping much either.

I tried mjpg, which worked fine at the server, but the clients couldn't seem to buffer, and in the end I've settled on one of the WMV codecs (which seems to be working fine).

I'd have thought that the encoding would not be camera specific (the VLC software takes the stream and encodes it rather than asking the camera to encode it). It seems odd to me that I had this problem.