Xvfb + ffmpeg/aconv 不工作

Xvfb + ffmpeg/aconv not working

我正在尝试使用 xvfb + aconv 捕获屏幕。 我正在使用 docker 到 运行 图像。我已经尝试了几乎所有方法以使其正常工作,不同的 ubuntu Debian Centos 图像,来自 docker hub 的不同图像。 我的最后一个构建很简单 ubuntu:trusty(14.04) image + xvfb + avconv

FROM ubuntu:trusty
RUN echo "deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu trusty main" > /etc/apt/sources.list.d//mozillateam-firefox-next-trusty.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE49EC21
RUN apt-get update
RUN apt-get install -y firefox xvfb python-pip
RUN pip install selenium
RUN mkdir -p /root/selenium_wd_tests
#ADD sel_wd_new_user.py /root/selenium_wd_tests
ADD xvfb.init /etc/init.d/xvfb
RUN chmod +x /etc/init.d/xvfb
RUN update-rc.d xvfb defaults

我通过apt-get安装了avcnov 然后我 运行 Xvfb

Xvfb -ac :99 -screen 0 1280x1024x24

和火狐 那我就运行

avconv -f x11grab -r 25 -s 1280x1024 -i :99 -vcodec libx264 -threads 4 $HOME/output.avi

没有任何反应,avconv 卡住了,它没有开始捕获

avconv version 9.20-6:9.20-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Dec  7 2016 21:22:31 with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
[x11grab @ 0x2189c60] device: :99 -> display: :99 x: 0 y: 0 width: 1280 height: 1024

任何人都可以提出任何建议,我花了 4 天的时间试图让它发挥作用。 谢谢。

所以在开始之前我应该​​知道的唯一一件事是 ctrl+z 不会将任务带到后台。那是我的问题。