我正在尝试使用xvfb + aconv来捕获屏幕。我正在使用docker来运行image。我已经尝试了几乎所有的方法来运行它,不同的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和firefox,然后我就运行
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天的时间试着让它工作。谢谢。
发布于 2017-12-29 15:54:51
所以在开始之前我唯一应该知道的就是ctrl+z不会把任务带到后台。那是我的问题。
https://stackoverflow.com/questions/47982824
复制相似问题