Launching vlc using cmd

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.
Merowingian

Launching vlc using cmd

Postby Merowingian » 23 Feb 2006 15:44

Hi,

I have already tried to launch an internet stream via vlc as shown in the documentation, using cmd,

C:\\>vlc http://www.streamingadress.com:port

and hit enter. Nothing happend, the cmd went back to input mode, awaiting the next command, as if the vlc-command had already been executed.
So the next line looked like this:

C:\\>

Why doesn't this work? I actually want to create a batch file that automatically launches streams, but it doesn't even seem to work on cmd directly.

Please help

Greets,

the Merowingian

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 23 Feb 2006 20:39

What you should have seen was:

C:\>vlc http://www.streamingadress.com:port
'vlc' is not recognized as an internal or external command,
operable program or batch file.

C:\>

The whole path to VLC must be placed on the command line.

c:\progra~1\videolan\vlc\vlc {options}

or

cd \progra~1\videolan\vlc and then type "vlc {options}"

or

add VLC to your Path Environment so that you can just type "vlc {options}"

:lol:

Merowingian

Postby Merowingian » 23 Feb 2006 20:46

I already know all this,

and the fact is, I did NOT see this


C:\>vlc http://www.streamingadress.com:port
'vlc' is not recognized as an internal or external command,
operable program or batch file.


at all. Otherwise I would have known where the problem is.

I have already entered the vlc-path into PATH in the environment, but STILL I'm neither getting any error message, nor does vcl play any stream. It doesn't react AT ALL, you know? cmd just ignores my command as if it were nothing. No error message, no vlc launch, no nothing. That's what's been bothering me for the last 6 hours.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 23 Feb 2006 20:54

I see! :cry:

Does VLC work when you tap the icon or go to the directory and tap VLC's icon?

If it does, I would examine your Path environment variable to be sure the path was entered in correct form.

:lol:

Merowingian

Postby Merowingian » 23 Feb 2006 20:58

It does work when I tap the icon, but that gives me the GUI where you have to click around to get the stream. It works fine this way, but I intent to do it the cmd-way so I can write automatic batch-files scripts.

And I have already examined my path environment. You know that otherwise I would be getting an error message from cmd.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 23 Feb 2006 21:21

It does work when I tap the icon, but that gives me the GUI where you have to click around to get the stream. It works fine this way, but I intent to do it the cmd-way so I can write automatic batch-files scripts.

And I have already examined my path environment. You know that otherwise I would be getting an error message from cmd.
Yes! I understand! But I had to be sure VLC was working. If you navigate to the VLC directory in a DOS box and type VLC does the program open?

cd \progra~1\videolan\vlc

and then type vlc NO options

Assuming it does there is a problem with the Path.

Assuming it doesn't suggests a problem with the DOS box.

There is a file that governs the DOS Box, but I would have to do some searching to remember what and where it is. We are talking about XP aren't we?

:lol:

Merowingian

Postby Merowingian » 23 Feb 2006 21:32

Yes, we are talking about Windows XP

The program doesn't open at all when I type just vlc.
But it does open when I type this:

vlc --someUnavailableOption

Another command window opens: The vlc-command window, saying:

"Dumped content to vlc-help.txt file.
The command line options couldn't be loaded, check that they are valid.

Press the RETURN key to continue..."

How come vlc doesn't react to an officially legal command, not even with an error message, but opens - at least opens a command window when I type a wrong option after the "--"-intro?

Merowingian

Postby Merowingian » 23 Feb 2006 21:34

And also, this is exactly what I typed in cmd for testing purpose:

blabla>vlc http://www.radiopalmwine.com:8014

That's what gives me the zero-reaction.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 23 Feb 2006 22:03

Yes, we are talking about Windows XP

The program doesn't open at all when I type just vlc.
But it does open when I type this:

vlc --someUnavailableOption
But I don't know where you are when you type that because you don't say.
Another command window opens: The vlc-command window, saying:

"Dumped content to vlc-help.txt file.
The command line options couldn't be loaded, check that they are valid.

Press the RETURN key to continue..."
This is a normal function of VLC to create a help file when it doesn't recognize a command and does seem to indicate that you are in the VLC directory. The file is called vlc-help.txt and will be created in any directory you give the command from if the path is correct. So would allow you to check your environment variable by checking for the existence of the file in what ever directory you called VLC from.
How come vlc doesn't react to an officially legal command, not even with an error message, but opens - at least opens a command window when I type a wrong option after the "--"-intro?
I think I already explained this one. I really believe the real question is why isn't a DOS box calling the GUI interface? This would NOT be a problem with VLC, but instead be a problem with the DOS box. Perhaps trying to open another GUI program like WMP or MPC from the command line would help show the problem.

