Skip to content

Instantly share code, notes, and snippets.

@hellosteadman
Created June 30, 2015 09:02
Show Gist options
  • Save hellosteadman/1072bcd768e967cf66f3 to your computer and use it in GitHub Desktop.
Save hellosteadman/1072bcd768e967cf66f3 to your computer and use it in GitHub Desktop.
An Ansible playbook include for installing ffmpeg on Ubuntu
---
- name: Install yasm
shell: 'chdir=/tmp {{ item }} creates=/usr/local/bin/yasm'
with_items:
- wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
- tar xzvf yasm-1.2.0.tar.gz
- cd yasm-1.2.0; ./configure && make && make install && make distclean
- name: Install x264
shell: 'chdir=/tmp {{ item }} creates=/usr/local/bin/x264'
with_items:
- wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
- tar xjvf last_x264.tar.bz2
- 'cd x264-snapshot*; PATH="$PATH:$HOME/bin" ./configure --enable-static && PATH="$PATH:$HOME/bin" make && make install && make distclean'
- name: Install AAC
shell: 'chdir=/tmp {{ item }} creates=/usr/local/include/fdk-aac/'
with_items:
- wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
- unzip fdk-aac.zip
- cd mstorsjo-fdk-aac*; autoreconf -fiv
- 'cd mstorsjo-fdk-aac*; ./configure --disable-shared && make && make install && make distclean'
- name: Install LAME
shell: 'chdir=/tmp {{ item }} creates=/usr/local/bin/lame'
with_items:
- wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
- tar xzvf lame-3.99.5.tar.gz
- 'cd lame-3.99.5; ./configure --enable-nasm --disable-shared && make && make install && make distclean'
- name: Install Opus
shell: 'chdir=/tmp {{ item }} creates=/usr/local/include/opus/'
with_items:
- wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
- tar xzvf opus-1.1.tar.gz
- 'cd opus-1.1; ./configure --disable-shared && make && make install && make distclean'
- name: Install VPX
shell: 'chdir=/tmp {{ item }} creates=/usr/local/include/vpx/'
with_items:
- git clone https://github.com/webmproject/libvpx/
- 'cd libvpx; ./configure --disable-examples && make && make install && make clean'
- name: Install ffmpeg
shell: 'chdir=/tmp {{ item }} creates=/usr/local/bin/ffmpeg'
with_items:
- wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
- tar xjvf ffmpeg-snapshot.tar.bz2
- 'cd ffmpeg; ./configure --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --extra-libs=-ldl && make && make install && make clean'
- name: Install iPod640 filter preset
copy: src='libx264-ipod640.ffpreset' dest='/usr/local/share/ffmpeg/libx264-ipod640.ffpreset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment