From b80244c7e022757268be736a3483d3a985875293 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 12 Feb 2016 11:18:22 +0100 Subject: [PATCH 01/16] Travis: check if we are on Travis when install dependencies Useful to use the script outside of Travis (Docker...). --- tools/travis/linux.install.deps.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index d2ba5c0d..76c79f63 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -3,7 +3,9 @@ # Print commands and their arguments as they are executed. set -x -if [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then +# Use TRAVIS_JOB_ID to detect that we are in travis. +# In that case, use a simple check to detect if the cache is already there. +if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then From 383a08a05cf474a150bb20b7b7c832d9f5f6af5e Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 12 Feb 2016 11:21:56 +0100 Subject: [PATCH 02/16] Travis: install third parties of ffmpeg/libav * Fix #222 * YASM_VERSION=1.3.0 * X264 (latest) * LAME_VERSION=3.99.5 * FAAC_VERSION=1.28 * XVID_VERSION=1.3.3 * FDKAAC_VERSION=0.1.3 * OGG_VERSION=1.3.2 * VORBIS_VERSION=1.3.4 * VPX_VERSION=1.4.0 * LIBOPUS (latest) --- .travis.yml | 9 ++ tools/travis/linux.install.deps.sh | 173 +++++++++++++++++++++++++++-- 2 files changed, 173 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index eae9f8ef..5b980f58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,15 @@ env: - AVTRANSCODER_INSTALL_PATH=${TRAVIS_BUILD_DIR}/${AVTRANSCODER_INSTALL} - DEPENDENCY_INSTALL=install-dependency - DEPENDENCY_INSTALL_PATH=${TRAVIS_BUILD_DIR}/${DEPENDENCY_INSTALL} + + - YASM_VERSION=1.3.0 + - LAME_VERSION=3.99.5 + - FAAC_VERSION=1.28 + - XVID_VERSION=1.3.3 + - FDKAAC_VERSION=0.1.3 + - OGG_VERSION=1.3.2 + - VORBIS_VERSION=1.3.4 + - VPX_VERSION=1.4.0 matrix: - DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=true - DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=false diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index 76c79f63..137ec2d8 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -7,20 +7,175 @@ set -x # In that case, use a simple check to detect if the cache is already there. if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then + export LD_LIBRARY_PATH=${DEPENDENCY_INSTALL_PATH}/lib:${DEPENDENCY_INSTALL_PATH}/lib64 + export PKG_CONFIG_PATH=${DEPENDENCY_INSTALL_PATH}/lib/pkgconfig:${DEPENDENCY_INSTALL_PATH}/lib64/pkgconfig + export PATH=$PATH:${DEPENDENCY_INSTALL_PATH}/bin + + # yasm + echo "Building YASM (${YASM_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \ + tar xzvf yasm-${YASM_VERSION}.tar.gz && \ + cd yasm-${YASM_VERSION} && \ + ./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # x264 + echo "" + echo "Building x264 (last version)" + DIR=$(mktemp -d) && cd ${DIR} && \ + git clone --depth 1 git://git.videolan.org/x264 && \ + cd x264 && \ + ./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --disable-asm && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # libmp3lame + echo "" + echo "Building libmp3lame (${LAME_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION%.*}/lame-${LAME_VERSION}.tar.gz && \ + tar xzvf lame-${LAME_VERSION}.tar.gz && \ + cd lame-${LAME_VERSION} && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-nasm && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + + # faac + # http://stackoverflow.com/a/4320377 + # http://sourceforge.net/p/faac/bugs/162/#46a0 + echo "" + echo "Building faac (${FAAC_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -L -Os http://downloads.sourceforge.net/faac/faac-${FAAC_VERSION}.tar.gz && \ + tar xzvf faac-${FAAC_VERSION}.tar.gz && \ + cd faac-${FAAC_VERSION} && \ + #sed -i '126d' common/mp4v2/mpeg4ip.h && \ + ./bootstrap && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --with-mp4v2=no && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # xvid + echo "" + echo "Building xvid (${XVID_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -L -Os http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ + tar xzvf xvidcore-${XVID_VERSION}.tar.gz && \ + cd xvidcore/build/generic && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + + # fdk-aac + # Warning: need automake + libtool + echo "" + echo "Building fdk-aac (${FDKAAC_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -s https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v${FDKAAC_VERSION} | tar zxvf - && \ + cd fdk-aac-${FDKAAC_VERSION} && \ + autoreconf -fiv && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # libogg + echo "" + echo "Building libogg (${OGG_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -O http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ + tar xzvf libogg-${OGG_VERSION}.tar.gz && \ + cd libogg-${OGG_VERSION} && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --disable-shared --with-pic && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # libvorbis + echo "" + echo "Building libvorbis (${VORBIS_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ + tar xzvf libvorbis-${VORBIS_VERSION}.tar.gz && \ + cd libvorbis-${VORBIS_VERSION} && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --with-ogg="${DEPENDENCY_INSTALL_PATH}" --disable-shared --with-pic && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # libvpx + # https://trac.ffmpeg.org/ticket/4956 + echo "" + echo "Building libvpx (${VPX_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + git clone https://github.com/webmproject/libvpx.git && \ + cd libvpx && \ + git checkout v${VPX_VERSION} && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --disable-examples --enable-pic && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + # libopus + echo "" + echo "Building libopus (last version)" + DIR=$(mktemp -d) && cd ${DIR} && \ + git clone git://git.opus-codec.org/opus.git && \ + cd opus && \ + autoreconf -fiv && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared --with-pic && \ + make -k && \ + make install && \ + rm -rf ${DIR} + + export COMPILE_OPTIONS=--extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --extra-libs=-ldl --enable-small --enable-shared --disable-static + export RELEASE_OPTIONS=--disable-debug + export DEBUG_OPTIONS=--enable-debug=3 --disable-optimizations --disable-sse --disable-stripping + export LICENSING_OPTIONS=--enable-gpl --enable-nonfree + export THIRD_PARTIES_OPTIONS=--enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-postproc --enable-avresample --enable-libfdk_aac --enable-libopus --enable-libvorbis --enable-libvpx + if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then - wget https://www.ffmpeg.org/releases/ffmpeg-${DEPENDENCY_VERSION}.tar.bz2 - bunzip2 ffmpeg-${DEPENDENCY_VERSION}.tar.bz2 - tar -xvf ffmpeg-${DEPENDENCY_VERSION}.tar - cd ffmpeg-${DEPENDENCY_VERSION} - ./configure --prefix=${DEPENDENCY_INSTALL_PATH} --disable-yasm --enable-shared --disable-static && make -k && make install + echo "" + echo "Building ffmpeg (${DEPENDENCY_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os http://ffmpeg.org/releases/ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ + tar xzvf ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ + cd ffmpeg-${DEPENDENCY_VERSION} && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \ + $COMPILE_OPTIONS \ + $RELEASE_OPTIONS \ + $LICENSING_OPTIONS \ + $THIRD_PARTIES_OPTIONS && \ + make -k && \ + make install && \ + rm -rf ${DIR} elif [[ ${DEPENDENCY_NAME} == "libav" ]]; then - wget https://libav.org/releases/libav-${DEPENDENCY_VERSION}.tar.gz - tar -xvf libav-${DEPENDENCY_VERSION}.tar.gz - cd libav-${DEPENDENCY_VERSION} - ./configure --prefix=${DEPENDENCY_INSTALL_PATH} --disable-yasm --enable-shared --disable-static && make -k && make install + echo "" + echo "Building libav (${DEPENDENCY_VERSION})" + DIR=$(mktemp -d) && cd ${DIR} && \ + curl -Os https://libav.org/releases/libav-${DEPENDENCY_VERSION}.tar.gz && \ + tar xzvf libav-${DEPENDENCY_VERSION}.tar.gz && \ + cd libav-${DEPENDENCY_VERSION} && \ + ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \ + $COMPILE_OPTIONS \ + $RELEASE_OPTIONS \ + $LICENSING_OPTIONS \ + $THIRD_PARTIES_OPTIONS && \ + make -k && \ + make install && \ + rm -rf ${DIR} fi From 26f73cce677295c8169d005442242750036039ad Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 12 Feb 2016 12:14:41 +0100 Subject: [PATCH 03/16] Travis: exit building process immediately if a command exits with a non-zero status * AvTranscoder does not build with libav since a long time in fact... * See issue #211 --- tools/travis/build.sh | 2 ++ tools/travis/linux.install.deps.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/travis/build.sh b/tools/travis/build.sh index a3fd015d..336c66f7 100755 --- a/tools/travis/build.sh +++ b/tools/travis/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Exit immediately if a command exits with a non-zero status +set -e # Print commands and their arguments as they are executed. set -x diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index 137ec2d8..c5f91d60 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Exit immediately if a command exits with a non-zero status +set -e # Print commands and their arguments as they are executed. set -x From 102384c67fa132c617f638d064538e38a8019545 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 12 Feb 2016 12:41:13 +0100 Subject: [PATCH 04/16] Travis: allow failures when build with libav --- .travis.yml | 6 +++++- README.md | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b980f58..08f27b36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,10 @@ matrix: env: DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=true - os: osx env: DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.4.2 ENABLE_COVERAGE=true + allow_failures: + # build with libav + - env: DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=true + - env: DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=false fast_finish: true # This results in a 2×2×2x2 build matrix. @@ -92,7 +96,7 @@ script: - ./tools/travis/build.sh # launch tests - - if [ ${TRAVIS_OS_NAME} = "linux" ] && [ ${DEPENDENCY_NAME} = "ffmpeg" ]; then ./tools/travis/python.nosetests.sh; fi + - if [ ${TRAVIS_OS_NAME} = "linux" ]; then ./tools/travis/python.nosetests.sh; fi after_success: # generate coverage for coveralls diff --git a/README.md b/README.md index bc78abbf..9f364fdd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # avTranscoder -C++ API for Libav / FFmpeg +C++ API for FFmpeg / Libav -Based on Libav/FFmpeg libraries to support various video and audio formats, avTranscoder provides the high level API to re-wrap or transcode media easily. +Based on FFmpeg/Libav libraries to support various video and audio formats, avTranscoder provides the high level API to re-wrap or transcode media easily. [![Build Status](https://travis-ci.org/avTranscoder/avTranscoder.svg?branch=develop)](https://travis-ci.org/avTranscoder/avTranscoder) [![Build status](https://ci.appveyor.com/api/projects/status/6urf0otyhtj8xuny?svg=true)](https://ci.appveyor.com/project/cchampet/avtranscoder) @@ -13,6 +13,8 @@ Based on Libav/FFmpeg libraries to support various video and audio formats, avTr [![Stories in Progress](https://badge.waffle.io/avTranscoder/avTranscoder.svg?label=2 - Working&title=In Progress)](http://waffle.io/avTranscoder/avTranscoder) Click on the badge above to have a big picture view of what's in progress and how you can help. +:warning: The latest avTranscoder API does not fit with libav. + #### What you need to know * C++ library * Java and Python bindings generated with SWIG From e525f2bc6e25ade6dd5bbc53867ef10b6c43feba Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 12 Feb 2016 15:30:06 +0100 Subject: [PATCH 05/16] Added new line at EOF * Fix #220 * There is a netbeans plugin to do that: http://plugins.netbeans.org/plugin/56323/eof-line-feed --- src/AvTranscoder/codec/AudioCodec.hpp | 2 +- src/AvTranscoder/codec/DataCodec.hpp | 2 +- src/AvTranscoder/codec/VideoCodec.hpp | 2 +- src/AvTranscoder/decoder/AudioGenerator.hpp | 2 +- src/AvTranscoder/encoder/AudioEncoder.hpp | 2 +- src/AvTranscoder/encoder/IEncoder.hpp | 2 +- src/AvTranscoder/encoder/VideoEncoder.cpp | 2 +- src/AvTranscoder/encoder/VideoEncoder.hpp | 2 +- src/AvTranscoder/file/InputFile.cpp | 2 +- src/AvTranscoder/progress/IProgress.hpp | 2 +- src/AvTranscoder/progress/NoDisplayProgress.hpp | 2 +- src/AvTranscoder/stream/IInputStream.hpp | 2 +- src/AvTranscoder/stream/IOutputStream.hpp | 2 +- src/AvTranscoder/stream/InputStream.hpp | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/AvTranscoder/codec/AudioCodec.hpp b/src/AvTranscoder/codec/AudioCodec.hpp index 9b380171..eea6d290 100644 --- a/src/AvTranscoder/codec/AudioCodec.hpp +++ b/src/AvTranscoder/codec/AudioCodec.hpp @@ -20,4 +20,4 @@ class AvExport AudioCodec : public ICodec }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/codec/DataCodec.hpp b/src/AvTranscoder/codec/DataCodec.hpp index 3e1c6494..819163a2 100644 --- a/src/AvTranscoder/codec/DataCodec.hpp +++ b/src/AvTranscoder/codec/DataCodec.hpp @@ -15,4 +15,4 @@ class AvExport DataCodec : public ICodec }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/codec/VideoCodec.hpp b/src/AvTranscoder/codec/VideoCodec.hpp index aec23e43..642db5fe 100644 --- a/src/AvTranscoder/codec/VideoCodec.hpp +++ b/src/AvTranscoder/codec/VideoCodec.hpp @@ -20,4 +20,4 @@ class AvExport VideoCodec : public ICodec }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/decoder/AudioGenerator.hpp b/src/AvTranscoder/decoder/AudioGenerator.hpp index 16b6e16e..5c5631ad 100644 --- a/src/AvTranscoder/decoder/AudioGenerator.hpp +++ b/src/AvTranscoder/decoder/AudioGenerator.hpp @@ -27,4 +27,4 @@ class AvExport AudioGenerator : public IDecoder }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/encoder/AudioEncoder.hpp b/src/AvTranscoder/encoder/AudioEncoder.hpp index 50f3246d..149fb8f6 100644 --- a/src/AvTranscoder/encoder/AudioEncoder.hpp +++ b/src/AvTranscoder/encoder/AudioEncoder.hpp @@ -29,4 +29,4 @@ class AvExport AudioEncoder : public IEncoder }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/encoder/IEncoder.hpp b/src/AvTranscoder/encoder/IEncoder.hpp index 55e8d3fa..1ba57a74 100644 --- a/src/AvTranscoder/encoder/IEncoder.hpp +++ b/src/AvTranscoder/encoder/IEncoder.hpp @@ -44,4 +44,4 @@ class AvExport IEncoder }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/encoder/VideoEncoder.cpp b/src/AvTranscoder/encoder/VideoEncoder.cpp index 8c7f14e8..dc6e2973 100644 --- a/src/AvTranscoder/encoder/VideoEncoder.cpp +++ b/src/AvTranscoder/encoder/VideoEncoder.cpp @@ -170,4 +170,4 @@ bool VideoEncoder::encodeFrame(CodedData& codedFrame) return ret == 0; #endif } -} \ No newline at end of file +} diff --git a/src/AvTranscoder/encoder/VideoEncoder.hpp b/src/AvTranscoder/encoder/VideoEncoder.hpp index 6f8a910d..05d513ce 100644 --- a/src/AvTranscoder/encoder/VideoEncoder.hpp +++ b/src/AvTranscoder/encoder/VideoEncoder.hpp @@ -29,4 +29,4 @@ class AvExport VideoEncoder : public IEncoder }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/file/InputFile.cpp b/src/AvTranscoder/file/InputFile.cpp index 433a7baa..6d880b2b 100644 --- a/src/AvTranscoder/file/InputFile.cpp +++ b/src/AvTranscoder/file/InputFile.cpp @@ -250,4 +250,4 @@ std::ostream& operator<<(std::ostream& flux, const InputFile& input) return flux; } -} \ No newline at end of file +} diff --git a/src/AvTranscoder/progress/IProgress.hpp b/src/AvTranscoder/progress/IProgress.hpp index 653e0a12..08cce7aa 100644 --- a/src/AvTranscoder/progress/IProgress.hpp +++ b/src/AvTranscoder/progress/IProgress.hpp @@ -35,4 +35,4 @@ class AvExport IProgress }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/progress/NoDisplayProgress.hpp b/src/AvTranscoder/progress/NoDisplayProgress.hpp index ee66333f..2dbcd5f6 100644 --- a/src/AvTranscoder/progress/NoDisplayProgress.hpp +++ b/src/AvTranscoder/progress/NoDisplayProgress.hpp @@ -18,4 +18,4 @@ class AvExport NoDisplayProgress : public IProgress }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/stream/IInputStream.hpp b/src/AvTranscoder/stream/IInputStream.hpp index f1752e2c..07ad1d1a 100644 --- a/src/AvTranscoder/stream/IInputStream.hpp +++ b/src/AvTranscoder/stream/IInputStream.hpp @@ -59,4 +59,4 @@ class AvExport IInputStream }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/stream/IOutputStream.hpp b/src/AvTranscoder/stream/IOutputStream.hpp index 3bf279ee..3c7393c9 100644 --- a/src/AvTranscoder/stream/IOutputStream.hpp +++ b/src/AvTranscoder/stream/IOutputStream.hpp @@ -44,4 +44,4 @@ class AvExport IOutputStream }; } -#endif \ No newline at end of file +#endif diff --git a/src/AvTranscoder/stream/InputStream.hpp b/src/AvTranscoder/stream/InputStream.hpp index 7603789e..6b7f1778 100644 --- a/src/AvTranscoder/stream/InputStream.hpp +++ b/src/AvTranscoder/stream/InputStream.hpp @@ -47,4 +47,4 @@ class AvExport InputStream : public IInputStream }; } -#endif \ No newline at end of file +#endif From 2b58fba760fde390dcfeb620ed113a565b05e6e1 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 12 Feb 2016 15:33:31 +0100 Subject: [PATCH 06/16] Travis: check API with ffmpeg 2.6/2.7/2.8 Fix #212 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 08f27b36..69dcda77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,9 @@ env: - DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.4.2 ENABLE_COVERAGE=true - DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.4.2 ENABLE_COVERAGE=false - DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.5.7 ENABLE_COVERAGE=false + - DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.6.8 ENABLE_COVERAGE=false + - DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.7.6 ENABLE_COVERAGE=false + - DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.8.6 ENABLE_COVERAGE=false matrix: exclude: From 1b867be52ee9289d025a4e7a5aacd30239486e1f Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 11:59:46 +0100 Subject: [PATCH 07/16] Travis: fixed export of variables to build dependencies --- tools/travis/linux.install.deps.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index c5f91d60..89a318cc 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -139,11 +139,11 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then make install && \ rm -rf ${DIR} - export COMPILE_OPTIONS=--extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --extra-libs=-ldl --enable-small --enable-shared --disable-static + export COMPILE_OPTIONS=--extra-libs=-ldl\ --enable-small\ --enable-shared\ --disable-static export RELEASE_OPTIONS=--disable-debug - export DEBUG_OPTIONS=--enable-debug=3 --disable-optimizations --disable-sse --disable-stripping - export LICENSING_OPTIONS=--enable-gpl --enable-nonfree - export THIRD_PARTIES_OPTIONS=--enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-postproc --enable-avresample --enable-libfdk_aac --enable-libopus --enable-libvorbis --enable-libvpx + export DEBUG_OPTIONS=--enable-debug=3\ --disable-optimizations\ --disable-sse\ --disable-stripping + export LICENSING_OPTIONS=--enable-gpl\ --enable-nonfree + export THIRD_PARTIES_OPTIONS=--enable-libfaac\ --enable-libmp3lame\ --enable-libx264\ --enable-libxvid\ --enable-postproc\ --enable-avresample\ --enable-libfdk_aac\ --enable-libopus\ --enable-libvorbis\ --enable-libvpx if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then @@ -154,6 +154,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then tar xzvf ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ cd ffmpeg-${DEPENDENCY_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \ + --extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" \ $COMPILE_OPTIONS \ $RELEASE_OPTIONS \ $LICENSING_OPTIONS \ @@ -171,6 +172,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then tar xzvf libav-${DEPENDENCY_VERSION}.tar.gz && \ cd libav-${DEPENDENCY_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \ + --extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" \ $COMPILE_OPTIONS \ $RELEASE_OPTIONS \ $LICENSING_OPTIONS \ From 11ef7e0aae44006552193655bc63e9a04e9ffb69 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 12:44:44 +0100 Subject: [PATCH 08/16] Travis: disable some log when install dependencies * We exceed the limit of logged lines. * Added after_failure section. --- .travis.yml | 7 +++++ tools/travis/linux.install.deps.sh | 42 +++++++++++++++--------------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69dcda77..07c74d25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,12 @@ env: - AVTRANSCODER_BUILD_PATH=${TRAVIS_BUILD_DIR}/build-avtranscoder - AVTRANSCODER_INSTALL=install-avtranscoder - AVTRANSCODER_INSTALL_PATH=${TRAVIS_BUILD_DIR}/${AVTRANSCODER_INSTALL} + - DEPENDENCY_INSTALL=install-dependency - DEPENDENCY_INSTALL_PATH=${TRAVIS_BUILD_DIR}/${DEPENDENCY_INSTALL} + - DEPENDENCY_LOG_FILE=${TRAVIS_BUILD_DIR}/build-dependencies-log.txt + - YASM_VERSION=1.3.0 - LAME_VERSION=3.99.5 - FAAC_VERSION=1.28 @@ -105,6 +108,10 @@ after_success: # generate coverage for coveralls - if [ ${ENABLE_COVERAGE} ]; then ./tools/travis/gcc.generate.coverage.sh; fi +after_failure: + - cat ${AVTRANSCODER_BUILD_PATH}/CMakeFiles/CMakeOutput.log + - cat ${DEPENDENCY_LOG_FILE} + before_deploy: # copy libbz2, external dependency of libavformat - if [ ${TRAVIS_OS_NAME} = "linux" ]; then cp /lib/x86_64-linux-gnu/{libbz2.so.1,libbz2.so.1.0,libbz2.so.1.0.4} ${DEPENDENCY_INSTALL_PATH}/lib; fi diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index 89a318cc..7d9acdcb 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -17,10 +17,10 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building YASM (${YASM_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -Os http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \ - tar xzvf yasm-${YASM_VERSION}.tar.gz && \ + tar xzf yasm-${YASM_VERSION}.tar.gz && \ cd yasm-${YASM_VERSION} && \ ./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -31,7 +31,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then git clone --depth 1 git://git.videolan.org/x264 && \ cd x264 && \ ./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --disable-asm && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -40,10 +40,10 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building libmp3lame (${LAME_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION%.*}/lame-${LAME_VERSION}.tar.gz && \ - tar xzvf lame-${LAME_VERSION}.tar.gz && \ + tar xzf lame-${LAME_VERSION}.tar.gz && \ cd lame-${LAME_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-nasm && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -55,12 +55,12 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building faac (${FAAC_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -L -Os http://downloads.sourceforge.net/faac/faac-${FAAC_VERSION}.tar.gz && \ - tar xzvf faac-${FAAC_VERSION}.tar.gz && \ + tar xzf faac-${FAAC_VERSION}.tar.gz && \ cd faac-${FAAC_VERSION} && \ #sed -i '126d' common/mp4v2/mpeg4ip.h && \ ./bootstrap && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --with-mp4v2=no && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -69,10 +69,10 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building xvid (${XVID_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -L -Os http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ - tar xzvf xvidcore-${XVID_VERSION}.tar.gz && \ + tar xzf xvidcore-${XVID_VERSION}.tar.gz && \ cd xvidcore/build/generic && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -82,11 +82,11 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "" echo "Building fdk-aac (${FDKAAC_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ - curl -s https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v${FDKAAC_VERSION} | tar zxvf - && \ + curl -s https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v${FDKAAC_VERSION} | tar zxf - && \ cd fdk-aac-${FDKAAC_VERSION} && \ autoreconf -fiv && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -95,10 +95,10 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building libogg (${OGG_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -O http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ - tar xzvf libogg-${OGG_VERSION}.tar.gz && \ + tar xzf libogg-${OGG_VERSION}.tar.gz && \ cd libogg-${OGG_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --disable-shared --with-pic && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -107,10 +107,10 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building libvorbis (${VORBIS_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ - tar xzvf libvorbis-${VORBIS_VERSION}.tar.gz && \ + tar xzf libvorbis-${VORBIS_VERSION}.tar.gz && \ cd libvorbis-${VORBIS_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --with-ogg="${DEPENDENCY_INSTALL_PATH}" --disable-shared --with-pic && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -123,7 +123,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then cd libvpx && \ git checkout v${VPX_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --disable-examples --enable-pic && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -135,7 +135,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then cd opus && \ autoreconf -fiv && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared --with-pic && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -151,7 +151,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building ffmpeg (${DEPENDENCY_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -Os http://ffmpeg.org/releases/ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ - tar xzvf ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ + tar xzf ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ cd ffmpeg-${DEPENDENCY_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \ --extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" \ @@ -159,7 +159,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then $RELEASE_OPTIONS \ $LICENSING_OPTIONS \ $THIRD_PARTIES_OPTIONS && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} @@ -169,7 +169,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "Building libav (${DEPENDENCY_VERSION})" DIR=$(mktemp -d) && cd ${DIR} && \ curl -Os https://libav.org/releases/libav-${DEPENDENCY_VERSION}.tar.gz && \ - tar xzvf libav-${DEPENDENCY_VERSION}.tar.gz && \ + tar xzf libav-${DEPENDENCY_VERSION}.tar.gz && \ cd libav-${DEPENDENCY_VERSION} && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \ --extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" \ @@ -177,7 +177,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then $RELEASE_OPTIONS \ $LICENSING_OPTIONS \ $THIRD_PARTIES_OPTIONS && \ - make -k && \ + make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} From e7383c14455aa369223d1bc020ce990381742fc8 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 15:58:36 +0100 Subject: [PATCH 09/16] Appveyor: added common environment variables --- appveyor.yml | 2 ++ tools/appveyor/build.bat | 2 +- tools/appveyor/python.nosetests.bat | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 14eb8413..23688e4d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,8 @@ platform: environment: FFMPEG_VERSION: 2.4.5 + DEPENDENCY_INSTALL_PATH: C:\ProgramData\ffmpeg-2.4.5 + AVTRANSCODER_INSTALL_PATH: C:\projects\avtranscoder\build\install matrix: fast_finish: true diff --git a/tools/appveyor/build.bat b/tools/appveyor/build.bat index de875805..e71e0850 100755 --- a/tools/appveyor/build.bat +++ b/tools/appveyor/build.bat @@ -4,7 +4,7 @@ MKDIR build cd build :: Configure -call cmake.exe .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CD% -DCMAKE_PREFIX_PATH=C:\ProgramData\ffmpeg-%FFMPEG_VERSION% -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7 +call cmake.exe .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%%AVTRANSCODER_INSTALL_PATH%% -DCMAKE_PREFIX_PATH=%DEPENDENCY_INSTALL_PATH% -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7 :: Build & Install call nmake /F Makefile diff --git a/tools/appveyor/python.nosetests.bat b/tools/appveyor/python.nosetests.bat index ac5ad016..d9904512 100755 --- a/tools/appveyor/python.nosetests.bat +++ b/tools/appveyor/python.nosetests.bat @@ -3,11 +3,11 @@ set PWD=C:\projects\avtranscoder :: Get avtranscoder library -set PYTHONPATH=%PWD%\build\lib\python2.7\site-packages;%PYTHONPATH% -set PATH=C:\ProgramData\ffmpeg-%FFMPEG_VERSION%\bin;%PWD%\build\lib;%PATH% +set PYTHONPATH=%AVTRANSCODER_INSTALL_PATH%\lib\python2.7\site-packages;%PYTHONPATH% +set PATH=%DEPENDENCY_INSTALL_PATH%\bin;%AVTRANSCODER_INSTALL_PATH%\lib;%PATH% :: Get avtranscoder profiles -set AVPROFILES=%PWD%\build\share\avprofiles +set AVPROFILES=%AVTRANSCODER_INSTALL_PATH%\share\avprofiles :: Get assets git clone https://github.com/avTranscoder/avTranscoder-data.git From 7fc710afc1388f88cbe1d421da47287516f6bd56 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 16:24:29 +0100 Subject: [PATCH 10/16] Appveyor: deploy artifacts using github release * Fix 172 --- appveyor.yml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 23688e4d..fed23628 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,23 +35,24 @@ on_failure: - type "C:\ProgramData\chocolatey\logs\chocolatey.log" - type "C:\projects\avtranscoder\build\CMakeFiles\CMakeOutput.log" -#on_success: -# - create archives - -#artifacts: -# - path: C:\ProgramData\ffmpeg-2.2.11 -# name: ffmpeg -# type: zip - -# - path: C:\projects\avtranscoder\build -# name: avtranscoder -# type: zip - -#deploy: -# - provider: GitHub -# artifact: ffmpeg,avtranscoder -# auth_token: -# secure: -# on: -# branch: master -# appveyor_repo_tag: true +on_success: + - 7z a ffmpeg.zip %DEPENDENCY_INSTALL_PATH% + - 7z a avtranscoder.zip %AVTRANSCODER_INSTALL_PATH% + +artifacts: + - path: ffmpeg.zip + name: ffmpeg + type: zip + + - path: avtranscoder.zip + name: avtranscoder + type: zip + +deploy: + - provider: GitHub + artifact: ffmpeg,avtranscoder + auth_token: + secure: sApasbQe2i7Uu+XNhlkXg+F6zI0VNHUjhq5QfK6/+NSs4lX/9BwhkLvibQc6bmMv + on: + branch: master + appveyor_repo_tag: true From a5e58a13ccabcfb6836ef43acc33dcdc28221951 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 17:45:16 +0100 Subject: [PATCH 11/16] pyTest: removed check of format long name Because depending of ffmpeg compile options, format long name may not been defined. --- test/pyTest/testOutputFile.py | 3 --- test/pyTest/testSetFrame.py | 2 -- test/pyTest/testTranscoderRewrap.py | 1 - test/pyTest/testTranscoderTranscodeAudioMov.py | 1 - test/pyTest/testTranscoderTranscodeAudioWave.py | 4 ---- test/pyTest/testTranscoderTranscodeVideo.py | 3 --- 6 files changed, 14 deletions(-) diff --git a/test/pyTest/testOutputFile.py b/test/pyTest/testOutputFile.py index 6edfaf27..2a5dddb8 100644 --- a/test/pyTest/testOutputFile.py +++ b/test/pyTest/testOutputFile.py @@ -14,7 +14,6 @@ def testCreateOutputFileWithExtension(): assert_equals( ouputFile.getFilename(), outputFileName ) assert_equals( ouputFile.getFormatName(), formatName ) - assert_equals( ouputFile.getFormatLongName(), formatLongName ) @raises(IOError) @@ -38,7 +37,6 @@ def testCreateOutputFileWithoutExtensionWithFormat(): assert_equals( ouputFile.getFilename(), outputFileName ) assert_equals( ouputFile.getFormatName(), formatName ) - assert_equals( ouputFile.getFormatLongName(), formatLongName ) def testCreateOutputFileWithoutExtensionWithMimeType(): @@ -68,5 +66,4 @@ def testCreateOutputFileWithoutExtensionWithInconsistentFormatAndMimeType(): assert_equals( ouputFile.getFilename(), outputFileName ) assert_equals( ouputFile.getFormatName(), formatName ) - assert_equals( ouputFile.getFormatLongName(), formatLongName ) diff --git a/test/pyTest/testSetFrame.py b/test/pyTest/testSetFrame.py index 513167d5..b0807d03 100644 --- a/test/pyTest/testSetFrame.py +++ b/test/pyTest/testSetFrame.py @@ -49,7 +49,6 @@ def testSetVideoFrame(): dst_videoStream = dst_properties.getVideoProperties()[0] assert_equals( "mpeg2video", dst_videoStream.getCodecName() ) - assert_equals( "MPEG-2 video", dst_videoStream.getCodecLongName() ) assert_equals( 1920, dst_videoStream.getWidth() ) assert_equals( 1080, dst_videoStream.getHeight() ) assert_equals( 16, dst_videoStream.getDar().num ) @@ -102,7 +101,6 @@ def testSetAudioFrame(): dst_audioStream = dst_properties.getAudioProperties()[0] assert_equals( "pcm_s24le", dst_audioStream.getCodecName() ) - assert_equals( "PCM signed 24-bit little-endian", dst_audioStream.getCodecLongName() ) assert_equals( "s32", dst_audioStream.getSampleFormatName() ) assert_equals( "signed 32 bits", dst_audioStream.getSampleFormatLongName() ) assert_equals( 48000, dst_audioStream.getSampleRate() ) diff --git a/test/pyTest/testTranscoderRewrap.py b/test/pyTest/testTranscoderRewrap.py index 62833957..1e4b64e1 100644 --- a/test/pyTest/testTranscoderRewrap.py +++ b/test/pyTest/testTranscoderRewrap.py @@ -20,7 +20,6 @@ def checkFormat(src_properties, dst_properties): Check the values of the given format headers. """ assert_equals( src_properties.getFormatName(), dst_properties.getFormatName() ) - assert_equals( src_properties.getFormatLongName(), dst_properties.getFormatLongName() ) assert_equals( src_properties.getStartTime(), dst_properties.getStartTime() ) assert_equals( src_properties.getDuration(), dst_properties.getDuration() ) assert_greater_equal( src_properties.getBitRate(), dst_properties.getBitRate() ) diff --git a/test/pyTest/testTranscoderTranscodeAudioMov.py b/test/pyTest/testTranscoderTranscodeAudioMov.py index be578819..114466fc 100644 --- a/test/pyTest/testTranscoderTranscodeAudioMov.py +++ b/test/pyTest/testTranscoderTranscodeAudioMov.py @@ -47,7 +47,6 @@ def testTranscodeMovVariableNbSamplesPerFrame(): dst_audioStream = dst_properties.getAudioProperties()[0] assert_equals( "pcm_s24le", dst_audioStream.getCodecName() ) - assert_equals( "PCM signed 24-bit little-endian", dst_audioStream.getCodecLongName() ) def testTranscodeMovExtractChannels(): diff --git a/test/pyTest/testTranscoderTranscodeAudioWave.py b/test/pyTest/testTranscoderTranscodeAudioWave.py index 46b80499..9aceeb30 100644 --- a/test/pyTest/testTranscoderTranscodeAudioWave.py +++ b/test/pyTest/testTranscoderTranscodeAudioWave.py @@ -38,7 +38,6 @@ def testTranscodeWave24b48k5_1(): dst_audioStream = dst_properties.getAudioProperties()[0] assert_equals( "pcm_s24le", dst_audioStream.getCodecName() ) - assert_equals( "PCM signed 24-bit little-endian", dst_audioStream.getCodecLongName() ) assert_equals( "s32", dst_audioStream.getSampleFormatName() ) assert_equals( "signed 32 bits", dst_audioStream.getSampleFormatLongName() ) assert_equals( 48000, dst_audioStream.getSampleRate() ) @@ -72,7 +71,6 @@ def testTranscodeWave24b48kstereo(): dst_audioStream = dst_properties.getAudioProperties()[0] assert_equals( "pcm_s24le", dst_audioStream.getCodecName() ) - assert_equals( "PCM signed 24-bit little-endian", dst_audioStream.getCodecLongName() ) assert_equals( "s32", dst_audioStream.getSampleFormatName() ) assert_equals( "signed 32 bits", dst_audioStream.getSampleFormatLongName() ) assert_equals( 48000, dst_audioStream.getSampleRate() ) @@ -106,7 +104,6 @@ def testTranscodeWave24b48kmono(): dst_audioStream = dst_properties.getAudioProperties()[0] assert_equals( "pcm_s24le", dst_audioStream.getCodecName() ) - assert_equals( "PCM signed 24-bit little-endian", dst_audioStream.getCodecLongName() ) assert_equals( "s32", dst_audioStream.getSampleFormatName() ) assert_equals( "signed 32 bits", dst_audioStream.getSampleFormatLongName() ) assert_equals( 48000, dst_audioStream.getSampleRate() ) @@ -140,7 +137,6 @@ def testTranscodeWave16b48kmono(): dst_audioStream = dst_properties.getAudioProperties()[0] assert_equals( "pcm_s16le", dst_audioStream.getCodecName() ) - assert_equals( "PCM signed 16-bit little-endian", dst_audioStream.getCodecLongName() ) assert_equals( "s16", dst_audioStream.getSampleFormatName() ) assert_equals( "signed 16 bits", dst_audioStream.getSampleFormatLongName() ) assert_equals( 48000, dst_audioStream.getSampleRate() ) diff --git a/test/pyTest/testTranscoderTranscodeVideo.py b/test/pyTest/testTranscoderTranscodeVideo.py index 9b77dc59..9bdcfb63 100644 --- a/test/pyTest/testTranscoderTranscodeVideo.py +++ b/test/pyTest/testTranscoderTranscodeVideo.py @@ -39,7 +39,6 @@ def testTranscodeDnxhd120(): dst_videoStream = dst_properties.getVideoProperties()[0] assert_equals( "dnxhd", dst_videoStream.getCodecName() ) - assert_equals( "VC3/DNxHD", dst_videoStream.getCodecLongName() ) expectedBitRate = 120000000 deltaBitRate = expectedBitRate * 0.05 assert_almost_equals( expectedBitRate, dst_videoStream.getBitRate(), delta=deltaBitRate ) @@ -75,7 +74,6 @@ def testTranscodeDnxhd185(): dst_videoStream = dst_properties.getVideoProperties()[0] assert_equals( "dnxhd", dst_videoStream.getCodecName() ) - assert_equals( "VC3/DNxHD", dst_videoStream.getCodecLongName() ) expectedBitRate = 185000000 deltaBitRate = expectedBitRate * 0.05 assert_almost_equals( expectedBitRate, dst_videoStream.getBitRate(), delta=deltaBitRate ) @@ -111,7 +109,6 @@ def testTranscodeDnxhd185x(): dst_videoStream = dst_properties.getVideoProperties()[0] assert_equals( "dnxhd", dst_videoStream.getCodecName() ) - assert_equals( "VC3/DNxHD", dst_videoStream.getCodecLongName() ) expectedBitRate = 185000000 deltaBitRate = expectedBitRate * 0.05 assert_almost_equals( expectedBitRate, dst_videoStream.getBitRate(), delta=deltaBitRate ) From 83040285169163cceca7823cb1249c9dc007ef0e Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 18:44:37 +0100 Subject: [PATCH 12/16] Travis: allow failure with ffmpeg-2.8.x Currently the tests do not pass with this ffmpeg version. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 07c74d25..9c8717aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,8 @@ matrix: # build with libav - env: DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=true - env: DEPENDENCY_NAME=libav DEPENDENCY_VERSION=11.3 ENABLE_COVERAGE=false + # build with ffmpeg-2.8.6 + - env: DEPENDENCY_NAME=ffmpeg DEPENDENCY_VERSION=2.8.6 ENABLE_COVERAGE=false fast_finish: true # This results in a 2×2×2x2 build matrix. From e9cd5e1dfd6f546dd663cb36130f930b1d6aef15 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 15 Feb 2016 18:45:13 +0100 Subject: [PATCH 13/16] Travis: fixed compilation with libav --enable-postproc is an unknown option for libav. --- tools/travis/linux.install.deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index 7d9acdcb..02e19498 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -143,7 +143,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then export RELEASE_OPTIONS=--disable-debug export DEBUG_OPTIONS=--enable-debug=3\ --disable-optimizations\ --disable-sse\ --disable-stripping export LICENSING_OPTIONS=--enable-gpl\ --enable-nonfree - export THIRD_PARTIES_OPTIONS=--enable-libfaac\ --enable-libmp3lame\ --enable-libx264\ --enable-libxvid\ --enable-postproc\ --enable-avresample\ --enable-libfdk_aac\ --enable-libopus\ --enable-libvorbis\ --enable-libvpx + export THIRD_PARTIES_OPTIONS=--enable-libfaac\ --enable-libmp3lame\ --enable-libx264\ --enable-libxvid\ --enable-avresample\ --enable-libfdk_aac\ --enable-libopus\ --enable-libvorbis\ --enable-libvpx if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then @@ -158,7 +158,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then $COMPILE_OPTIONS \ $RELEASE_OPTIONS \ $LICENSING_OPTIONS \ - $THIRD_PARTIES_OPTIONS && \ + $THIRD_PARTIES_OPTIONS --enable-postproc && \ make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ make install && \ rm -rf ${DIR} From 720931d8c10a76cccafbec91c7c88d702f354122 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 16 Feb 2016 09:10:04 +0100 Subject: [PATCH 14/16] Travis: fixed build on OSX 'mktemp -d' command needs a template argument on OSX (not mandatory on linux). --- tools/travis/linux.install.deps.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index 02e19498..f1b1abc5 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -15,7 +15,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # yasm echo "Building YASM (${YASM_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d yasmXXX) && cd ${DIR} && \ curl -Os http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \ tar xzf yasm-${YASM_VERSION}.tar.gz && \ cd yasm-${YASM_VERSION} && \ @@ -27,7 +27,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # x264 echo "" echo "Building x264 (last version)" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d x264XXX) && cd ${DIR} && \ git clone --depth 1 git://git.videolan.org/x264 && \ cd x264 && \ ./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --disable-asm && \ @@ -38,7 +38,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # libmp3lame echo "" echo "Building libmp3lame (${LAME_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d libmp3lameXXX) && cd ${DIR} && \ curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION%.*}/lame-${LAME_VERSION}.tar.gz && \ tar xzf lame-${LAME_VERSION}.tar.gz && \ cd lame-${LAME_VERSION} && \ @@ -53,7 +53,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # http://sourceforge.net/p/faac/bugs/162/#46a0 echo "" echo "Building faac (${FAAC_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d faacXXX) && cd ${DIR} && \ curl -L -Os http://downloads.sourceforge.net/faac/faac-${FAAC_VERSION}.tar.gz && \ tar xzf faac-${FAAC_VERSION}.tar.gz && \ cd faac-${FAAC_VERSION} && \ @@ -67,7 +67,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # xvid echo "" echo "Building xvid (${XVID_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d xvidXXX) && cd ${DIR} && \ curl -L -Os http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \ tar xzf xvidcore-${XVID_VERSION}.tar.gz && \ cd xvidcore/build/generic && \ @@ -81,7 +81,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # Warning: need automake + libtool echo "" echo "Building fdk-aac (${FDKAAC_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d fdk-aacXXX) && cd ${DIR} && \ curl -s https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v${FDKAAC_VERSION} | tar zxf - && \ cd fdk-aac-${FDKAAC_VERSION} && \ autoreconf -fiv && \ @@ -93,7 +93,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # libogg echo "" echo "Building libogg (${OGG_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d liboggXXX) && cd ${DIR} && \ curl -O http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \ tar xzf libogg-${OGG_VERSION}.tar.gz && \ cd libogg-${OGG_VERSION} && \ @@ -105,7 +105,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # libvorbis echo "" echo "Building libvorbis (${VORBIS_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d libvorbisXXX) && cd ${DIR} && \ curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \ tar xzf libvorbis-${VORBIS_VERSION}.tar.gz && \ cd libvorbis-${VORBIS_VERSION} && \ @@ -118,7 +118,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # https://trac.ffmpeg.org/ticket/4956 echo "" echo "Building libvpx (${VPX_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d libvpxXXX) && cd ${DIR} && \ git clone https://github.com/webmproject/libvpx.git && \ cd libvpx && \ git checkout v${VPX_VERSION} && \ @@ -130,12 +130,12 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then # libopus echo "" echo "Building libopus (last version)" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d libopusXXX) && cd ${DIR} && \ git clone git://git.opus-codec.org/opus.git && \ cd opus && \ autoreconf -fiv && \ ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared --with-pic && \ - make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ + make -k && \ make install && \ rm -rf ${DIR} @@ -149,7 +149,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "" echo "Building ffmpeg (${DEPENDENCY_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d ffmpegXXX) && cd ${DIR} && \ curl -Os http://ffmpeg.org/releases/ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ tar xzf ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \ cd ffmpeg-${DEPENDENCY_VERSION} && \ @@ -167,7 +167,7 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then echo "" echo "Building libav (${DEPENDENCY_VERSION})" - DIR=$(mktemp -d) && cd ${DIR} && \ + DIR=$(mktemp -d libavXXX) && cd ${DIR} && \ curl -Os https://libav.org/releases/libav-${DEPENDENCY_VERSION}.tar.gz && \ tar xzf libav-${DEPENDENCY_VERSION}.tar.gz && \ cd libav-${DEPENDENCY_VERSION} && \ From 87bc40bebeafef3126bfe523f6e80ef081ff005c Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 16 Feb 2016 16:48:05 +0100 Subject: [PATCH 15/16] Travis: skip build of libopus Compile error on OSX. --- tools/travis/linux.install.deps.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tools/travis/linux.install.deps.sh b/tools/travis/linux.install.deps.sh index f1b1abc5..88e327ad 100755 --- a/tools/travis/linux.install.deps.sh +++ b/tools/travis/linux.install.deps.sh @@ -128,22 +128,23 @@ if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then rm -rf ${DIR} # libopus - echo "" - echo "Building libopus (last version)" - DIR=$(mktemp -d libopusXXX) && cd ${DIR} && \ - git clone git://git.opus-codec.org/opus.git && \ - cd opus && \ - autoreconf -fiv && \ - ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared --with-pic && \ - make -k && \ - make install && \ - rm -rf ${DIR} + # Compile error on OSX +# echo "" +# echo "Building libopus (last version)" +# DIR=$(mktemp -d libopusXXX) && cd ${DIR} && \ +# git clone git://git.opus-codec.org/opus.git && \ +# cd opus && \ +# autoreconf -fiv && \ +# ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared --with-pic && \ +# make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \ +# make install && \ +# rm -rf ${DIR} export COMPILE_OPTIONS=--extra-libs=-ldl\ --enable-small\ --enable-shared\ --disable-static export RELEASE_OPTIONS=--disable-debug export DEBUG_OPTIONS=--enable-debug=3\ --disable-optimizations\ --disable-sse\ --disable-stripping export LICENSING_OPTIONS=--enable-gpl\ --enable-nonfree - export THIRD_PARTIES_OPTIONS=--enable-libfaac\ --enable-libmp3lame\ --enable-libx264\ --enable-libxvid\ --enable-avresample\ --enable-libfdk_aac\ --enable-libopus\ --enable-libvorbis\ --enable-libvpx + export THIRD_PARTIES_OPTIONS=--enable-libfaac\ --enable-libmp3lame\ --enable-libx264\ --enable-libxvid\ --enable-avresample\ --enable-libfdk_aac\ --enable-libvorbis\ --enable-libvpx if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then From c3cdbac1a2cd546567dbff6dbca0b4216e16ec46 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 16 Feb 2016 16:48:43 +0100 Subject: [PATCH 16/16] INSTALL.md: updated Dependencies section --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index acb110e8..855fe534 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,8 +4,8 @@ AvTranscoder uses CMake as build system. #### Dependencies AvTranscoder can depend on ffmpeg, libav, or any fork of these projects that follow the same API. -* Recommended ffmpeg versions: 2.4.2, 2.4.5, 2.5.7 -* Recommended libav versions: 11.3 +* Tested ffmpeg versions: 2.4.2, 2.4.5, 2.5.7, 2.6.8, 2.7.6 +* Recommended libav versions: none #### To build ```