Score:2

getting black screen while trying to record dockerized lxde using ffmpeg

vn flag

I have created a docker image that has LXDE and TightVNCServer.

# Pull base image.
FROM ubuntu

# Install LXDE and VNC server.
RUN apt-get update
RUN apt-get install -y xvfb
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y lxde-core lxterminal tightvncserver
RUN rm -rf /var/lib/apt/lists/*
RUN touch /root/.Xresources
RUN touch /root/.Xauthority
COPY xstartup /root/.vnc/xstartup
RUN chmod +x /root/.vnc/xstartup
#Install Node.js & npm

# Define working directory.
WORKDIR /data

COPY * /data

RUN apt-get install -y ffmpeg

I am running this container using this command:

docker run -it --rm -v /data:/data -p 5901:5901 -e USER=root ubuntudsktp bash -c "vncserver :1 -geometry 1280x800 -depth 24 && tail -F /root/.vnc/*.log"

I am logging into this container using VNC and running this command to record the whole screen:

ffmpeg -f x11grab -i :1.0 output.webm

After the recording was over, I opened the video and I could see that the video is completely blank(black screen).

this is also my input when i try to run glxinfo:

# glxinfo | grep "OpenGL renderer"
Error: unable to open display

I have also tried to run it using:

DISPLAY=:1 ffmpeg -f x11grab -i :1.0 output.webm And the results are the same.

What I am missing here?

Betzalel Maor avatar
nc flag
If you are on Wayland, maybe try to use Xorg?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.