How to record video and sound from a game with command line
Posted: 19 Aug 2019 20:12
Hi!
I made a command for the batch file to record desktop screen. Everything works fine except that I cannot record sound in any way. I manage to do this with GUI, but I have to use the command line. Any help will be appreciated.
This is the script that I made, it uses a timestamp to name a file and it works in the background.
I made a command for the batch file to record desktop screen. Everything works fine except that I cannot record sound in any way. I manage to do this with GUI, but I have to use the command line. Any help will be appreciated.
This is the script that I made, it uses a timestamp to name a file and it works in the background.
Code: Select all
ECHO.
SET Timestamp=%date:~6,8%-%date:~3,2%-%date:~0,2%_%time:~0,2%:%time:~3,2%:%time:~6,2%
ECHO %Timestamp%
SET Timestamp=%date:~6,8%%date:~3,2%%date:~0,2%%time:~0,2%%time:~3,2%%time:~6,2%
call %CD%\VLC\vlc.exe ^
screen:// --one-instance ^
-I null --play-and-exit ^
--udp-caching=500 --tcp-caching=500 --realrtsp-caching=500 ^
--extraintf rc ^
--rc-host localhost:8088 ^
--rc-quiet ^
--no-skip-frames ^
--no-video :screen-fps=30 :screen-caching=100 :screen-left=0 :screen-width=1920 :screen-height=1080^
--sout-x264-preset ultrafast ^
"#transcode{vcodec=h264,acodec=mp4a,ab=96,channels=2,samplerate=44100}:duplicate{dst=std{access=file,mux=mp4,dst='../../../../../Recordings/%Timestamp%.mp4'}}"