:lol:

Merowingian

Postby Merowingian » 23 Feb 2006 22:40

But I don't know where you are when you type that because you don't say.
I am in my home directory. I have also tried it, starting from the vlc directory. But it doesn't even matter where I start from, since the vlc path is included in the path variable, so vlc will always be found.
I think I already explained this one. I really believe the real question is why isn't a DOS box calling the GUI interface? This would NOT be a problem with VLC, but instead be a problem with the DOS box. Perhaps trying to open another GUI program like WMP or MPC from the command line would help show the problem.
:lol:
Well, I don't really want the DOS box to cal the GUI interface. In fact, I would prefer it to open no other window either, just show the information about the stream in the same DOS box while playing it, just like mplayer does (mplayer, not Windows Media Player).
But that's another story...

Trying to open another GUI program (eclipse, arcmap, firefox, opera, ...) IS no problem and has never been. And I wouldn't have expected it to be any different. vcl is the first and only program for me that doesn't work in the expected way. Just try the command in your own DOS box, I'm sure you'll get the same non-reaction. It's the software, Dude.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 23 Feb 2006 23:00

Sorry, I have been checking this all along as we have been discussing it or I would have been writing this differently. Originally VLC was like mplayer but it has evolved to be a full GUI. When options are entered on the command line the GUI does open. Believe me I know as I do it all the time.

While I realize that you may be frustrated, you are not really answering my questions. At the same time I am trying to ask simple direct questions so as not to lose anyone, as most of the time we have no way of determining where you are at with computers. In may cases I am having to read between the lines and assume. For example I still don't know if the text file shows up in any directory that you call vlc -h from with out typing the full command line. I posed this test because of a prior response that you did not answer the posed question. So as an end result I am still guessing as to the cause of the real problem.

There is one thing I do know for sure at this point that I didn't know at the beginning and that is the problem is NOT VLC as it appears to be working.

Also I notice that all of the programs you tried do not use DirectX rather than try the programs I suggested.

:lol:

Merowingian

Postby Merowingian » 24 Feb 2006 00:25

I'm sorry.

The text file does show up in the directory that I call vlc -h from, yes.

When I give the command I am in my home directory. Again, I am using Windows XP. I am familiar with the PATH variable in Windows, which you can set using Control Panel -> System -> and so on. And I have added the path of the vlc.exe to it, so cmd should know where to find it if I give the vlc command from my home directory.

If I navigate to the VLC directory, well let me try again...Yes, the program DOES open now. Thank you very much!!! :D
But when I try to open it then with ther http://-adress there is no sound. Maybe that's why I haven't noticed it before.

But why do I have to be in the VLC directory if PATH is actually set?
And why is there no sound?

Oh, and I have also tried wmplayer (the WMP you suggested?) with cmd. Does it use DirectX?

Thanks for your patience.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 24 Feb 2006 00:42

Well at least we are getting somewhere again. 8)

If the text file is showing up in your home directory, this does indicate the your path is correct, I can not think of a reason why vlc should not be opening, once again with no options, entering the command vlc from your home directory. As you have noticed when the options are incorrect the program prints a help file, it doesn't show errors and quits. I do assure you that it does work for me.

As far as no sound goes the documentation is not real accurate as it has changed from version to version. So the next thing I need to know is the version of VLC you are running? At the same time post the real command line here so that I can look at it.

:lol:

Merowingian

Postby Merowingian » 24 Feb 2006 13:00

I'm running version 0.8.4a

The real command line is:

C:\Documents and Settings\Merowingian>vlc http://www.radiopalmwine.com:8014

Merowingian

Postby Merowingian » 24 Feb 2006 13:53

And also, I noticed that the help file vlc creates at wrong option input is empty (0 KB).
Only "vlc -help" produces a 7 KB file in the current directory.

Merowingian

Postby Merowingian » 24 Feb 2006 14:40

HEY,

I don't know what happened, but I'm suddenly hearing sound now!!!

The problem remaining is that directory thing: Launching vlc from a directory other than its own one.

I also would like to launch vlc without a GUI, just the console, or if possible, no extra window, but everything being displayed in the cmd window that launches vlc.
The option -I or --intf doesn't look promising, since there is no "console" module available in the list of possible for vlc.
How else?

Merowingian

Postby Merowingian » 24 Feb 2006 16:44

Also, it seems to be a general problem with cmd, that all commands using a {}-syntax don't work.
For example, I tried

--sout="#transcode{acodec="mp3...}":duplicate{...}

but no mp3 file was created, vcl only plays the stream.

sunqan

Postby sunqan » 24 Feb 2006 18:17

not that I use VLC through the command prompt´, but I couldn't help myself...

