From 937c55fdd531a858eba1b8f4d1a8dafec380ed46 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Sun, 18 Feb 2018 22:06:10 +0100
Subject: [PATCH] Install ffmpeg and magic

---
 api/Dockerfile             | 2 +-
 api/docker/Dockerfile.test | 3 ++-
 api/requirements.apt       | 3 ++-
 api/requirements/base.txt  | 2 ++
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/api/Dockerfile b/api/Dockerfile
index 3281e6f5..5d4e8585 100644
--- a/api/Dockerfile
+++ b/api/Dockerfile
@@ -3,7 +3,7 @@ FROM python:3.5
 ENV PYTHONUNBUFFERED 1
 
 # Requirements have to be pulled and installed here, otherwise caching won't work
-
+RUN echo 'deb http://httpredir.debian.org/debian/ jessie-backports main' > /etc/apt/sources.list.d/ffmpeg.list
 COPY ./requirements.apt /requirements.apt
 RUN apt-get update -qq && grep "^[^#;]" requirements.apt | xargs apt-get install -y
 RUN curl -L https://github.com/acoustid/chromaprint/releases/download/v1.4.2/chromaprint-fpcalc-1.4.2-linux-x86_64.tar.gz | tar -xz -C /usr/local/bin --strip 1
diff --git a/api/docker/Dockerfile.test b/api/docker/Dockerfile.test
index 08b437cf..069b89c2 100644
--- a/api/docker/Dockerfile.test
+++ b/api/docker/Dockerfile.test
@@ -1,9 +1,10 @@
 FROM python:3.5
 
 ENV PYTHONUNBUFFERED 1
-ENV PYTHONDONTWRITEBYTECODE  1
+ENV PYTHONDONTWRITEBYTECODE 1
 
 # Requirements have to be pulled and installed here, otherwise caching won't work
+RUN echo 'deb http://httpredir.debian.org/debian/ jessie-backports main' > /etc/apt/sources.list.d/ffmpeg.list
 COPY ./requirements.apt /requirements.apt
 COPY ./install_os_dependencies.sh /install_os_dependencies.sh
 RUN bash install_os_dependencies.sh install
diff --git a/api/requirements.apt b/api/requirements.apt
index e28360b5..462a5a70 100644
--- a/api/requirements.apt
+++ b/api/requirements.apt
@@ -5,6 +5,7 @@ libjpeg-dev
 zlib1g-dev
 libpq-dev
 postgresql-client
-libav-tools
+libmagic-dev
+ffmpeg
 python3-dev
 curl
diff --git a/api/requirements/base.txt b/api/requirements/base.txt
index f38da962..133fcc0c 100644
--- a/api/requirements/base.txt
+++ b/api/requirements/base.txt
@@ -57,3 +57,5 @@ git+https://github.com/EliotBerriot/django-cachalot.git@django-2
 django-dynamic-preferences>=1.5,<1.6
 pyacoustid>=1.1.5,<1.2
 raven>=6.5,<7
+python-magic==0.4.15
+ffmpeg-python==0.1.10
-- 
GitLab