Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added OpenSSL & various protocol support to FFmpeg backend #229

Merged
merged 26 commits into from Aug 18, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a577c57
Added OpenSSL & different protocol support to FFmpeg backend
abhiTronix Jul 30, 2019
f2c53bd
Additional Fixes
abhiTronix Jul 31, 2019
77619d3
Fixed ./Configure command
abhiTronix Aug 2, 2019
c746b96
Updates for docker images:
abhiTronix Aug 4, 2019
d71b139
Fixed Empty continuation lines bug & added comments
abhiTronix Aug 4, 2019
bc69c01
Merge pull request #1 from abhiTronix/testing
abhiTronix Aug 4, 2019
991a981
fix inconsitent spacing
native-api Aug 4, 2019
0977132
Don't add perl 5.10 to PATH
native-api Aug 4, 2019
3dace9e
fix syntax error
native-api Aug 4, 2019
74d92e0
Merge pull request #2 from native-api/new_openssl
abhiTronix Aug 5, 2019
8fc6035
Fixed OpenSSL build fails in i686 Dockerfile due to buggy perl source
abhiTronix Aug 5, 2019
6f566cd
Fixing manylinux docker entrypoint for i686 in 32 bit images
abhiTronix Aug 5, 2019
f621ead
ENTRYPOINT not needed, it only affects "docker run" invocations
native-api Aug 6, 2019
e08dccb
manylinux1 provides better libcurl for cmake
native-api Aug 6, 2019
3525469
manylinux1 provides the toolchain and git
native-api Aug 6, 2019
8aa69b3
cleanup tar invocations
native-api Aug 6, 2019
af2f0c6
nasm is not installed in manylinux1
native-api Aug 6, 2019
d08a9c9
detect i686 in openssl configure
native-api Aug 6, 2019
43704d3
move perl to a separate subtree as it's a private dependency
native-api Aug 6, 2019
b72fb32
comment unusual openssl build step
native-api Aug 6, 2019
2eb9e03
avoid redundant work in perl build
native-api Aug 6, 2019
8e86d77
build each library in a separate dockerfile command for easier debugging
native-api Aug 6, 2019
8d12fd7
comment custom i686 step
native-api Aug 6, 2019
4808583
opencv now bundles libjpeg-turbo
native-api Aug 6, 2019
88597ed
update dockerfile README
native-api Aug 6, 2019
399baca
Merge pull request #4 from native-api/cleanup_r1
abhiTronix Aug 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 28 additions & 11 deletions docker/Dockerfile_i686
Expand Up @@ -13,18 +13,28 @@ RUN curl -O -L https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensou
ENV QTDIR /opt/Qt4.8.7
ENV PATH "$QTDIR/bin:$PATH"

RUN curl -O -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz && \
tar -zxf cmake-3.9.0.tar.gz && \
cd cmake-3.9.0 && \
yum -y install curl-devel zlib-devel && \
./configure --system-curl && \
make && \
make install && \
cd .. && \
RUN curl -O -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: inconsistent spacing here and further on
abhiTronix#2

tar -zxf cmake-3.9.0.tar.gz && \
cd cmake-3.9.0 && \
yum -y install curl-devel zlib-devel && \
./configure --system-curl && \
make -j4 && \
make install && \
cd .. && \
rm -rf cmake-3.9.0*

RUN yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ libtool make mercurial pkgconfig zlib-devel -y && \
yum remove nasm -y && \
RUN curl -O -L https://www.cpan.org/src/5.0/perl-5.10.1.tar.gz && \
tar -xzf perl-5.10.1.tar.gz && \
yum install autoconf automake bzip2 git freetype-devel gcc gcc-c++ libtool make pkgconfig -y && \
Copy link
Contributor

@native-api native-api Aug 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i686 Dockerfile fails here due to dependency resolution problems for git.

There's no need to install Git because manylinux already provides it.
(There's also no need to install GCC for the same reason; that goes under general cleanup though.)

Copy link
Contributor Author

@abhiTronix abhiTronix Aug 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But builds were failing on my machine due to the absence of git on x64 docker? Please wait I will test with your PR again.

cd perl-5.10.1 && \
./Configure -des -Dprefix=$HOME/ffmpeg_build && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I fix the yum install git problem, OpenSSL build fails in i686 Dockerfile. Output suggests that Perl has been built for x64 instead of x86.

Copy link
Contributor Author

@abhiTronix abhiTronix Aug 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@native-api please see abhiTronix#2 , I have suggested some changes related to this issue.

make -j4 && \
make install && \
cd .. && \
rm -rf perl-5.10.1* && \
PATH=$HOME/ffmpeg_build/bin:$PATH #otherwise perl not detected at runtime
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add perl to global path for all further commands -- it's possible to override envvars for a single command, see abhiTronix#2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this.


RUN yum remove nasm -y && \
mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 && \
Expand All @@ -46,11 +56,18 @@ RUN yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ libtool
make -j4 && \
make install && \
cd ~/ffmpeg_sources && \
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz && \
tar -zxvf OpenSSL_1_1_1c.tar.gz && \
cd openssl-OpenSSL_1_1_1c && \
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" shared zlib && \
make -j4 && \
make install_sw && \ #skip building man-pages
cd ~/ffmpeg_sources && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j4 && \
make install && \
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
Expand Down
41 changes: 29 additions & 12 deletions docker/Dockerfile_x86_64
Expand Up @@ -13,18 +13,28 @@ RUN curl -O -L https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensou
ENV QTDIR /opt/Qt4.8.7
ENV PATH "$QTDIR/bin:$PATH"

RUN curl -O -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz && \
tar -zxf cmake-3.9.0.tar.gz && \
cd cmake-3.9.0 && \
yum -y install curl-devel zlib-devel && \
./configure --system-curl && \
make && \
make install && \
cd .. && \
RUN curl -O -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz && \
tar -zxf cmake-3.9.0.tar.gz && \
cd cmake-3.9.0 && \
yum -y install curl-devel zlib-devel && \
./configure --system-curl && \
make -j4 && \
make install && \
cd .. && \
rm -rf cmake-3.9.0*

RUN yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ libtool make mercurial pkgconfig zlib-devel -y && \
yum remove nasm -y && \
RUN curl -O -L https://www.cpan.org/src/5.0/perl-5.10.1.tar.gz && \
tar -xzf perl-5.10.1.tar.gz && \
yum install autoconf automake bzip2 git freetype-devel gcc gcc-c++ libtool make pkgconfig -y && \
cd perl-5.10.1 && \
./Configure -des -Dprefix=$HOME/ffmpeg_build && \
make -j4 && \
make install && \
cd .. && \
rm -rf perl-5.10.1* && \
PATH=$HOME/ffmpeg_build/bin:$PATH

RUN yum remove nasm -y && \
mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2 && \
Expand All @@ -46,11 +56,18 @@ RUN yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ libtool
make -j4 && \
make install && \
cd ~/ffmpeg_sources && \
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz && \
tar -zxvf OpenSSL_1_1_1c.tar.gz && \
cd openssl-OpenSSL_1_1_1c && \
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" shared zlib && \
make -j4 && \
make install_sw && \
cd ~/ffmpeg_sources && \
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j4 && \
make install && \
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
Expand Down Expand Up @@ -84,4 +101,4 @@ RUN curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/uapi/
curl -O https://raw.githubusercontent.com/torvalds/linux/v4.14/include/linux/compiler.h && \
mv videodev2.h v4l2-common.h v4l2-controls.h compiler.h /usr/include/linux

ENV PATH "$HOME/bin:$PATH"
ENV PATH "$HOME/bin:$PATH"