Skip to content
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
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ubuntu:16.04

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends python python-dev python-pip build-essential cmake git pkg-config libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libatlas-base-dev gfortran libavresample-dev libgphoto2-dev libgstreamer-plugins-base1.0-dev libdc1394-22-dev \
&& cd /opt \
&& git clone https://github.com/opencv/opencv.git \
&& cd opencv \
&& git checkout 3.4.0 \
&& mkdir build \
&& cd build \
&& cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF /opt/opencv \
&& make -j $(nproc) \
&& make install \
&& ldconfig \
&& rm -rf /opt/opencv*

# Install animeloop-cli required packages
RUN apt-get install -y cmake git pkg-config \
&& apt-get install -y libboost-all-dev \
&& apt-get install -y ffmpeg x264 x265 \
&& apt-get install -y libjsoncpp-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Build animeloop-cli
RUN git clone https://github.com/moeoverflow/animeloop-cli.git \
&& cd animeloop-cli \
&& git submodule init && git submodule update \
&& mkdir build && cd build \
&& cmake .. \
&& make animeloop-cli \
&& cp /animeloop-cli/build/animeloop-cli /usr/bin \
&& chmod +x /usr/bin/animeloop-cli

ENTRYPOINT [ "/usr/bin/animeloop-cli"]
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ Animeloop command line tool. The goal of this project is to automatically find a
yaourt -S animeloop-cli
```

### Docker

```Shell
docker build -t animeloop-cli .

# You should change these path: /path/to/input/file.mp4 and /path/to/ouput
docker run \
-v /path/to/input/file.mp4:/data/file.mp4 \
-v /path/to/ouput:/loops \
--rm \
animeloop-cli \
-i /data/file.mp4 \
-o /loops
```

### Install manually

#### Modules Init
Expand Down Expand Up @@ -128,19 +143,19 @@ unzip -p ffmpeg-3.4.2-win64-static.zip ffmpeg-3.4.2-win64-static/bin/ffmpeg.exe
##### Windows via Microsoft Visual Studio

- Download and install [Microsoft Visual Studio](https://visualstudio.microsoft.com/)

> Will uses Visual Studio 2015 Enterprise (VC14) as example for below.

- Download [CMake-GUI](https://cmake.org/download/)

- Download [Boost prebuilt library](https://sourceforge.net/projects/boost/files/boost-binaries/) for VC14

> You may need a older version (< 1.66.0) in case of some unknown bug.

- Download [OpenCV prebuilt library](https://opencv.org/releases/) for Windows

> OpenCV should be 3.2+ but not 4.x

- Download [HDF5 prebuilt library](https://www.hdfgroup.org/downloads/hdf5) for VC14
> You may need an account to download the file, you can register for free or build your own.
> If you don't want to install the msi package, run `msiexec /a drive:\path\to\file.msi /qb TARGETDIR=drive:\path\to\extract`
Expand Down