Screen area recorder for Ubuntu - only black screen...

Bo Berglund bo.berglund at gmail.com
Mon Feb 22 13:06:30 UTC 2021


I would like to use my old HP laptop as a recorder for streaming video so I can
record independently of the pc use.

The laptop is an HP 8560w originally running Windows7 and now Ubuntu 20.04 LTS.
I cannot use my Windows PC for the recording because it will then be unusable
for my normal work...

I have figured out how to use ffmpeg to do the recording on Windows, but I can't
figure out how to do it on Linux. My command to capture an area on Windows using
ffmpeg for 3600 seconds is:

ffmpeg -hide_banner -f gdigrab -framerate 25 -offset_x 212 -offset_y 118
-video_size 854x480 -i desktop  -f dshow -i audio="virtual-audio-capturer"
-vcodec libx264 -pix_fmt yuv420p -t 3600 output.mp4

I used the desktop as source via dshow and virtual-audio-capturer as audio
source.
This is not Linux compatible though...

So I tried to use a ready-made Linux recorder "vokoscreen" which can be
installed using apt.
It seems to have the functions I am after but when recording I am only getting
audio, the screen is totally black.
I have placed the area selector tool above a Firefox window playing the video
and adjusted it to the video area.

When I record the selector tool changes by removing all controls inside the
video area. So it looks like it is doing what it should.

But as I said the resulting mp4 video only contains a black screen, while audio
is OK.

I have read somewhere that it might be caused by some Ubuntu permissions that
does not allow another application access to the data put on screen by the video
player. In this case vokoscreen may not be allowed to read Firefox window
content?

If this is the case in Ubuntu, how can it be fixed?

This is why I am posting here on the Ubuntu list....
Googling brings up posts mentioning "Wayland" and /etc/gdm/custom.conf, but
since these do not exist on my Ubuntu those posts are no solution.

-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list