Run VLC from a batch file

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Ron Hirsch
New Cone
New Cone
Posts: 6
Joined: 26 Feb 2010 15:52

Run VLC from a batch file

Postby Ron Hirsch » 22 Nov 2010 19:10

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

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Run VLC from a batch file

Postby VLC_help » 22 Nov 2010 22:26

start, that is the problem. You have to give title for it.
http://ss64.com/nt/start.html

Ron Hirsch
New Cone
New Cone
Posts: 6
Joined: 26 Feb 2010 15:52

Re: Run VLC from a batch file

Postby Ron Hirsch » 23 Nov 2010 11:25

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

CharredPC
Blank Cone
Blank Cone
Posts: 14
Joined: 05 Oct 2010 19:48

Re: Run VLC from a batch file

Postby CharredPC » 23 Nov 2010 18:02

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?

Ron Hirsch
New Cone
New Cone
Posts: 6
Joined: 26 Feb 2010 15:52

Re: Run VLC from a batch file

Postby Ron Hirsch » 23 Nov 2010 18:42

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

jamied_uk
New Cone
New Cone
Posts: 5
Joined: 28 Nov 2011 14:23

Re: Run VLC from a batch file

Postby jamied_uk » 18 Apr 2017 14:57

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.

zcot
Big Cone-huna
Big Cone-huna
Posts: 606
Joined: 15 Jun 2005 10:58

Re: Run VLC from a batch file

Postby zcot » 19 Apr 2017 06:29

Code: Select all

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


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 62 guests