Skip to content

Commit

Permalink
Close #18. We have to custom compile FFmpeg per Islandora Video SP re…
Browse files Browse the repository at this point in the history
…quirements.
  • Loading branch information
ruebot committed Nov 8, 2014
1 parent c948701 commit f097b47
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 14 deletions.
15 changes: 13 additions & 2 deletions attributes/default.rb
Expand Up @@ -70,7 +70,6 @@
'poppler-utils',

# media-handling libraries
'ffmpeg',
'ffmpeg2theora',
'lame',
'libavcodec-extra-53',
Expand Down Expand Up @@ -235,7 +234,13 @@
default['tesseract_engdata']['sha256'] = 'c110029560e7f6d41cb852ca23b66899daa4456d9afeeae9d062204bd271bdf8'
default['tesseract_engdata']['version'] = '3.02'
default['tesseract_engdata']['installpath'] = '/usr/local/share/tessdata'


# FFmpeg specific
default['ffmpeg']['sha256'] = '3385f7e0d2aa1f57049ecf8a2f6f88f302141b442d895c89b7565b16b8835969'
default['ffmpeg']['version'] = '1.1.4'
default['ffmpeg']['installpath'] = '/usr/local/ffmpeg-1.1.4'
default['ffmpeg']['binarypath'] = '/usr/local/bin/ffmpeg'

# Audio collection specific
default['audio']['lamearg'] = "/usr/bin/lame"

Expand Down Expand Up @@ -395,6 +400,12 @@
'variable' => "islandora_ocr_tesseract",
'value' => default['tesseract']['binarypath'],
},
{
'name' => 'set_default_ffmpeg_path',
'action' => :php_eval,
'variable' => 'islandora_video_ffmpeg_path',
'value' => default['ffmpeg']['binarypath'],
},
{
'name' => 'set_default_large_image_viewer',
'action' => :php_eval_noquote,
Expand Down
3 changes: 1 addition & 2 deletions recipes/default.rb
Expand Up @@ -28,6 +28,5 @@

# Drupal Frontend
include_recipe 'drupal::install'
include_recipe 'islandora::ffmpeg' # This has to be included before we start installing Islandora packages
include_recipe 'islandora::frontend'
include_recipe 'islandora::frontend-custom'
include_recipe 'islandora::frontend-custom'
10 changes: 0 additions & 10 deletions recipes/ffmpeg.rb

This file was deleted.

29 changes: 29 additions & 0 deletions recipes/frontend-custom.rb
Expand Up @@ -201,6 +201,35 @@
ignore_failure false
end

# FFmpeg
#install libfaac (this is non-free, but required for MP4 streaming derivatives)
execute "sudo sed -i '/^# deb.*multiverse/ s/^# //' /etc/apt/sources.list && sudo apt-get update && sudo apt-get install libfaac-dev -y --force-yes" do
environment ({'DEBIAN_FRONTEND' => 'noninteractive'})
ignore_failure false
end

# install requirements
execute "sudo apt-get install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev yasm libx264-dev libmp3lame-dev unzip x264 libgsm1-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenjpeg-dev libschroedinger-dev libspeex-dev libvpx-dev libxvidcore-dev libdc1394-22-dev -y --force-yes" do
environment ({'DEBIAN_FRONTEND' => 'noninteractive'})
ignore_failure false
end

# download FFmpeg source
ark 'ffmpeg' do
url "http://www.ffmpeg.org/releases/ffmpeg-#{node['ffmpeg']['version']}.tar.gz"
version node['ffmpeg']['version']
checksum node['ffmpeg']['sha256']
home_dir node['ffmpeg']['install_path']
end

# run make commands on FFmpeg source to build it
execute "ffmpeg build from source" do
environment ({'DEBIAN_FRONTEND' => 'noninteractive'})
command "cd #{node['ffmpeg']['installpath']} && sudo ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid && sudo make && sudo make install && sudo ldconfig"
creates "/usr/local/bin/ffmpeg"
ignore_failure false
end

# use Drush to install Islandora solution pack objects
node['islandora']['solution_pack_objects'].each do |param|
drupal_module param do
Expand Down

0 comments on commit f097b47

Please sign in to comment.