Skip to content

Travis: build ffmpeg/libav third parties #224

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

Merged
merged 16 commits into from
Feb 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,29 @@ 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
- 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
- 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:
Expand All @@ -39,6 +54,12 @@ 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
# 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.
Expand Down Expand Up @@ -83,12 +104,16 @@ 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
- 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
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand Down
43 changes: 23 additions & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,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: <your encrypted token>
# 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
2 changes: 1 addition & 1 deletion src/AvTranscoder/codec/AudioCodec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class AvExport AudioCodec : public ICodec
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/codec/DataCodec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ class AvExport DataCodec : public ICodec
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/codec/VideoCodec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class AvExport VideoCodec : public ICodec
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/decoder/AudioGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ class AvExport AudioGenerator : public IDecoder
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/encoder/AudioEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ class AvExport AudioEncoder : public IEncoder
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/encoder/IEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ class AvExport IEncoder
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/encoder/VideoEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ bool VideoEncoder::encodeFrame(CodedData& codedFrame)
return ret == 0;
#endif
}
}
}
2 changes: 1 addition & 1 deletion src/AvTranscoder/encoder/VideoEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ class AvExport VideoEncoder : public IEncoder
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/file/InputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,4 @@ std::ostream& operator<<(std::ostream& flux, const InputFile& input)

return flux;
}
}
}
2 changes: 1 addition & 1 deletion src/AvTranscoder/progress/IProgress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ class AvExport IProgress
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/progress/NoDisplayProgress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ class AvExport NoDisplayProgress : public IProgress
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/stream/IInputStream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ class AvExport IInputStream
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/stream/IOutputStream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ class AvExport IOutputStream
};
}

#endif
#endif
2 changes: 1 addition & 1 deletion src/AvTranscoder/stream/InputStream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class AvExport InputStream : public IInputStream
};
}

#endif
#endif
3 changes: 0 additions & 3 deletions test/pyTest/testOutputFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def testCreateOutputFileWithExtension():

assert_equals( ouputFile.getFilename(), outputFileName )
assert_equals( ouputFile.getFormatName(), formatName )
assert_equals( ouputFile.getFormatLongName(), formatLongName )


@raises(IOError)
Expand All @@ -38,7 +37,6 @@ def testCreateOutputFileWithoutExtensionWithFormat():

assert_equals( ouputFile.getFilename(), outputFileName )
assert_equals( ouputFile.getFormatName(), formatName )
assert_equals( ouputFile.getFormatLongName(), formatLongName )


def testCreateOutputFileWithoutExtensionWithMimeType():
Expand Down Expand Up @@ -68,5 +66,4 @@ def testCreateOutputFileWithoutExtensionWithInconsistentFormatAndMimeType():

assert_equals( ouputFile.getFilename(), outputFileName )
assert_equals( ouputFile.getFormatName(), formatName )
assert_equals( ouputFile.getFormatLongName(), formatLongName )

2 changes: 0 additions & 2 deletions test/pyTest/testSetFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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() )
Expand Down
1 change: 0 additions & 1 deletion test/pyTest/testTranscoderRewrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down
1 change: 0 additions & 1 deletion test/pyTest/testTranscoderTranscodeAudioMov.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
4 changes: 0 additions & 4 deletions test/pyTest/testTranscoderTranscodeAudioWave.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down Expand Up @@ -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() )
Expand Down Expand Up @@ -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() )
Expand Down Expand Up @@ -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() )
Expand Down
3 changes: 0 additions & 3 deletions test/pyTest/testTranscoderTranscodeVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion tools/appveyor/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tools/appveyor/python.nosetests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tools/travis/build.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading