Page 1 of 1

Run VLC from a batch file

Posted: 22 Nov 2010 19:10
by Ron Hirsch
Sometime earlier this year I created a batch file to do these 2 things below, getting some help from this forum.

I"m running VLC version 1.1.4

1. Start VLC minimized, and have it play a group of songs in a defined folder, via an XPSF playlist I created, and then to loop back to the beginning of the playlist when the last song had been played.

2. Run a slide show program, after running the code to start VLC playing (minimized).

The batch file worked fine back then, but some things got moved around in my Win 7 64 bit OS system, so I changed the elements in the batch file to reflect the new paths and filenames.

The batch file does not work properly anymore. The batch file is noted below. All the file names and paths are correct. But, the only thing that happens when I run this batch file is that VLC starts playing, not minimized, and the slide show program (DSSAR.EXE) does not run.

Start "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "D:\DSSSHOWS\Moviesongs.xspf" --qt-start-minimized --loop START "\D:\DSSSHOWS\DSSAR.EXE"

Where have I gone wrong? I may not need all the quotation marks I used, but removing the 2nd and/or 3rd set makes no difference.

Thanks for any help anyone can offer.

Ron Hirsch

Re: Run VLC from a batch file

Posted: 22 Nov 2010 22:26
by VLC_help
start, that is the problem. You have to give title for it.
http://ss64.com/nt/start.html

Re: Run VLC from a batch file

Posted: 23 Nov 2010 11:25
by Ron Hirsch
Thanks for your reply.

I edited the batch file, by putting in 2 pairs of "" as noted below.

This did now start VLC running minimized, but the last section to run DSSAR.EXE still does not run.

My latest edited batch file is

Start "" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "D:\DSSSHOWS\Moviesongs.xspf" --qt-start-minimized --loop START "" "D:\DSSSHOWS\DSSAR.EXE"

Is there something additional I need to do?

Thanks again

Ron Hirsch

Re: Run VLC from a batch file

Posted: 23 Nov 2010 18:02
by CharredPC
Here's the batch file we use for VLC:

Code: Select all

:Start del C:\Users\Administrator\AppData\Roaming\vlc\crashdump call "C:\Program Files\VideoLAN\VLC\vlc.exe" "mms://sourceurl.com/stream.wmv" --sout="#transcode{width=320,height=240,venc=x264{bframes=0,nocabac,crf=24,profile=baseline,level=3.0,vbv-maxrate=140,vbv-bufsize=1000,keyint=36,fps=18},vcodec=h264,vfilter=canvas{height=240,width=320,aspect=16:9},vb=110,audio-sync,acodec=mp4a,ab=34,channels=1,samplerate=44100}:rtp{mp4a-latm,dst=127.0.0.1,port=1020,sdp=file:///C:\streams\vlc.sdp}" goto Start
New commands should always be on a new line, and it's a good habit to put long strings such as directories into quotes. Your secondary command might not be running because the first command isn't "done". Try running your batch file, then closing the VLC instance it produces. Does DSSAR.EXE then run?

Re: Run VLC from a batch file

Posted: 23 Nov 2010 18:42
by Ron Hirsch
Thank you so much for your assistance. It's been many years since I had to play with command lines and batch files.

Putting the command for dssar.exe on itw own line solved the problem.

It all works perfectly now.

Thanks again

Ron Hirsch

Re: Run VLC from a batch file

Posted: 18 Apr 2017 14:57
by jamied_uk
i need a 1 liner i dont want to use a domain i need this to work via a local file like stream.mp4 how can i do this? or just open without recording stream at all i have a local ip cam, please help i wish to run a bat script to open a ip cam rtsp.

Re: Run VLC from a batch file

Posted: 19 Apr 2017 06:29
by zcot

Code: Select all

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "C:\Users\jamied_uk\My Videos\whatever_video.mp4"