5

I'm trying to record video from a firefox run by xvfb-run but it always output nothing in the video file except black screen.

Here's what I did:

start a firefox, open google.com:

$ xvfb-run firefox https://google.com

Then it will use the default display server number 99. I can see the display information by command xdpyinfo -display :99.

A screenshot works very well by command:

$ xwd -root -silent -display :99.0 | xwdtopnm |pnmtojpeg > screen.jpg

Start using ffmpeg to record a video:

$ ffmpeg -f x11grab -i :99.0 out.mpg

When I play the video file out.mpg, there's black screen all the time.

Is there any parameter I missed?

shawnzhu
  • 7,233
  • 4
  • 35
  • 51
  • @LordNeckbeard Thanks. Moved to superuser.com: [Got black screen when recording screen from xvfb by ffmpeg x11grab device](http://superuser.com/questions/727352/got-black-screen-when-recording-screen-from-xvfb-by-ffmpeg-x11grab-device) – shawnzhu Mar 11 '14 at 02:21

1 Answers1

0

I don't know if you have fixed this bug but if you haven't let me help out because I ran into same issue. Here's a solution (I'm running on Fedora 30):

Your need to Configuring Xorg as the default GNOME session. On your terminal open your custom.conf by typing the this command sudo nano /etc/gdm/custom.conf and uncomment WaylandEnable=false if it's commented but must be set to false

Then, on the [daemon] section just under WaylandEnable=false add this line DefaultSession=gnome-xorg.desktop and save the file. Then try running your Screen Recorder program again. Congratulations.

However, if nano command is not working please try installing it by running the command sudo dnf install nano or sudo apt-get install nano which ever works for you.

umekalu
  • 169
  • 1
  • 5
  • this question has been moved to https://superuser.com/questions/727352/got-black-screen-when-recording-screen-from-xvfb-by-ffmpeg-x11grab-device – shawnzhu Aug 06 '19 at 13:28