windowsbatch-fileprocessffmpeg

Create a bat file to exit FFMPEG (Windows)


Hello everyone I am using this bat file in order to capture my screen.

ffmpeg -f dshow -i video=screen-capture-recorder -r 240001001 -q 1 lma_recording.avi

When I press the q button the video capture stops.

However I would like to stop the screen capturing with another bat file.

I have tried this:

taskkill /im ffmpeg.exe

without luck

Any suggestions?


Solution

  • what is screen capture recorder? is it an alternate executable's output? (im not familiar with ffmpeg) also, try this:

    taskkill /im ffmpeg.exe /t /f
    

    /f forces kill, and /t kills child processes too.