I did this steps for transcoding my rtmp live streaming to hls on ubuntu 12.04:
apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libvorbis-dev pkg-config texi2html yasm zlib1g-dev apache2
cd /usr/src/
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -xzf yasm-1.2.0.tar.gz
cd /usr/src/yasm-1.2.0
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --fstrans=no --default
cd /usr/src/
git clone --depth 1 git://git.videolan.org/x264
cd /usr/src/x264
./configure --enable-shared
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default
cd /usr/src/
wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.0.tar.gz
tar -xzf fdk-aac-0.1.0.tar.gz
cd /usr/src/fdk-aac-0.1.0
./configure
make
sudo checkinstall --pkgname=fdk-aac --pkgversion="0.1.0" --backup=no --deldoc=yes --fstrans=no --default
cd /usr/src/
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd /usr/src/libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig
cd /usr/src/
wget http://libav.org/releases/libav-snapshot.tar.bz2
tar -xjf libav-snapshot.tar.bz2
cd /usr/src/liba*
./configure --disable-debug --enable-librtmp --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-shared
make -j4
sudo checkinstall --pkgname=libav --pkgversion="9-887-g25a80a9" --backup=no --deldoc=yes --fstrans=no --default
ldconfig
How to do Apple HLS using Avconv
mkdir /var/www/hls
ln -s /run/shm /var/www/hls
RUN This command
avconv -re -i 'rtmp://RED_5_IP/live/stream_name' -bsf h264_mp4toannexb -vcodec libx264 -acodec libfaac -b:v 448k -b:a 40k -ar 22050 -s 640x360 -hls_time 10 -hls_list_size 4 /var/www/hls/output_a_.m3u8
but when i ran last part, my streaming didn't start and I've get this error:
avconv: relocation error: /usr/local/lib/libavfilter.so.3: symbol sws_isSupportedEndiannessConversion, version LIBSWSCALE_2 not defined in file libswscale.so.2 with link time reference
what i should to do?
Thanks.
The problem is that avconv is unable to load the correct libav libraries. Probably the issue is that /usr/local/lib is not in your linker path. You can add it to the /etc/ld.so.conf file and then run ldconfig.
Another solution is to compile libav statically.
That can be done by changing this
./configure --disable-debug --enable-librtmp --enable-libmp3lame
--enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-shared
to this
./configure --disable-debug --enable-librtmp --enable-libmp3lame
--enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-static
Related
I can't find the right path of PHP5.5 for the /sources.list, any advice?
xxxxxx#xxxx:/usr/local/src/php5-build/php-5.5.7# apt-get build-dep 5.5*
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
xxxxxx#xxxx:/usr/local/src/php5-build/php-5.5.7#
It's looks like the build not applied in the set of Debian9 and php5.5, 5.4. The installation was completed by ./configure
apt-get update
apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev
mkdir /opt/php-5.4.45
mkdir /usr/local/src/php5
wget http://de2.php.net/get/php 5.4.45.tar.gz/from/this/mirror -O php-5.4.45.tar.gz
tar -xzvf php-5.4.45.tar.gz
cd php-5.4.45
./configure --prefix=/opt/php-5.4.45 --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-mbstring --enable-sockets --enable-exif --enable-bcmath --enable-calendar --enable-zip --enable-ftp --enable-gd-native-ttf --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir --with-zlib --with-zlib-dir --with-bz2 --with-mcrypt --with-mhash --with-pcre-regex --with-libxml-dir=/usr --with-xmlrpc --with-xsl --with-mysql
make
make install
I'm trying for facerecogition from (https://github.com/jamct/facerec) on my raspberry pi 3. Therefore the by runs with the newest version of Raspbian Stretch.
I am running:
docker build -t facerec:latest .
But I get the following error:
ERROR: Failed building wheel for scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
Here is a little bit more of the log:
creating build/temp.linux-armv7l-3.6/scipy/fft
creating build/temp.linux-armv7l-3.6/scipy/fft/_pocketfft
compile options: '-DPOCKETFFT_PTHREADS -I/root/.local/include/python3.6m -I/usr/local/include/python3.6m -I/tmp/pip-build-env-u7r4c8tr/overlay/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c'
extra options: '-std=c++14 -fvisibility=hidden'
g++: scipy/fft/_pocketfft/pypocketfft.cxx
Running from scipy source directory.
/tmp/pip-build-env-u7r4c8tr/overlay/lib/python3.6/site-packages/numpy/distutils/system_info.py:572: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
/tmp/pip-build-env-u7r4c8tr/overlay/lib/python3.6/site-packages/numpy/distutils/system_info.py:664: UserWarning: Specified path /usr/include/python3.6m is invalid.
return self.get_paths(self.section, key)
scipy/fft/_pocketfft/pypocketfft.cxx:15:31: fatal error: pybind11/pybind11.h: No such file or directory
#include <pybind11/pybind11.h>
^
compilation terminated.
scipy/fft/_pocketfft/pypocketfft.cxx:15:31: fatal error: pybind11/pybind11.h: No such file or directory
#include <pybind11/pybind11.h>
^
compilation terminated.
error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPOCKETFFT_PTHREADS -I/root/.local/include/python3.6m -I/usr/local/include/python3.6m -I/tmp/pip-build-env-u7r4c8tr/overlay/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-armv7l-3.6/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-armv7l-3.6/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
The command '/bin/sh -c cd /face_recognition && pip3 install -r requirements.txt && python3 setup.py install' returned a non-zero code: 1
This is the dockerfile:
#Dockerfile for face-recognition
#Based on https://github.com/denverdino/face_recognition_pi
FROM resin/raspberry-pi-python:3
COPY pip.conf /root/.pip/pip.conf
RUN apt-get -y update
RUN apt-get install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libboost-all-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
RUN python3 -m ensurepip --upgrade && pip3 install --upgrade picamera[array] dlib
RUN pip install --upgrade pip
RUN pip install --upgrade pip setuptools wheel
RUN git clone --single-branch https://github.com/ageitgey/face_recognition.git
RUN cd /face_recognition && \
pip3 install -r requirements.txt && \
python3 setup.py install
CMD cd /face_recognition/examples && \
python3 recognize_faces_in_pictures.py
Would be happy if somebody has an idea what to do now.
Thanks!
You have to install Pybind11 before building SciPy:
python3 -m pip install pybind11
I am having so much trouble with docker. It seems to be a pattern. I have a dockerfile which installs Node.js and Yarn from source repositories fine. I install ruby from the get-apt repositories (which gives me 2.3.0), then RVM and update Ruby to 2.3.3 (what my application has been using)... but then, when I go to run bundle install I get a version conflict with Rails:
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails
(= 4.2.6)', in any of the sources.
ERROR: Service 'theaterengine' failed to build: The command '/bin/sh -c /bin/bash -l -c "bundle install"' returned a non-zero code: 6
I have tried explicitly installing lower versions of bundler but it always seems to try and use that version. I have tried deleting Gemfile.lock as well. Please help
Dockerfile:
FROM ubuntu:16.04
ENV LANG C.UTF-8
ENV BUNDLE_PATH=\bundle
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev gnupg2 curl
# INSTALL NODE.JS
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
# gpg keys listed at https://github.com/nodejs/node#release-team
RUN set -ex \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
; do \
gpg --batch --keyserver hkp://pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done
ENV NODE_MAJOR 10
RUN NODE_VERSION=$(curl -SL "https://nodejs.org/dist/index.tab" \
| grep "^v$NODE_MAJOR" \
| head -n 1 | awk '{ print substr($1,2) }') \
&& ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# INSTALL YARN
RUN YARN_VERSION=$(curl -sSL --compressed https://yarnpkg.com/latest-version) \
set -ex \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
# INSTALL OTHER DEPENDENCIES
RUN apt-get update -qq && apt-get install -y git \
libxml2-dev \
libxslt1-dev \
libqt4-dev \
libqtwebkit4 \
xvfb \
file \
libcurl4-gnutls-dev
# INSTALL RVM AND RUBY
RUN \
apt-get update && \
apt-get install -y ruby ruby-dev bundler && \
rm -rf /var/lib/lists/*
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSl https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
RUN ["/bin/bash", "-l", "-c", "rvm requirements"]
RUN ["/bin/bash", "-l", "-c", "rvm install 2.3.3 --default"]
RUN /bin/bash -l -c "gem env && bundle config && gem install bundler --version 1.17.3"
# RAILS ENV VARIABLES AND BUNDLING
ENV APP_HOME /theaterengine
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=2
RUN /bin/bash -l -c "bundle install"
# RUN ["/usr/local/rvm/gems/ruby-2.3.3/gems/bundler-1.17.3/exe/bundle", "install"]
ADD . $APP_HOME
docker-compose.yml:
version: '2'
services:
theaterengine:
extends:
file: docker-common.yml
service: web
links:
- postgres
- redis
- elasticsearch
env_file:
- .theaterengine.env
postgres:
volumes:
- ./scripts:/docker-entrypoint-initdb.d
extends:
file: docker-common.yml
service: postgres
redis:
extends:
file: docker-common.yml
service: redis
elasticsearch:
extends:
file: docker-common.yml
service: elasticsearch
sidekiq:
extends:
file: docker-common.yml
service: sidekiq
links:
- postgres
- redis
volumes:
bundle: {}
postgres: {}
redis: {}
docker-common.yml:
version: '2'
services:
web:
build: .
command: bin/rails server --port 8000 --binding 0.0.0.0
volumes:
- .:/theaterengine
- bundle:/bundle
ports:
- '80:8000'
env_file:
- .theaterengine.env
postgres:
image: postgres:9.6.2
environment:
POSTGRES_USER: theaterengine
POSTGRES_PASSWORD: theaterengine
ports:
- '5432:5432'
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: redis:latest
ports:
- '6379:6379'
volumes:
- redis:/var/lib/redis/data
elasticsearch:
image: elasticsearch:5.6
command: elasticsearch
environment:
ES_JAVA_OPTS: "-Des.network.host=0.0.0.0 -Xmx1024m -Xms256m -Des.scripting.exception_for_missing_value=true"
sidekiq:
build: .
command: bundle exec sidekiq -C config/sidekiq.yml
volumes:
- .:/theaterengine
- bundle:/bundle
env_file:
- .theaterengine.env
output of docker-compose build --no-cache theaterengine
Building theaterengine
Step 1/24 : FROM ubuntu:16.04
---> 7e87e2b3bf7a
Step 2/24 : ENV LANG C.UTF-8
---> Running in ae5029491687
Removing intermediate container ae5029491687
---> 5912b6c9d20d
Step 3/24 : ENV BUNDLE_PATH=\bundle
---> Running in 2cb056b4fc6b
Removing intermediate container 2cb056b4fc6b
---> 31f18e8fa92e
Step 4/24 : RUN apt-get update -qq && apt-get install -y build-essential libpq-dev gnupg2 curl
---> Running in e9f4cec8e789
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
binutils bzip2 ca-certificates comerr-dev cpp cpp-5 dirmngr dpkg-dev
fakeroot g++ g++-5 gcc gcc-5 gnupg-agent ifupdown iproute2 isc-dhcp-client
isc-dhcp-common krb5-locales krb5-multidev libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libasn1-8-heimdal
libassuan0 libatm1 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5
libcurl3-gnutls libdns-export162 libdpkg-perl libfakeroot libffi6
libfile-fcntllock-perl libgcc-5-dev libgdbm3 libgmp10 libgnutls30 libgomp1
libgssapi-krb5-2 libgssapi3-heimdal libgssrpc4 libhcrypto4-heimdal
libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal
libidn11 libisc-export160 libisl15 libitm1 libk5crypto3 libkadm5clnt-mit9
libkadm5srv-mit9 libkdb5-8 libkeyutils1 libkrb5-26-heimdal libkrb5-3
libkrb5support0 libksba8 libldap-2.4-2 liblsan0 libmnl0 libmpc3 libmpfr4
libmpx0 libnettle6 libnpth0 libp11-kit0 libperl5.22 libpq5 libquadmath0
libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db
libsqlite3-0 libssl-dev libssl-doc libssl1.0.0 libstdc++-5-dev libtasn1-6
libtsan0 libubsan0 libwind0-heimdal libxtables11 linux-libc-dev make
manpages manpages-dev netbase openssl patch perl perl-modules-5.22
pinentry-curses rename xz-utils zlib1g-dev
Suggested packages:
binutils-doc bzip2-doc doc-base cpp-doc gcc-5-locales debian-keyring
g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf
automake libtool flex bison gdb gcc-doc gcc-5-multilib libgcc1-dbg
libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg
libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg
gnupg-doc parcimonie xloadimage ppp rdnssd iproute2-doc resolvconf
avahi-autoipd isc-dhcp-client-ddns apparmor krb5-doc glibc-doc gnutls-bin
krb5-user postgresql-doc-9.5 libsasl2-modules-otp libsasl2-modules-ldap
libsasl2-modules-sql libsasl2-modules-gssapi-mit
| libsasl2-modules-gssapi-heimdal libstdc++-5-doc make-doc man-browser ed
diffutils-doc perl-doc libterm-readline-gnu-perl
| libterm-readline-perl-perl pinentry-doc
The following NEW packages will be installed:
binutils build-essential bzip2 ca-certificates comerr-dev cpp cpp-5 curl
dirmngr dpkg-dev fakeroot g++ g++-5 gcc gcc-5 gnupg-agent gnupg2 ifupdown
iproute2 isc-dhcp-client isc-dhcp-common krb5-locales krb5-multidev
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libasan2 libasn1-8-heimdal libassuan0 libatm1 libatomic1 libc-dev-bin
libc6-dev libcc1-0 libcilkrts5 libcurl3-gnutls libdns-export162 libdpkg-perl
libfakeroot libffi6 libfile-fcntllock-perl libgcc-5-dev libgdbm3 libgmp10
libgnutls30 libgomp1 libgssapi-krb5-2 libgssapi3-heimdal libgssrpc4
libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4
libhx509-5-heimdal libidn11 libisc-export160 libisl15 libitm1 libk5crypto3
libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libkeyutils1 libkrb5-26-heimdal
libkrb5-3 libkrb5support0 libksba8 libldap-2.4-2 liblsan0 libmnl0 libmpc3
libmpfr4 libmpx0 libnettle6 libnpth0 libp11-kit0 libperl5.22 libpq-dev
libpq5 libquadmath0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules
libsasl2-modules-db libsqlite3-0 libssl-dev libssl-doc libssl1.0.0
libstdc++-5-dev libtasn1-6 libtsan0 libubsan0 libwind0-heimdal libxtables11
linux-libc-dev make manpages manpages-dev netbase openssl patch perl
perl-modules-5.22 pinentry-curses rename xz-utils zlib1g-dev
0 upgraded, 108 newly installed, 0 to remove and 0 not upgraded.
Need to get 57.6 MB of archives.
...
...
148 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Removing intermediate container e9f4cec8e789
---> 66fa6d267a05
Step 5/24 : RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node
---> Running in b7e86d75e030
Removing intermediate container b7e86d75e030
---> eeaf38d31a2a
Step 6/24 : RUN set -ex && for key in 4ED778F539E3634C779C87C6D7062848A1AB005C B9E2F5981AA6E0CD28160D9FF13993A75599653C 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 B9AE9905FFD7803F25714661B63B535A4C206CA9 77984A986EBC2AA786BC0F66B01FBB92821C587A 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 FD3A5288F042B6850C66B31F09FE44734EB7990E 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 DD8F2338BAE7501E3DD5AC78C273792F7D83545D A48C2BEE680E841632CD4E44F07496B3EB3C1762 ; do gpg --batch --keyserver hkp://pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; done
---> Running in 55265cf5a4fa
...
...
Removing intermediate container 55265cf5a4fa
---> 7d3de60af5fc
Step 7/24 : ENV NODE_MAJOR 10
---> Running in 57f05fb87dd7
Removing intermediate container 57f05fb87dd7
---> 9df11bd47c50
Step 8/24 : RUN NODE_VERSION=$(curl -SL "https://nodejs.org/dist/index.tab" | grep "^v$NODE_MAJOR" | head -n 1 | awk '{ print substr($1,2) }') && ARCH= && dpkgArch="$(dpkg --print-architecture)" && case "${dpkgArch##*-}" in amd64) ARCH='x64';; ppc64el) ARCH='ppc64le';; s390x) ARCH='s390x';; arm64) ARCH='arm64';; armhf) ARCH='armv7l';; i386) ARCH='x86';; *) echo "unsupported architecture"; exit 1 ;; esac && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" && curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt && ln -s /usr/local/bin/node /usr/local/bin/nodejs
---> Running in 0b8e7b8bb68f
...
...
Removing intermediate container 0b8e7b8bb68f
---> 56204b1054e0
Step 9/24 : RUN YARN_VERSION=$(curl -sSL --compressed https://yarnpkg.com/latest-version) set -ex && for key in 6A010C5166006599AA17F08146C2130DFD2497F5 ; do gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; done && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz && mkdir -p /opt && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
---> Running in 6a45f5c124a7
+ gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 6A010C5166006599AA17F08146C2130DFD2497F5
gpg: requesting key FD2497F5 from hkp server p80.pool.sks-keyservers.net
gpg: key 86E50310: public key "Yarn Packaging <yarn#dan.cx>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
...
...
+ mkdir -p /opt
+ tar -xzf yarn-v1.13.0.tar.gz -C /opt/
+ ln -s /opt/yarn-v1.13.0/bin/yarn /usr/local/bin/yarn
+ ln -s /opt/yarn-v1.13.0/bin/yarnpkg /usr/local/bin/yarnpkg
+ rm yarn-v1.13.0.tar.gz.asc yarn-v1.13.0.tar.gz
Removing intermediate container 6a45f5c124a7
---> 83ed68b00e7d
Step 10/24 : RUN apt-get update -qq && apt-get install -y git libxml2-dev libxslt1-dev libqt4-dev libqtwebkit4 xvfb file libcurl4-gnutls-dev
---> Running in 10d6197af7ca
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
dbus fontconfig fontconfig-config fonts-dejavu-core git-man
gstreamer1.0-plugins-base icu-devtools iso-codes less libaudio2
libavahi-client3 libavahi-common-data libavahi-common3 libbsd0 libcap-ng0
libcdparanoia0 libcups2 libdbus-1-3 libdrm-amdgpu1 libdrm-common libdrm-dev
libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1
liberror-perl libexpat1 libfontconfig1 libfontenc1 libfreetype6
libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0
libglib2.0-data libglu1-mesa libglu1-mesa-dev libgstreamer-plugins-base1.0-0
libgstreamer1.0-0 libice6 libicu-dev libicu55 libjbig0 libjpeg-turbo8
libjpeg8 liblcms2-2 libllvm6.0 libmagic1 libmng2 libmysqlclient20 libogg0
libopus0 liborc-0.4-0 libpciaccess0 libpixman-1-0 libpng12-0 libpopt0
libpthread-stubs0-dev libqt4-dbus libqt4-declarative libqt4-designer
libqt4-dev-bin libqt4-help libqt4-network libqt4-opengl libqt4-opengl-dev
libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql
libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns
libqtcore4 libqtdbus4 libqtgui4 libsensors4 libsm6 libtheora0 libtiff5
libtxc-dxtn-s2tc0 libvisual-0.4-0 libvorbis0a libvorbisenc2 libx11-6
libx11-data libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1 libxau-dev
libxau6 libxaw7 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0
libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-present-dev
libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render0
libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-sync-dev
libxcb-sync1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb1 libxcb1-dev
libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev libxext6
libxfixes-dev libxfixes3 libxfont1 libxi6 libxkbfile1 libxml2 libxmu6
libxmuu1 libxpm4 libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1
libxt6 libxxf86vm-dev libxxf86vm1 mesa-common-dev mysql-common
openssh-client qdbus qt-at-spi qt4-linguist-tools qt4-qmake qtchooser
qtcore4-l10n rsync sgml-base shared-mime-info ucf x11-common x11-xkb-utils
x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev
x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
x11proto-xf86vidmode-dev xauth xdg-user-dirs xfonts-base xfonts-encodings
xfonts-utils xkb-data xml-core xorg-sgml-doctools xserver-common xtrans-dev
Suggested packages:
dbus-user-session | dbus-x11 gettext-base git-daemon-run
| git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch
git-cvs git-mediawiki git-svn gvfs isoquery nas cups-common libcurl4-doc
libcurl3-dbg libgnutls-dev libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
pkg-config libvisual-0.4-plugins gstreamer1.0-tools icu-doc liblcms2-utils
opus-tools pciutils libqt4-declarative-folderlistmodel
libqt4-declarative-gestures libqt4-declarative-particles
libqt4-declarative-shaders qt4-qmlviewer firebird-dev libmysqlclient-dev
libsqlite0-dev libsqlite3-dev qt4-dev-tools qt4-doc unixodbc-dev libthai0
qt4-qtconfig lm-sensors libxcb-doc libxext-doc ssh-askpass libpam-ssh
keychain monkeysphere openssh-server sgml-base-doc debhelper
The following NEW packages will be installed:
dbus file fontconfig fontconfig-config fonts-dejavu-core git git-man
gstreamer1.0-plugins-base icu-devtools iso-codes less libaudio2
libavahi-client3 libavahi-common-data libavahi-common3 libbsd0 libcap-ng0
libcdparanoia0 libcups2 libcurl4-gnutls-dev libdbus-1-3 libdrm-amdgpu1
libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
libdrm2 libedit2 libelf1 liberror-perl libexpat1 libfontconfig1 libfontenc1
libfreetype6 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
libglib2.0-0 libglib2.0-data libglu1-mesa libglu1-mesa-dev
libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libice6 libicu-dev libicu55
libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm6.0 libmagic1 libmng2
libmysqlclient20 libogg0 libopus0 liborc-0.4-0 libpciaccess0 libpixman-1-0
libpng12-0 libpopt0 libpthread-stubs0-dev libqt4-dbus libqt4-declarative
libqt4-designer libqt4-dev libqt4-dev-bin libqt4-help libqt4-network
libqt4-opengl libqt4-opengl-dev libqt4-qt3support libqt4-script
libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test
libqt4-xml libqt4-xmlpatterns libqtcore4 libqtdbus4 libqtgui4 libqtwebkit4
libsensors4 libsm6 libtheora0 libtiff5 libtxc-dxtn-s2tc0 libvisual-0.4-0
libvorbis0a libvorbisenc2 libx11-6 libx11-data libx11-dev libx11-doc
libx11-xcb-dev libx11-xcb1 libxau-dev libxau6 libxaw7 libxcb-dri2-0
libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev
libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev
libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev
libxcb-sync-dev libxcb-sync1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb1
libxcb1-dev libxdamage-dev libxdamage1 libxdmcp-dev libxdmcp6 libxext-dev
libxext6 libxfixes-dev libxfixes3 libxfont1 libxi6 libxkbfile1 libxml2
libxml2-dev libxmu6 libxmuu1 libxpm4 libxrender1 libxshmfence-dev
libxshmfence1 libxslt1-dev libxslt1.1 libxt6 libxxf86vm-dev libxxf86vm1
mesa-common-dev mysql-common openssh-client qdbus qt-at-spi
qt4-linguist-tools qt4-qmake qtchooser qtcore4-l10n rsync sgml-base
shared-mime-info ucf x11-common x11-xkb-utils x11proto-core-dev
x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev
x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
x11proto-xf86vidmode-dev xauth xdg-user-dirs xfonts-base xfonts-encodings
xfonts-utils xkb-data xml-core xorg-sgml-doctools xserver-common xtrans-dev
xvfb
...
...
Removing intermediate container 10d6197af7ca
---> f797cd358613
Step 11/24 : RUN apt-get update && apt-get install -y ruby ruby-dev bundler && rm -rf /var/lib/lists/*
---> Running in cddd19cdbe85
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery
libruby2.3 libyaml-0-2 rake ruby-bundler ruby-did-you-mean ruby-minitest
ruby-molinillo ruby-net-http-persistent ruby-net-telnet ruby-power-assert
ruby-test-unit ruby-thor ruby2.3 ruby2.3-dev rubygems-integration sudo unzip
zip
Suggested packages:
apache2 | lighttpd | httpd gmp-doc libgmp10-doc libmpfr-dev ri
The following NEW packages will be installed:
bundler fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery
libruby2.3 libyaml-0-2 rake ruby ruby-bundler ruby-dev ruby-did-you-mean
ruby-minitest ruby-molinillo ruby-net-http-persistent ruby-net-telnet
ruby-power-assert ruby-test-unit ruby-thor ruby2.3 ruby2.3-dev
rubygems-integration sudo unzip zip
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 8357 kB of archives.
...
...
Removing intermediate container cddd19cdbe85
---> 6a0b2f77087b
Step 12/24 : RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
---> Running in c185a2f95fbd
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: requesting key 39499BDB from hkp server keys.gnupg.net
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis#gmail.com>" imported
gpg: key 39499BDB: public key "Piotr Kuczynski <piotr.kuczynski#gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 2
gpg: imported: 2 (RSA: 2)
Removing intermediate container c185a2f95fbd
---> 28942e1516c8
Step 13/24 : RUN curl -sSl https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
---> Running in 4521aa379be2
Downloading https://github.com/rvm/rvm/archive/1.29.7.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.7...
...
...
/1.29.7.tar.gz.asc
Removing intermediate container 4521aa379be2
---> 326d003275db
Step 14/24 : RUN ["/bin/bash", "-l", "-c", "rvm requirements"]
---> Running in 9b7cf125de07
mesg: ttyname failed: Inappropriate ioctl for device
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..
Installing required packages: gawk, autoconf, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libtool, libyaml-dev, pkg-config, sqlite3, libreadline6-dev.............
Requirements installation successful.
Removing intermediate container 9b7cf125de07
---> bc89ea7eb165
Step 15/24 : RUN ["/bin/bash", "-l", "-c", "rvm install 2.3.3 --default"]
---> Running in 938d6dbb8e50
mesg: ttyname failed: Inappropriate ioctl for device
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.2
- RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.3.3
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.3.3/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-2.3.3
- /usr/local/rvm/gems/ruby-2.3.3#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/rvm/gems/ruby-2.3.3/bin
- /usr/local/rvm/gems/ruby-2.3.3#global/bin
- /usr/local/rvm/rubies/ruby-2.3.3/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/local/rvm/bin
Settings are listed in order of priority. The top value will be used.
path
Set via BUNDLE_PATH: "bundle"
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 35 seconds
1 gem installed
Removing intermediate container d77b774c18b3
---> ed73a09a9ce1
Step 17/24 : ENV APP_HOME /theaterengine
---> Running in 23dd5a5a2564
Removing intermediate container 23dd5a5a2564
---> 31bb685d4a18
Step 18/24 : RUN mkdir $APP_HOME
---> Running in e249f33df047
Removing intermediate container e249f33df047
---> 0c4655341563
Step 19/24 : WORKDIR $APP_HOME
Removing intermediate container 2b66d8ba845d
---> a006fb0074b8
Step 20/24 : COPY Gemfile Gemfile
---> dd19d7576314
Step 21/24 : COPY Gemfile.lock Gemfile.lock
---> aafe1a3149d4
Step 22/24 : ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile BUNDLE_JOBS=2
---> Running in afd6c6d74122
Removing intermediate container afd6c6d74122
---> 802e91bda185
Step 23/24 : RUN /bin/bash -l -c "bundle install"
---> Running in c896b57d062b
mesg: ttyname failed: Inappropriate ioctl for device
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching https://github.com/gavinkflam/lightbox2-rails.git
Fetching https://github.com/nathanvda/cocoon.git
Fetching https://github.com/derekprior/momentjs-rails.git
Fetching https://github.com/zpaulovics/datetimepicker-rails.git
Cloning into 'bootstrap-datetimepicker'...
Fetching https://github.com/jhenahan/administrate.git
Fetching gem metadata from https://rails-assets.org/...
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/..............
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/...
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/..
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies.............................................................
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.6) was resolved to 4.2.6, which depends on
bundler (< 2.0, >= 1.3.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails
(= 4.2.6)', in any of the sources.
ERROR: Service 'theaterengine' failed to build: The command '/bin/sh -c /bin/bash -l -c "bundle install"' returned a non-zero code: 6
I just build this image for ruby 2.3.3 and it work fine. You can try this:
FROM ruby:2.3.3
RUN apt-get install -y libpq5 libpq-dev
# install nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
# Install yarn
RUN npm i -g yarn
WORKDIR /
I'm using aeneas python module which uses ffmpeg. I install ffmpeg in the dockerfile as follows:
RUN apt-get update && apt-get install -y ffmpeg
Now when I run the program, it fails with: aeneas.ffprobewrapper.FFPROBEPathError: Unable to call the 'ffprobe' ffprobe executable : [Errno 2] No such file or directory: 'ffprobe' and aeneas.audiofile.AudioFileProbeError: Unable to call ffprobe executable. So my question is, how can I successfully use ffmpeg in a docker container? I'm running Ubuntu 16.04.
Install fresh ffmpeg version from sources in docker container on Debian 9/10/Ubuntu.
You can replace 4.2.2 version to any other available on https://ffmpeg.org/releases/
# Compile and install fresh ffmpeg from sources:
# See: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
RUN apt-get update -qq && apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
pkg-config \
texinfo \
wget \
zlib1g-dev \
nasm \
yasm \
libx265-dev \
libnuma-dev \
libvpx-dev \
libmp3lame-dev \
libopus-dev \
libx264-dev \
libfdk-aac-dev
RUN mkdir -p ~/ffmpeg_sources ~/bin && cd ~/ffmpeg_sources && \
wget -O ffmpeg-4.2.2.tar.bz2 https://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2 && \
tar xjvf ffmpeg-4.2.2.tar.bz2 && \
cd ffmpeg-4.2.2 && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="$HOME/bin" \
--enable-libfdk-aac \
--enable-gpl \
--enable-libass \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree && \
PATH="$HOME/bin:$PATH" make -j8 && \
make install -j8 && \
hash -r
RUN mv ~/bin/ffmpeg /usr/local/bin && mv ~/bin/ffprobe /usr/local/bin && mv ~/bin/ffplay /usr/local/bin
It could be faulty library, then this should help:
apt-get install ffmpeg libavcodec-extra-53
If not it can be path problem:
$ffmpeg = FFMpeg\FFMpeg::create(array(
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe'));
The similar issue resolved here: https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues/172
in the last message on the bottom of the website.
You can do it if you have linux. Or anywhere you can install X (haven't tested it). Basic idea is that linux is using X11, so you can fart out X data to your host machine's X server.
Dockerfile
FROM ubuntu:latest
RUN apt-get update -qq && apt-get install ffmpeg -y
ENTRYPOINT ["ffplay"]
Build that with
docker build -t ffplay:latest .
play.sh
docker run \
--rm \
-u `id -u` \
-e DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "$HOME/Desktop:/media" \
ffplay:latest \
-i /media/test.mp4
I'm trying to build a static binary with dependencies. It faile with:
ERROR: libass not found using pkg-config
I'm following https://github.com/zimbatm/ffmpeg-static/blob/master/build.sh as sample
This is the docker
git clone --depth 1 https://github.com/l-smash/l-smash \
&& git clone --depth 1 git://source.ffmpeg.org/ffmpeg \
&& git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git \
&& git clone --depth 1 https://github.com/mulx/aacgain.git \
&& git clone --depth 1 git://git.videolan.org/x264.git \
&& hg clone https://bitbucket.org/multicoreware/x265 \
&& git clone --depth 1 https://chromium.googlesource.com/webm/libvpx \
&& git clone --depth 1 git://git.opus-codec.org/opus.git \
&& git clone --depth 1 https://github.com/libass/libass.git
mkdir /usr/local/src/nasm
cd /usr/local/src/nasm
curl http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.bz2 | tar -xj -C .
cd nasm-2.13.01
./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
mkdir /usr/local/src/harfbuzz/
cd /usr/local/src/harfbuzz/
curl https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.6.tar.bz2 | tar -xj -C .
cd harfbuzz-1.4.6
./configure --prefix=$TARGET_DIR \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
cd /usr/local/src/libass
./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR --enable-static --disable-shared \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# Build L-SMASH
# =================================
cd /usr/local/src/l-smash
./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# =================================
# Build libx264
# =================================
cd /usr/local/src/x264
./configure --prefix=$TARGET_DIR --enable-static --disable-shared --disable-opencl --enable-pic \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# =================================
# Build libx265
# =================================
cd /usr/local/src/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$TARGET_DIR" -DENABLE_SHARED:bool=off ../../source
make --quiet -j ${NUM_CORES} \
&& make --quiet install
# =================================
# Build libfdk-aac
# =================================
cd /usr/local/src/fdk-aac
autoreconf -fiv \
&& ./configure --prefix=$TARGET_DIR --disable-shared \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# # =================================
# # Build libvpx
# # =================================
# cd /usr/local/src/libvpx
# ./configure --disable-examples --disable-unit-tests --enable-pic \
# && make --quiet -j ${NUM_CORES} \
# && make --quiet install
# # =================================
# # Build libopus
# # =================================
# cd /usr/local/src/opus
# ./autogen.sh \
# && ./configure --disable-shared \
# && make --quiet -j ${NUM_CORES} \
# && make --quiet install
# =================================
# Build ffmpeg.
# =================================
# --enable-libx265 - Remove until we can figure out compile error
cd /usr/local/src/ffmpeg
[ ! -f config.status ] && PATH="$BIN_DIR:$PATH" \
PKG_CONFIG_PATH="$TARGET_DIR/lib/pkgconfig" ./configure \
--extra-libs="-ldl" \
--prefix="$TARGET_DIR" \
--pkg-config-flags="--static" \
--extra-cflags="-I$TARGET_DIR/include" \
--extra-ldflags="-L$TARGET_DIR/lib" \
--extra-ldexeflags="-static" \
--bindir="$BIN_DIR" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--enable-postproc \
--enable-pic \
--enable-pthreads \
--enable-shared \
--disable-stripping \
--disable-static \
&& make --quiet -j ${NUM_CORES} \
&& make --quiet install
# Remove all tmpfile
Why are you git cloning and then also downloading the source package?
libass builds static libraries by default
libass requires you to run the autogen.sh to generate a configure script
Try it like this
git clone https://github.com/libass/libass.git
&& cd libass
&& ./autogen.sh
&& ./configure
&& make
&& make install
&& pkg-config libass
&& cd ../
L-smash builds static libs by default too
&& git clone https://github.com/l-smash/l-smash
&& cd l-smash
&& ./configure
&& make install
&& cd ../