adding c:\program files\videolan\vlc to the path and then from a cmd-window, with the default directory being
c:\documents and settings\user

1) just entering VLC just gives the prompt back. repeating this several times while the task manager is running at least shows that vlc.exe is started.
2) typing vlc.exe instead makes no difference
3) vlc --help tells me that there is an error and produces the vlc-help.txt file in my current directory
4) typing \program files\videolan\vlc\vlc starts vlc properly
5) doing a cd to \program files\videolan\vlc and then type vlc also starts vlc properly.

and now... back to the hockey game 6-3 :D :D :D :D :D :D :D

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 24 Feb 2006 19:07

Also, it seems to be a general problem with cmd, that all commands using a {}-syntax don't work.
For example, I tried

--sout="#transcode{acodec="mp3...}":duplicate{...}

but no mp3 file was created, vcl only plays the stream.
Perhaps reading the documentation and entering the commands correctly will allow VLC to understand what is in your mind. See Example:

:sout=#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=display,dst=std{access=file,mux=raw,url="C:\Documents and Settings\Owner (This is you)\My Documents\My Music\test.mp3"}}

:lol:

Merowingian

Postby Merowingian » 01 Mar 2006 12:59

not that I use VLC through the command prompt´, but I couldn't help myself...

adding c:\program files\videolan\vlc to the path and then from a cmd-window, with the default directory being
c:\documents and settings\user

1) just entering VLC just gives the prompt back. repeating this several times while the task manager is running at least shows that vlc.exe is started.
And why doesn't the GUI start then?

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

Postby dionoea » 01 Mar 2006 13:44

Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Merowingian

Postby Merowingian » 02 Mar 2006 17:57

Perhaps reading the documentation and entering the commands correctly will allow VLC to understand what is in your mind. See Example:

:sout=#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=display,dst=std{access=file,mux=raw,url="C:\Documents and Settings\Owner (This is you)\My Documents\My Music\test.mp3"}}
:lol:
OK,

look, this is what I entered into the cmd window:

CD /D C:\Program Files\VideoLAN\VLC

and then:

vlc http://www.radiopalmwine.com/Igbo_Channel/igbo24.asx :sout=#transcode{acodec=mp3,ab=128,channels=2}:dublicate{dst=display,dst=std{access=file,mux=raw,url="C:\test.mp3"}}

The result was a player with GUI that didn't play any sound, nor did it seem to be getting the stream correctly, since there was no streaming title shown on the player as usual.

If I just type:


CD /D C:\Program Files\VideoLAN\VLC

and then:

vlc http://www.radiopalmwine.com/Igbo_Channel/igbo24.asx

I get the GUI and the file is played correctly.

So something must be wrong with the options.
What is it? Remember this should run on Windows XP.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Mar 2006 19:50

I tried going to your website but couldn't connect. So the only thing I can suggest is to go to the VLC directory and type vlc -H then open the vlc-help.txt file with an editor. I provided the common form used within vlc for transcoding. The command line syntax is a little different.

All I was trying to do initially was point you in a direction and show you a general form and format structure that does work.

:lol:

kingpunk
New Cone
New Cone
Posts: 1
Joined: 07 Jun 2008 06:40

Re: Launching vlc using cmd

Postby kingpunk » 07 Jun 2008 06:47

Ok my friends, i came upon this by a google search and im not quite sure how old it is but here goes nothing:

I've read what's been said, good input. This is what I've done:
I've created a batch file, soon, it'll brush it up a bit to where it dynamically generates the dates, etc and i'll make a registery entry to where it'll run the batch file automagically, BUT meanwhile:

Code: Select all

[size=50]@ECHO OFF ECHO. ECHO Preparing to encode file: ECHO. PAUSE "C:\Program Files\VideoLAN\VLC\vlc.exe" mms://a772.v254953.c25495.g.vm.akamaistream.net/7/772/25495/v0001/dramsey.download.akamai.com/23572/audio/wm/06062008_the_dave_ramsey_show.wma :sout=#transcode {acodec=mp3,ab=128,channels=2}:duplicate{dst=display,dst=std {access=file,mux=raw,url="G:\TDRS\06062008.mp3"}} PAUSE CLS EXIT[/size]
That's my batch file.

It's exactly what I want (and i normally run linux, which i could do this much easier on there i believe..) BUT..
it plays the file while it's transcoding it. I was planning on doing this nightly so it's ready for my mp3 player in the AM.
If it's going to play the output audio, then this isn't an option. How do i get either:
a. a COMMAND-LINE only version to work and that's it, w/o a GUI that doesn't play the files.
or b. just get the player (as-is) to not play the file while transcoding it.

And, for an added benefit, if it could be made faster, any tips?
Thank you so much in advance!
- KingPunk


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests