Question: Hello when i want to record my desktop or recording video with ffmpeg it generates a black video ??
my operating system ubuntu 18:04 bionic kernel 4.16

here is the command I'm using :

```
ffmpeg -f x11grab -s 640x480 -i :1.0+10,20 -vf format=pix_fmts=yuv420p -f v4l2 /dev/video0

```

Answer: 
Try the following command and modify it accordingly:

`ffmpeg -f x11grab -i :0.0+10,20 -r 10 -vf format=pix_fmts=yuv420p output.mp4`

Since my system build does not have an output on `/dev/video0`, I replaced it with a filename as an output.

`-f` for input/output. Input source: x11grab, indicates a screen capture provided by the libxcb1 library. Output source: /dev/video0, assuming there is a connected monitor.

`-i` Screen 0 is selected (run `xrandr` to view the available connected screens). 10 pixels and 20 pixels for x-offset and y-offset (set in the question).

`-r` for framerate (Hz) for recording. (10 fps selected).

`-vf` filtergraph flag for filtering the stream.
I got the solution.
Well the screen recording is blank on Ubuntu default GONOME desktop and to fix this logout from current user
and on login screen click on **GNOME on XORG** option from the gear button at bottom left as shown in the screenshot
[![enter image description here](https://i.stack.imgur.com/XuKKf.png)](https://i.stack.imgur.com/XuKKf.png)