Recording audio to a file from the cmd line in the backgroun

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
dvogel
New Cone
New Cone
Posts: 4
Joined: 05 Jun 2007 23:53

Recording audio to a file from the cmd line in the backgroun

Postby dvogel » 28 Aug 2007 22:06

I am using VLC to record audio from the microphone input to a Speex file. This works fine with this command line:

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="none" :dshow-adev="" :dshow-size="" :sout=#transcode{acodec=spx,ab=32,channels=1,samplerate=8000}:duplicate{dst=std{access=file,mux=ogg,dst="C:\testrec.ogg"}}
I need this to run completely in the background -- no windows, no stderr messages, no output at all. Using the dummy module still shows a cmd.exe window so that you can stop the recording. Is there any way to make VLC stop creating this cmd.exe window and stopping the recording through another means? I've tried vlc:quit on the cmd line of another instance of vlc.exe but that didn't work. If I could just be rid of the cmd.exe window, I could use the Windows taskkill command to kill VLC.

Obviously I'm running this on Windows, but if you know how to make this happen on other platforms, I can translate between them well enough.

kmf31
Cone that earned his stripes
Cone that earned his stripes
Posts: 308
Joined: 11 Mar 2007 21:47

Re: Recording audio to a file from the cmd line in the backgroun

Postby kmf31 » 28 Aug 2007 23:14

In Linux you simply add "-I dummy" to avoid the graphical interface, you add a redirection of the messages to files, i.e.:

Code: Select all

vlc -I dummy (blabla-your-options) 1>messages.txt 2>errors.txt &
and the "&" at the end to start vlc in the background such that the terminal is not blocked.

Afterwards you may savely close or terminate the xterm or console from which you started this command.

However, you will need to use the "kill" command to stop the vlc background job because there is no interface left for doing it. The only problem is that in Linux the dshow does not work.

I am not sure for the redirection and background in Windows. However, I believe if you install cygwin with a bash-shell you may do exactly as in Linux but in the windows environment.

djhash
New Cone
New Cone
Posts: 1
Joined: 03 Feb 2008 00:00

Re: Recording audio to a file from the cmd line in the backgroun

Postby djhash » 03 Feb 2008 00:18

Hey,

Run VLC. Then go to settings:->preferences-> advanced

Then click on the check box -> advanced options

Check the "Allow only one running instance".

Save and close.

Then in command line type "vlc.exe vlc:quit"

Just tried it on WinXP Pro, VLC 0.8.6c


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests