Skip to content

Instantly share code, notes, and snippets.

@ianblenke
Created December 30, 2018 00:18
Show Gist options
  • Save ianblenke/60d79908e0c83a0b9cb99002d2e55ab5 to your computer and use it in GitHub Desktop.
Save ianblenke/60d79908e0c83a0b9cb99002d2e55ab5 to your computer and use it in GitHub Desktop.
cerbero gstreamer 1.14 for android build Dockerfile
FROM ubuntu:bionic
RUN apt-get update
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y python3-pip python3 git build-essential sudo
RUN apt-get install -y autotools-dev automake autoconf libtool g++ autopoint make cmake bison flex yasm pkg-config gtk-doc-tools libxv-dev libx11-dev libpulse-dev python3-dev texinfo gettext build-essential pkg-config doxygen curl libxext-dev libxi-dev x11proto-record-dev libxrender-dev libgl1-mesa-dev libxfixes-dev libxdamage-dev libxcomposite-dev libasound2-dev libxml-simple-perl dpkg-dev debhelper build-essential devscripts fakeroot transfig gperf libdbus-glib-1-dev wget glib-networking libxtst-dev libxrandr-dev libglu1-mesa-dev libegl1-mesa-dev git subversion xutils-dev intltool ccache python3-setuptools
RUN apt-get install -y libpython-dev libpython2.7 libpython2.7-dev python-dev python2.7-dev libfuse2 libselinux1-dev libsepol1-dev fuse chrpath libfuse-dev
RUN git clone -b 1.14 https://gitlab.freedesktop.org/gstreamer/cerbero /cerbero
WORKDIR /cerbero
RUN git config --global user.email "ian@blenke.com"
RUN git config --global user.name "Ian Blenke"
# The upstream soft-switch.org site is unreliable.
RUN sed -i -e 's%http://www.soft-switch.org/downloads/spandsp/%https://gstreamer.freedesktop.org/src/mirror/%' recipes/spandsp.recipe
# This works with 1.14
RUN ./cerbero-uninstalled -c config/cross-android-armv7.cbc bootstrap
RUN ./cerbero-uninstalled -c config/cross-android-armv7.cbc build bionic-fixup
RUN ./cerbero-uninstalled -c config/cross-android-armv7.cbc build libiconv gnustl gettext libffi zlib glib gtk-doc-lite gstreamer-1.0 libxml2 libogg libpng pixman expat bzip2 freetype fontconfig cairo harfbuzz pango libvorbis libtheora libvisual orc opus graphene libjpeg-turbo tremor gst-plugins-base-1.0 gst-shell speex tiff gdk-pixbuf gmp nettle libtasn1 bionic-fixup gnutls glib-networking libsoup mpg123 lame wavpack flac taglib libvpx libdv gst-plugins-good-1.0 fribidi libass faad2 libkate openh264 librtmp libsrtp libdca libmms libnice soundtouch vo-aacenc libcroco vala-m4 gobject-introspection-m4 librsvg openjpeg openssl spandsp webrtc-audio-processing sbc ladspa srt gst-plugins-bad-1.0 a52dec opencore-amr libmpeg2 x264 gst-plugins-ugly-1.0 gst-android-1.0 json-glib ca-certificates gst-rtsp-server-1.0 glib-networking-static gst-libav-1.0 gst-validate gst-editing-services-1.0
RUN ./cerbero-uninstalled -c config/cross-android-armv7.cbc build srt
RUN ./cerbero-uninstalled -c config/cross-android-armv7.cbc package gstreamer-1.0
# This works with 1.14
RUN ./cerbero-uninstalled -c config/cross-android-x86.cbc bootstrap
RUN ./cerbero-uninstalled -c config/cross-android-x86.cbc build bionic-fixup
RUN ./cerbero-uninstalled -c config/cross-android-x86.cbc build libiconv gnustl gettext libffi zlib glib gtk-doc-lite gstreamer-1.0 libxml2 libogg libpng pixman expat bzip2 freetype fontconfig cairo harfbuzz pango libvorbis libtheora libvisual orc opus graphene libjpeg-turbo tremor gst-plugins-base-1.0 gst-shell speex tiff gdk-pixbuf gmp nettle libtasn1 bionic-fixup gnutls glib-networking libsoup mpg123 lame wavpack flac taglib libvpx libdv gst-plugins-good-1.0 fribidi libass faad2 libkate openh264 librtmp libsrtp libdca libmms libnice soundtouch vo-aacenc libcroco vala-m4 gobject-introspection-m4 librsvg openjpeg openssl spandsp webrtc-audio-processing sbc ladspa srt gst-plugins-bad-1.0 a52dec opencore-amr libmpeg2 x264 gst-plugins-ugly-1.0 gst-android-1.0 json-glib ca-certificates gst-rtsp-server-1.0 glib-networking-static gst-libav-1.0 gst-validate gst-editing-services-1.0
RUN ./cerbero-uninstalled -c config/cross-android-x86.cbc build srt
RUN ./cerbero-uninstalled -c config/cross-android-x86.cbc package gstreamer-1.0
# This does not work with 1.14, the build srt step breaks with:
RUN ./cerbero-uninstalled -c config/cross-android-arm64.cbc bootstrap
RUN ./cerbero-uninstalled -c config/cross-android-arm64.cbc build bionic-fixup
RUN ./cerbero-uninstalled -c config/cross-android-arm64.cbc build libiconv gnustl gettext libffi zlib glib gtk-doc-lite gstreamer-1.0 libxml2 libogg libpng pixman expat bzip2 freetype fontconfig cairo harfbuzz pango libvorbis libtheora libvisual orc opus graphene libjpeg-turbo tremor gst-plugins-base-1.0 gst-shell speex tiff gdk-pixbuf gmp nettle libtasn1 bionic-fixup gnutls glib-networking libsoup mpg123 lame wavpack flac taglib libvpx libdv gst-plugins-good-1.0 fribidi libass faad2 libkate openh264 librtmp libsrtp libdca libmms libnice soundtouch vo-aacenc libcroco vala-m4 gobject-introspection-m4 librsvg openjpeg openssl spandsp webrtc-audio-processing sbc ladspa a52dec opencore-amr libmpeg2 x264 gst-plugins-ugly-1.0 gst-android-1.0 json-glib ca-certificates gst-rtsp-server-1.0 glib-networking-static gst-libav-1.0 gst-validate gst-editing-services-1.0
## ...
## [ 96%] Linking CXX shared library libsrt.so
## [100%] Linking CXX static library libsrt.a
## /cerbero/build/sources/android_arm64/srt-1.3.1/srtcore/core.cpp:5494: error: undefined reference to 'std::istream::seekg(long long, std::_Ios_Seekdir)'
## collect2: error: ld returned 1 exit status
RUN ./cerbero-uninstalled -c config/cross-android-arm64.cbc build srt
RUN ./cerbero-uninstalled -c config/cross-android-arm64.cbc build gst-plugins-bad-1.0
RUN ./cerbero-uninstalled -c config/cross-android-arm64.cbc package gstreamer-1.0
# If you comment out the arm64 steps above, you'll still find that x86_64 fails in the same way.
RUN ./cerbero-uninstalled -c config/cross-android-x86-64.cbc bootstrap
RUN ./cerbero-uninstalled -c config/cross-android-x86-64.cbc build bionic-fixup
RUN ./cerbero-uninstalled -c config/cross-android-x86-64.cbc build libiconv gnustl gettext libffi zlib glib gtk-doc-lite gstreamer-1.0 libxml2 libogg libpng pixman expat bzip2 freetype fontconfig cairo harfbuzz pango libvorbis libtheora libvisual orc opus graphene libjpeg-turbo tremor gst-plugins-base-1.0 gst-shell speex tiff gdk-pixbuf gmp nettle libtasn1 bionic-fixup gnutls glib-networking libsoup mpg123 lame wavpack flac taglib libvpx libdv gst-plugins-good-1.0 fribidi libass faad2 libkate openh264 librtmp libsrtp libdca libmms libnice soundtouch vo-aacenc libcroco vala-m4 gobject-introspection-m4 librsvg openjpeg openssl spandsp webrtc-audio-processing sbc ladspa gst-plugins-bad-1.0 a52dec opencore-amr libmpeg2 x264 gst-plugins-ugly-1.0 gst-android-1.0 json-glib ca-certificates gst-rtsp-server-1.0 glib-networking-static gst-libav-1.0 gst-validate gst-editing-services-1.0
RUN ./cerbero-uninstalled -c config/cross-android-x86-64.cbc build srt
RUN ./cerbero-uninstalled -c config/cross-android-x86-64.cbc package gstreamer-1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment