When I record my desktop or recording video with ffmpeg it generates a black video. My operating system is 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
  • Does recording into a file work?
    – Hermann
    Commented Mar 16, 2019 at 20:07
  • @Hermann not working just a black video
    – cleanguy
    Commented Mar 16, 2019 at 20:26
  • 1
    Are you sure you want to grab from :1? What does ffmpeg -video_size 640x480 -framerate 30 -f x11grab -i :0.0+0,0 -c:v libx264 -crf 16 -t 10 /tmp/test.mp4 do for you? Any interesting output on the console?
    – Hermann
    Commented Mar 16, 2019 at 22:15

1 Answer 1


This post solved the issue.

Well the screen recording is blank on Ubuntu default GNOME 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 Linux login page

GNOME on Xorg refers to the GNOME desktop environment running on top of the X.Org Server. X.Org Server, often simply referred to as Xorg, is an open-source implementation of the X Window System, which provides the framework for GUI environments on Unix-like operating systems.

When people say "GNOME on Xorg," they typically mean that they are using the GNOME desktop environment within the X.Org display server environment. This combination allows users to interact with their system using the GNOME desktop environment's features and applications while leveraging the display capabilities provided by the X.Org Server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .