1

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
1

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.

1
  • 1
    not working i get black video – SUPERMAN Mar 17 '19 at 9:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.