Page 1 of 1

Screen Capture via command line . please help !!

Posted: 31 Aug 2011 15:45
by karthikus
Hi guyz. I have requirement to control the screen capture and stop via command line in windows xp.To start the screen capture i have the basic statement with arguments ..

Code: Select all

vlc screen:// -I dummy :sout=#transcode{vcodec=WMV2,vb=1800,scale=1}:std{access=file,mux=asf,dst=output.wmv}
it opens a command prompt and starts the video capture.But i need to end the capture session via command line .I tried

Code: Select all

vlc ://quit
and

Code: Select all

vlc FILENAME ://quit
and

Moreover,

Code: Select all

TASKKILL /F /IM vlc.exe
ends vlc but the video is corrupted and did not work. So any suggestions .. My ultimate requirement is

-- start the capture via command line
-- VLC should be invisible
-- End the session via command line.

Thanks.

Re: Screen Capture via command line . please help !!

Posted: 31 Aug 2011 20:31
by VLC_help
It is

Code: Select all

vlc.exe vlc://quit
and it only works in one instance mode.

More suitable thing might be telnet/rc interface and close it with netcat/ncat.
viewtopic.php?f=14&t=91644#p303551

Re: Screen Capture via command line . please help !!

Posted: 01 Sep 2011 14:17
by karthikus
Its not working . Started the capture using

Code: Select all

call "C:\Program Files\VideoLAN\VLC\vlc.exe" ^ screen:// --one-instance ^ -I dummy --dummy-quiet ^ --screen-follow-mouse ^ --no-video :screen-fps=5 :screen-caching=300 ^ --sout "#transcode{vcodec=h264,vb=400,fps=5,scale=1,width=1024,height=768,acodec=none}:duplicate{dst=std{access=file,mux=avi,dst='C:\\test_capture.avi}}"
and VLC started without GUI and capture started. Then i downloaded ncat binary for windows. BUt STOP SCRIPT IS NOT WORKING !!

Code: Select all

echo quit | "C:\Users\Jk\Desktop\Downloads\nc111nt\nc.exe" localhost 8088
The above script did not work. Any example stop script using ncat which works would be helpful !

Thanks and Regards,
Karthik

Re: Screen Capture via command line . please help !!

Posted: 01 Sep 2011 16:44
by VLC_help
You have to run rc interface if you want to close VLC via ncat.

Re: Screen Capture via command line . please help !!

Posted: 01 Sep 2011 18:09
by karthikus
You have to run rc interface if you want to close VLC via ncat.
How to start screen capture via RC interface. Can u provide a sample. I am a beginner, pls help

Re: Screen Capture via command line . please help !!

Posted: 01 Sep 2011 18:48
by karthikus
I tried the following code to start screen capture.

Code: Select all

vlc screen:// -I rc --screen-follow-mouse --screen-fps 5 :sout=#transcode{vcodec=WMV2,vb=1800,scale=1}:std{access=file,mux=asf,dst=output.wmv}
And the stop script as said in the previous post. Still VLC screen capture is NOT STOPPED> Any Help appreciated !

Re: Screen Capture via command line . please help !!

Posted: 02 Sep 2011 05:56
by karthikus
Finally i got it working .

The start script for trigger recording is

Code: Select all

call "C:/Program Files/VideoLAN/VLC/vlc.exe" ^ screen:// --one-instance ^ -I dummy --dummy-quiet ^ --extraintf rc ^ --rc-host localhost:8088 ^ --rc-quiet ^ --screen-follow-mouse ^ --no-video :screen-fps=15 :screen-caching=300 ^ --sout "#transcode{vcodec=h264,vb=400,fps=5,scale=1,width=1024,height=768,acodec=none}:duplicate{dst=std{access=file,mux=mp4,dst='C:/capture223.mp4'}}"
and the stop script which runs via ncat is ..

Code: Select all

echo quit | "C:\Users\Jk\Desktop\Downloads\nc111nt\nc.exe" localhost 8088
Thanks for the help guyz !!

Re: Screen Capture via command line . please help !!

Posted: 07 Aug 2018 19:34
by sooners128
Hello,
I am having a similar issue as Karthikus. All I need to do for this is to use the command prompts to automatically start recording the screen. This is the script I have right now: vlc screen:// :screen-fps=10 :sout=#transcode{vcodec=h264,venc=x264{scenecut=100,bframes=0,keyint=10},vb=1024,acodec=none,scale=1.0}: duplicate{dst="C:\User\Videos\VLC Captures\test.mp4" }
This opens vlc and starts streaming but does not start recording. What can I do?