I need a solution to run a graphical application on a Ubuntu VPS and capture the screen using FFMPEG software.
the steps I tried already:
###Create a virtual desktop Xvfb :1 -screen 0 1920x1080x24 ## Connect this shell to a virtual desktop export DISPLAY=:1 #Start browser. It streams to a virtual desktop connected. This could be any program. google-chrome-stable --disable-gpu https://example.com/ #Capture screen output to a file export DISPLAY=:1 ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :1.0+0,0 output.mp4 This looks like working but the output file comes empty. I need somebody who can reliably tell me how to run graphical apps on a VPS and capture the screen to a file. Later ffmpeg will stream the video but for now, I just want to solve one problem at a time.
:0.0is correct given yourDISPLAY=:1