PHRAS-1800 : add ffmpeg compilation and version as variable

This commit is contained in:
Moctar
2018-01-12 15:22:28 +01:00
parent 36e4b97f93
commit 48ebfa0541
3 changed files with 75 additions and 13 deletions

View File

@@ -4,16 +4,17 @@
vars_files:
- vars/all.yml
roles:
- server
- repositories
- vagrant_local
- nginx
- mariadb
- elasticsearch
- rabbitmq
- php
- xdebug
- composer
- mailcatcher
- node
- app
# - server
# - repositories
# - vagrant_local
# - nginx
# - mariadb
# - elasticsearch
# - rabbitmq
# - php
# - xdebug
# - composer
# - mailcatcher
# - node
# - app
- ffmpeg

View File

@@ -0,0 +1,57 @@
---
# This playbook will compile and install FFmpeg and dependencies for Phraseanet
- name: Install dependencies for ffmpeg compilation
apt: pkg={{ item }} state=latest
with_items:
- yasm
- libvorbis-dev
- texi2html
- nasm
- zlib1g-dev
- libx264-dev
- libfdk-aac-dev
- libopus-dev
- libvpx-dev
- libmp3lame-dev
- libogg-dev
- libfaac-dev
- libopencore-amrnb-dev
- libopencore-amrwb-dev
- libdc1394-22-dev
- libx11-dev
- libswscale-dev
- libpostproc-dev
- libxvidcore-dev
- libtheora-dev
- libgsm1-dev
- libfreetype6-dev
# Download FFMPEG
- name: ffmpeg | Download
get_url: url=http://ffmpeg.org/releases/ffmpeg-{{ ffmpeg.version }}.tar.gz dest=/tmp/ffmpeg-{{ ffmpeg.version }}.tar.gz
- name: ffmpeg | Untar
shell: tar xzvf ffmpeg-{{ ffmpeg.version }}.tar.gz
args:
chdir: "/tmp"
creates: "/tmp/ffmpeg-{{ ffmpeg.version }}"
- name: Compile | ffmpeg
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
args:
chdir: "/tmp/ffmpeg-{{ ffmpeg.version }}"
with_items:
- ./configure --enable-gpl --enable-nonfree --enable-libfaac --enable-libfdk_aac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libopus --enable-libx264 --enable-libxvid --enable-zlib --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb
- make
- make install
- make distclean
- name: delete ffmpeg sources files
file:
path: "{{ item }}"
state: absent
with_items:
- "/tmp/ffmpeg-{{ ffmpeg.version }}"
- "/tmp/ffmpeg-{{ ffmpeg.version }}.tar.gz"

View File

@@ -84,6 +84,7 @@ php:
- 'php-zmq'
- 'php-amqp'
node:
install: '1'
version: '9.4.0'
xdebug:
install: '1'
@@ -96,3 +97,6 @@ composer:
mailcatcher:
install: '1'
ffmpeg:
install: '1'
version: '3.1.10'