M BUZZ CRAZE NEWS
// general

screen recording with ffmpeg

By John Parsons

I need to record but only the active window AND without audio: I'm using this command but it records all screen (with application bar)

ffmpeg -f x11grab -video_size 1920x1080 -framerate 25 -i :0.0+100,200 -f alsa -ac 2 -i pulse -acodec aac -strict experimental output.mp4

Thanks!

2

1 Answer

You can use xwininfo to get the co-ordinates of the specific window you want to record.

  1. Run xwininfo.

  2. It will ask you to select the window you want to record.

  3. Information about the selected window will appear. The important info is -geometry and is probably the last line. Example: -geometry 1600x900+129+57

  4. Run ffmpeg using the numbers from -geometry:

    ffmpeg -f x11grab -video_size 1600x900 -framerate 50 -i :0.0+129,57 -vf format=yuv420p output.mp4

Note that x11grab is not "smart". It will only record the area you specify, and it will not follow a window that moves. And if you switch to another desktop that will get recorded too.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy