ヘッドレスVPSでFFMPEGを使用した画面キャプチャ

ヘッドレスVPSでFFMPEGを使用した画面キャプチャ

Ubuntu VPSでグラフィカルアプリケーションを実行し、FFMPEGソフトウェアを使用して画面をキャプチャするソリューションが必要です。

私が試したステップ:

###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

動作しているようですが、出力ファイルは空です。 VPSでグラフィカルアプリケーションを実行し、画面をファイルにキャプチャする方法を確実に伝えることができる人が必要です。後でffmpegはビデオをストリーミングしますが、今は一度に1つの問題だけを解決したいと思います。

ベストアンサー1

インストールしてから動作し始めました。

  sudo apt-get install x11-apps

おすすめ記事