erikkaashoek / Comskip

A free commercial detector
GNU General Public License v2.0
598 stars 80 forks source link

Comskip

Commercial detector http://www.kaashoek.com/comskip/

Example Comskip image Commercials are marked and skipped using associated projects.

Requirements

Building

Building from GitHub

Building directly from GitHub also requires GNU autotools (autoconf, automake, and libtool).

$ git clone git://github.com/erikkaashoek/Comskip
$ cd Comskip
$ ./autogen.sh
$ ./configure
$ make

Building from a tarball

$ tar zxpfv comskip-<version>.tar.gz
$ cd comskip-<version>
$ ./configure
$ make

Setting up a build environment

Windows

There are many ways to setup a build system on Windows.

Cross Compile with Ubuntu Bionic (18.04) with MinGW-w64
$ sudo apt-get install -y subversion curl texinfo g++ bison flex cvs yasm automake libtool autoconf gcc cmake git make pkg-config zlib1g-dev mercurial unzip pax nasm gperf autogen bzip2
$ git clone https://github.com/erikkaashoek/Comskip.git
$ cd Comskip
$ ./cross_compile_comskip.sh
MSYS2 and MinGW-w64

These instructions use MSYS2 and MinGW-w64, but other environments should also work:

Mac OS X

First install Xcode (freely available from the Mac OS X App Store). After it's installed, install the Xcode command-line tools by executing xcode-select --install from a terminal.

The easiest way to install Comskip's dependencies is via Homebrew (http://brew.sh/):

$ brew install autoconf automake libtool pkgconfig argtable ffmpeg sdl

Macports natively compiles all libraries from source. The project etv-comskip has an example Makefile using Macports tools.

$ sudo port install ffmpeg coreutils argtable

Linux

Ubuntu Xenial (16.04)
$ apt-get install -y autoconf libtool git build-essential libargtable2-dev libavformat-dev libsdl1.2-dev
Ubuntu Vivid (15.04)
$ apt-get install -y git build-essential libargtable2-dev libavformat-ffmpeg-dev libsdl1.2-dev
Ubuntu Trusty (14.04)
$ add-apt-repository -y ppa:mc3man/trusty-media
$ apt-get update

$ apt-get install -y git build-essential libargtable2-dev libsdl1.2-dev
$ apt-get install -y ffmpeg libva-dev libsoxr-dev libvorbis-dev libbz2-dev zlib1g-dev libxvidcore-dev libvpx-dev libx264-dev libx265-dev libspeex-dev libfdk-aac-dev libvorbisenc2 libopus-dev libmp3lame-dev libdca-dev libfaac-dev libopencore-amrnb-dev libvo-aacenc-dev libopencore-amrwb-dev

$ git clone https://github.com/foo86/dcadec
$ cd dcadec
$ make install
Ubuntu Precise (12.04)
$ add-apt-repository -y ppa:pavlyshko/precise
$ add-apt-repository -y ppa:chris-lea/zeromq
$ apt-get update

$ wget https://launchpad.net/ubuntu/+archive/primary/+files/libfdk-aac0_0.1.1%2B20130514-2_amd64.deb
$ wget https://launchpad.net/ubuntu/+archive/primary/+files/libopus0_1.0.1-0ubuntu2_amd64.deb
$ wget https://launchpadlibrarian.net/205263953/libwebp5_0.4.1-1.2pmo1%7Eprecise_amd64.deb
$ dpkg -i libfdk-aac0_0.1.1+20130514-2_amd64.deb
$ dpkg -i libopus0_1.0.1-0ubuntu2_amd64.deb
$ dpkg -i libwebp5_0.4.1-1.2pmo1~precise_amd64.deb

$ apt-get install -y git build-essential libargtable2-dev libsdl1.2-dev
$ apt-get install -y ffmpeg-opti libavformat-ffmpeg-opti-dev

Building static binaries

You can build a static binary by passing the --enable-static parameter to configure, but beware the following caveats:

Ini file

You can find ini files at: http://www.kaashoek.com/comskip/