How to start recording via cmd in a background (using VLC)

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.
mes mariusz
New Cone
New Cone
Posts: 2
Joined: 30 May 2016 21:40

How to start recording via cmd in a background (using VLC)

Postby mes mariusz » 30 May 2016 21:53

Dears

Could someone please let me know if this is possible to run VLC in a background (no GUI displayed on screen) via command line (cmd / bat) with additional parameters (options?) indicating destination (storage location), file extension and codec ?

And which codec is the best for screen recording / smallest output (mouse move, applications on screen)?

Thank you very much for your support.

Best regards
Mariusz

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

Re: How to start recording via cmd in a background (using VLC)

Postby kmf31 » 30 May 2016 23:25

The keyword for search in google or similar is "screen capture" which gives for example this page:
http://stackoverflow.com/questions/2208 ... g-terminal
(example for MacOS).
Under Linux you can directly use this command (very similar to the example in the link):

Code: Select all

vlc -I dummy screen:// --screen-fps=25 --quiet --sout='#transcode{vcodec=h264,vb072}:standard{access=file,mux=mp4,dst=capture.mp4}'
assuming to save in the file "capture.mp4" in the local folder (where you are while starting vlc from the command line).
Here the option: "-I dummy" indicates "no GUI" and the other options are for the screen capture where "screen://" is the main device, "--screen-fps=25" gives the framerate (can be modified, reduced to economize place). The container/encapsulation is mp4 and the codec is h264 (same as normal HD TV codec from DVB etc.) which seems the most efficient (in a test I got a bitrate of ~650 Kb/s for 1920x1080 resolution which is not much at all for a HD video but the screen movement was also very modest). When you have fast movements this may be much higher and probably also eat a lot of CPU power.

In Linux to put this in "background" you simply add an "&" behind the command line. I am not sure how to do this exactly in Windows but the main command line should be similar, maybe you need full pathes for vlc and the destination file (maybe with "..." around to protect for strange symbols etc.). Apart from such details it should also work in Windows.

The remaining problem is how to "stop" it when you are finished (actually the question asked in the above link of stackoverflow.com). In vlc you can also add some option "--run-time=XXX" for a run time of XXX seconds (with XXX being some number).

mes mariusz
New Cone
New Cone
Posts: 2
Joined: 30 May 2016 21:40

Re: How to start recording via cmd in a background (using VLC)

Postby mes mariusz » 31 May 2016 20:09

Hello kmf31.

Thank you for your hints,

I used this syntax:

Code: Select all

"c:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy screen:// --screen-fps=25 --quiet --sout='#transcode{vcodec=h264,vb072}:standard{access=file,mux=mp4,dst=capture.mp4}'
Something is happen (probably works):

Image

But then I can't find output file:

Image

Whene could I find this file ?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: dermoritz and 27 guests