Screen Capture via command line . please help !!

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.
karthikus
New Cone
New Cone
Posts: 7
Joined: 31 Aug 2011 15:15

Screen Capture via command line . please help !!

Postby karthikus » 31 Aug 2011 15:45

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.

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

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

Postby VLC_help » 31 Aug 2011 20:31

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

karthikus
New Cone
New Cone
Posts: 7
Joined: 31 Aug 2011 15:15

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

Postby karthikus » 01 Sep 2011 14:17

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

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

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

Postby VLC_help » 01 Sep 2011 16:44

You have to run rc interface if you want to close VLC via ncat.

karthikus
New Cone
New Cone
Posts: 7
Joined: 31 Aug 2011 15:15

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

Postby karthikus » 01 Sep 2011 18:09

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

karthikus
New Cone
New Cone
Posts: 7
Joined: 31 Aug 2011 15:15

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

Postby karthikus » 01 Sep 2011 18:48

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 !

karthikus
New Cone
New Cone
Posts: 7
Joined: 31 Aug 2011 15:15

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

Postby karthikus » 02 Sep 2011 05:56

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 !!

sooners128
New Cone
New Cone
Posts: 1
Joined: 07 Aug 2018 19:20

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

Postby sooners128 » 07 Aug 2018 19:34

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?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: MSN [Bot] and 55 guests