abrizer 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +91 -0
- data/Rakefile +10 -0
- data/Vagrantfile +76 -0
- data/abrizer.gemspec +31 -0
- data/ansible/development-playbook.retry +1 -0
- data/ansible/development-playbook.yml +19 -0
- data/ansible/development.ini +2 -0
- data/ansible/roles/basic-setup/tasks/main.yml +39 -0
- data/ansible/roles/bento4/tasks/main.yml +14 -0
- data/ansible/roles/ffmpeg/defaults/main.yml +6 -0
- data/ansible/roles/ffmpeg/tasks/ff-libraries.yml +21 -0
- data/ansible/roles/ffmpeg/tasks/ffmpeg.yml +18 -0
- data/ansible/roles/ffmpeg/tasks/libfdk_aac.yml +19 -0
- data/ansible/roles/ffmpeg/tasks/libmp3lame.yml +20 -0
- data/ansible/roles/ffmpeg/tasks/libogg.yml +18 -0
- data/ansible/roles/ffmpeg/tasks/libopus.yml +20 -0
- data/ansible/roles/ffmpeg/tasks/libvorbis.yml +18 -0
- data/ansible/roles/ffmpeg/tasks/libvpx.yml +18 -0
- data/ansible/roles/ffmpeg/tasks/main.yml +80 -0
- data/ansible/roles/ffmpeg/tasks/x264.yml +18 -0
- data/ansible/roles/ffmpeg/tasks/x265.yml +14 -0
- data/ansible/roles/ffmpeg/tasks/yasm.yml +19 -0
- data/ansible/roles/franklinkim.environment/.clog.toml +4 -0
- data/ansible/roles/franklinkim.environment/.editorconfig +16 -0
- data/ansible/roles/franklinkim.environment/.gitignore +2 -0
- data/ansible/roles/franklinkim.environment/.travis.yml +17 -0
- data/ansible/roles/franklinkim.environment/CHANGELOG.md +14 -0
- data/ansible/roles/franklinkim.environment/LICENSE +22 -0
- data/ansible/roles/franklinkim.environment/Makefile +11 -0
- data/ansible/roles/franklinkim.environment/README.md +100 -0
- data/ansible/roles/franklinkim.environment/Vagrantfile +23 -0
- data/ansible/roles/franklinkim.environment/defaults/main.yml +13 -0
- data/ansible/roles/franklinkim.environment/meta/.galaxy_install_info +1 -0
- data/ansible/roles/franklinkim.environment/meta/main.yml +143 -0
- data/ansible/roles/franklinkim.environment/meta/readme.yml +11 -0
- data/ansible/roles/franklinkim.environment/tasks/config.yml +21 -0
- data/ansible/roles/franklinkim.environment/tasks/main.yml +8 -0
- data/ansible/roles/franklinkim.environment/tests/main.yml +8 -0
- data/ansible/roles/rvm_io.rvm1-ruby/.gitignore +6 -0
- data/ansible/roles/rvm_io.rvm1-ruby/.travis.yml +52 -0
- data/ansible/roles/rvm_io.rvm1-ruby/LICENSE +22 -0
- data/ansible/roles/rvm_io.rvm1-ruby/README.md +142 -0
- data/ansible/roles/rvm_io.rvm1-ruby/defaults/main.yml +44 -0
- data/ansible/roles/rvm_io.rvm1-ruby/meta/main.yml +21 -0
- data/ansible/roles/rvm_io.rvm1-ruby/tasks/main.yml +4 -0
- data/ansible/roles/rvm_io.rvm1-ruby/tasks/rubies.yml +78 -0
- data/ansible/roles/rvm_io.rvm1-ruby/tasks/rvm.yml +55 -0
- data/ansible/roles/rvm_io.rvm1-ruby/tests/inventory +1 -0
- data/ansible/roles/rvm_io.rvm1-ruby/tests/test.yml +14 -0
- data/ansible/roles/rvm_io.rvm1-ruby/vars/main.yml +22 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/abrizer +5 -0
- data/lib/abrizer/adaptation.rb +53 -0
- data/lib/abrizer/adaptation_finder.rb +59 -0
- data/lib/abrizer/all.rb +20 -0
- data/lib/abrizer/cleaner.rb +37 -0
- data/lib/abrizer/cli.rb +84 -0
- data/lib/abrizer/ffmpeg_processor.rb +59 -0
- data/lib/abrizer/ffprobe_informer.rb +69 -0
- data/lib/abrizer/filepath_helpers.rb +33 -0
- data/lib/abrizer/package_dash_bento.rb +35 -0
- data/lib/abrizer/package_dash_shaka.rb +49 -0
- data/lib/abrizer/package_hls_bento.rb +35 -0
- data/lib/abrizer/package_hls_shaka.rb +50 -0
- data/lib/abrizer/processor.rb +8 -0
- data/lib/abrizer/progressive_mp4.rb +37 -0
- data/lib/abrizer/progressive_vp9.rb +57 -0
- data/lib/abrizer/sprites.rb +24 -0
- data/lib/abrizer/version.rb +3 -0
- data/lib/abrizer.rb +22 -0
- metadata +232 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b31f79c3371e0fed7e639734c2a5480274946c14
|
4
|
+
data.tar.gz: aad270f032d907ac4a949d0b62ac5a8571bf7db8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 862184366c07a709617e33fe30ffa0dc1e1337b42813a862797620a624182210473870ef94094b0ab7e466d4a8d1c76f501b44507656a41e3b56af927ca6886a
|
7
|
+
data.tar.gz: b64b33fd21d00ffb2e63634eda4e9351f3e9b4fbbccb096213dce957b776fb45ac6e3560738e6422ad40f5f11a2bce8cdb16a9d279cf1065d94e8285f2fe2a24
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 North Carolina State University
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# Abrizer
|
2
|
+
|
3
|
+
Abrizer takes a source video and creates various derivatives for delivery including adaptive bitrate formats like DASH and HLS.
|
4
|
+
|
5
|
+
## Requirements
|
6
|
+
|
7
|
+
See `ansible/development-playbook.yml` for specifics on all requirements.
|
8
|
+
|
9
|
+
- ffmpeg with x264 and libvpx
|
10
|
+
- bento4
|
11
|
+
- Imagemagick (convert and montage) for sprites
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'abrizer'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install abrizer
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
Abrizer knows how to run various processes which can take a master or mezzanine video and create DASH and HLS streaming formats along with other derivatives like a fallback MP4 and WebM. The gem is opinionated about what formats to create and what settings to use. The intention is to provide a relatively complete but simple solution for delivering video over HTTP.
|
32
|
+
|
33
|
+
Some steps must be run after others as they have preconditions in order for subsequent steps to run. Later cleaning steps will remove intermediate and log files. You can see the latest full set of processes Abrizer can run by looking in `lib/abrizer/cli.rb` for the `abr` method. The current order is:
|
34
|
+
|
35
|
+
- `process`: Process the adaptations that will be repackaged into ABR formats
|
36
|
+
- `package dash`: Package DASH (and HLS with fMP4) using output of `process`
|
37
|
+
- `package hls`: Package HLS (TS) using output of `process`
|
38
|
+
- `mp4`: Process a progressive download MP4 from original
|
39
|
+
- `vp9`: Process a progressive download WebM VP9 from original
|
40
|
+
- `sprites`: Create video sprites and metadata WebVTT file retaining all the images in order for a human to later pick a poster image
|
41
|
+
- `clean`: Clean out the intermediate and log files including MP4 files used for packaging but not required for delivery
|
42
|
+
|
43
|
+
Every command requires the path to the original video file and an output directory.
|
44
|
+
|
45
|
+
### Command Line
|
46
|
+
|
47
|
+
From the command line you can see help with: `abrizer`
|
48
|
+
|
49
|
+
To see help for a particular command run: `abrizer help abr`
|
50
|
+
|
51
|
+
You can run all steps with:
|
52
|
+
`abrizer all /path/to/video.mp4 /path/to/output_directory`
|
53
|
+
|
54
|
+
Or just create various adaptations needed for repackaging to DASH and HLS:
|
55
|
+
`abrizer process /path/to/video.mp4 /path/to/output_directory`
|
56
|
+
|
57
|
+
Then once `process` is run it is possible to do packaging to adaptive bitrate formats like DASH:
|
58
|
+
|
59
|
+
`abrizer package dash /path/to/video.mp4 /path/to/output_directory`
|
60
|
+
|
61
|
+
The output for DASH will go in the `fmp4` directory as the fragmented MP4 can be used for both DASH (stream.mpd) and the latest HLS on iOS 10+ (master.m3u8).
|
62
|
+
|
63
|
+
HLS with MPEG-2 TS files can also be created after `process` is run with the output in the `hls` directory:
|
64
|
+
|
65
|
+
`abrizer package hls /path/to/video.mp4 /path/to/output_directory`
|
66
|
+
|
67
|
+
### Using as a Library
|
68
|
+
|
69
|
+
If you simply want to run all the steps, you can use the `Abrizer::All` class like so:
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
video_path = "/path/to/video.mp4"
|
73
|
+
output_directory = "/path/to/output_directory"
|
74
|
+
Abrizer::All.new(video_path, output_directory).run
|
75
|
+
```
|
76
|
+
|
77
|
+
Take a look at `lib/abrizer/all.rb` for how to use the various classes provided. You can also see more examples in `lib/abrizer/cli.rb`. All classes expect to be passed the fully expanded path.
|
78
|
+
|
79
|
+
## Development
|
80
|
+
|
81
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
82
|
+
|
83
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
84
|
+
|
85
|
+
## Contributing
|
86
|
+
|
87
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/jronallo/abrizer.
|
88
|
+
|
89
|
+
## License
|
90
|
+
|
91
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/Vagrantfile
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
Vagrant.configure("2") do |config|
|
5
|
+
config.vm.box = "boxcutter/centos72"
|
6
|
+
|
7
|
+
config.vm.synced_folder '.', '/vagrant' #, type: 'nfs', mount_options: ['nolock', 'rw', 'vers=3', 'tcp', 'actimeo=2']
|
8
|
+
|
9
|
+
config.vm.provider "virtualbox" do |vb|
|
10
|
+
vb.linked_clone = true
|
11
|
+
vb.memory = 1024
|
12
|
+
vb.cpus = 1
|
13
|
+
end
|
14
|
+
|
15
|
+
config.vm.provision "ansible_local" do |ansible|
|
16
|
+
ansible.playbook = 'ansible/development-playbook.yml'
|
17
|
+
ansible.inventory_path = 'ansible/development.ini'
|
18
|
+
ansible.limit = 'all'
|
19
|
+
# ansible.verbose = 'vvvv'
|
20
|
+
end
|
21
|
+
|
22
|
+
# Disable automatic box update checking. If you disable this, then
|
23
|
+
# boxes will only be checked for updates when the user runs
|
24
|
+
# `vagrant box outdated`. This is not recommended.
|
25
|
+
# config.vm.box_check_update = false
|
26
|
+
|
27
|
+
# Create a forwarded port mapping which allows access to a specific port
|
28
|
+
# within the machine from a port on the host machine. In the example below,
|
29
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
30
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
31
|
+
|
32
|
+
# Create a private network, which allows host-only access to the machine
|
33
|
+
# using a specific IP.
|
34
|
+
# config.vm.network "private_network", ip: "192.168.33.10"
|
35
|
+
|
36
|
+
# Create a public network, which generally matched to bridged network.
|
37
|
+
# Bridged networks make the machine appear as another physical device on
|
38
|
+
# your network.
|
39
|
+
# config.vm.network "public_network"
|
40
|
+
|
41
|
+
# Share an additional folder to the guest VM. The first argument is
|
42
|
+
# the path on the host to the actual folder. The second argument is
|
43
|
+
# the path on the guest to mount the folder. And the optional third
|
44
|
+
# argument is a set of non-required options.
|
45
|
+
# config.vm.synced_folder "../data", "/vagrant_data"
|
46
|
+
|
47
|
+
# Provider-specific configuration so you can fine-tune various
|
48
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
49
|
+
# Example for VirtualBox:
|
50
|
+
#
|
51
|
+
# config.vm.provider "virtualbox" do |vb|
|
52
|
+
# # Display the VirtualBox GUI when booting the machine
|
53
|
+
# vb.gui = true
|
54
|
+
#
|
55
|
+
# # Customize the amount of memory on the VM:
|
56
|
+
# vb.memory = "1024"
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# View the documentation for the provider you are using for more
|
60
|
+
# information on available options.
|
61
|
+
|
62
|
+
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
|
63
|
+
# such as FTP and Heroku are also available. See the documentation at
|
64
|
+
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
|
65
|
+
# config.push.define "atlas" do |push|
|
66
|
+
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
|
67
|
+
# end
|
68
|
+
|
69
|
+
# Enable provisioning with a shell script. Additional provisioners such as
|
70
|
+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
71
|
+
# documentation for more information about their specific syntax and use.
|
72
|
+
# config.vm.provision "shell", inline: <<-SHELL
|
73
|
+
# apt-get update
|
74
|
+
# apt-get install -y apache2
|
75
|
+
# SHELL
|
76
|
+
end
|
data/abrizer.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'abrizer/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "abrizer"
|
8
|
+
spec.version = Abrizer::VERSION
|
9
|
+
spec.authors = ["Jason Ronallo"]
|
10
|
+
spec.email = ["jronallo@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Creates MPEG-DASH and HLS streams from a video file.}
|
13
|
+
spec.description = %q{Creates adaptive bitrate streams and other delivery derivatives.}
|
14
|
+
spec.homepage = "https://github.com/jronallo/abrizer"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
25
|
+
spec.add_development_dependency "colorize"
|
26
|
+
spec.add_development_dependency "bundler-audit"
|
27
|
+
|
28
|
+
spec.add_dependency "thor"
|
29
|
+
spec.add_dependency 'json'
|
30
|
+
spec.add_dependency 'video_sprites', '0.2.0'
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
localhost
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
- hosts: abrizer
|
3
|
+
become: yes
|
4
|
+
become_method: sudo
|
5
|
+
become_user: root
|
6
|
+
remote_user: root
|
7
|
+
gather_facts: yes
|
8
|
+
roles:
|
9
|
+
- role: basic-setup
|
10
|
+
- role: franklinkim.environment
|
11
|
+
environment_config:
|
12
|
+
PATH: /usr/local/bento4/bin:/usr/bin:/usr/local/bin
|
13
|
+
- role: ffmpeg
|
14
|
+
build_dir: /root/ffmpeg_build
|
15
|
+
source_dir: /root/ffmpeg_sources
|
16
|
+
- role: rvm_io.rvm1-ruby
|
17
|
+
rvm1_rubies:
|
18
|
+
- 2.3.3
|
19
|
+
- role: bento4
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
- name: install epel-release
|
3
|
+
yum:
|
4
|
+
name: epel-release
|
5
|
+
state: present
|
6
|
+
- name: install git repo
|
7
|
+
yum:
|
8
|
+
name: http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
|
9
|
+
state: present
|
10
|
+
- name: install required packages
|
11
|
+
yum:
|
12
|
+
pkg: "{{item}}"
|
13
|
+
state: present
|
14
|
+
update_cache: yes
|
15
|
+
with_items:
|
16
|
+
- git
|
17
|
+
- curl
|
18
|
+
- zlib
|
19
|
+
- zlib-devel
|
20
|
+
- gcc-c++
|
21
|
+
- readline
|
22
|
+
- readline-devel
|
23
|
+
- libyaml-devel
|
24
|
+
- libffi-devel
|
25
|
+
- openssl-devel
|
26
|
+
- make
|
27
|
+
- bzip2
|
28
|
+
- autoconf
|
29
|
+
- automake
|
30
|
+
- libtool
|
31
|
+
- bison
|
32
|
+
- vim
|
33
|
+
- htop
|
34
|
+
- vorbis-tools
|
35
|
+
- gettext-devel
|
36
|
+
- perl-CPAN
|
37
|
+
- perl-devel
|
38
|
+
- zlib-devel
|
39
|
+
- tree
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
- name: download bento4
|
3
|
+
get_url:
|
4
|
+
url: http://zebulon.bok.net/Bento4/binaries/Bento4-SDK-1-5-0-613.x86_64-unknown-linux.zip
|
5
|
+
dest: ~/bento4.zip
|
6
|
+
- name: unzip bento4
|
7
|
+
unarchive:
|
8
|
+
copy: no
|
9
|
+
src: ~/bento4.zip
|
10
|
+
dest: ~/.
|
11
|
+
- name: create /usr/local/bento4/
|
12
|
+
file: path=/usr/local/bento4/ state=directory
|
13
|
+
- name: move bento4
|
14
|
+
shell: mv ~/Bento4-SDK-1-5-0-613.x86_64-unknown-linux/* /usr/local/bento4/.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
- name: remove yum packaged ffmpeg
|
3
|
+
become: yes
|
4
|
+
yum: name=ffmpeg state=absent
|
5
|
+
|
6
|
+
- name: Install dependencies
|
7
|
+
yum: name={{ item }} state=present
|
8
|
+
with_items:
|
9
|
+
- autoconf
|
10
|
+
- automake
|
11
|
+
- cmake
|
12
|
+
- freetype-devel
|
13
|
+
- gcc
|
14
|
+
- gcc-c++
|
15
|
+
- git
|
16
|
+
- libtool
|
17
|
+
- make
|
18
|
+
- mercurial
|
19
|
+
- nasm
|
20
|
+
- pkgconfig
|
21
|
+
- zlib-devel
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
- name: GIT clone | ffmpeg
|
3
|
+
git: repo=git://source.ffmpeg.org/ffmpeg.git
|
4
|
+
dest={{ source_dir }}/ffmpeg
|
5
|
+
accept_hostkey=yes
|
6
|
+
depth=1
|
7
|
+
|
8
|
+
- name: Compile | ffmpeg
|
9
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
10
|
+
args:
|
11
|
+
chdir: "{{ source_dir }}/ffmpeg"
|
12
|
+
creates: "{{ bin_dir }}/ffmpeg"
|
13
|
+
with_items:
|
14
|
+
- PKG_CONFIG_PATH="{{ build_dir }}/lib/pkgconfig" ./configure --prefix={{ build_dir }} --extra-cflags="-I{{ build_dir }}/include" --extra-ldflags="-L{{ build_dir }}/lib" --bindir={{ bin_dir }} --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
|
15
|
+
- make
|
16
|
+
- make install
|
17
|
+
- make distclean
|
18
|
+
- hash -r
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
# AAC audio encoder
|
3
|
+
- name: GIT clone | libfdk_aac
|
4
|
+
git: repo=git://git.code.sf.net/p/opencore-amr/fdk-aac
|
5
|
+
dest={{ source_dir }}/libfdk_aac
|
6
|
+
accept_hostkey=yes
|
7
|
+
depth=1
|
8
|
+
|
9
|
+
- name: Compile | libfdk_aac
|
10
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
11
|
+
args:
|
12
|
+
chdir: "{{ source_dir }}/libfdk_aac"
|
13
|
+
creates: "{{ bin_dir }}/libfdk_aac"
|
14
|
+
with_items:
|
15
|
+
- autoreconf -fiv
|
16
|
+
- ./configure --prefix={{ build_dir }} --disable-shared
|
17
|
+
- make
|
18
|
+
- make install
|
19
|
+
- make distclean
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
# - name: libmp3lame | Download
|
3
|
+
# get_url: url=http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz dest={{ source_dir }}/libmp3lame.tar.gz
|
4
|
+
|
5
|
+
- name: libmp3lame | Unarchive
|
6
|
+
unarchive:
|
7
|
+
src: http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
|
8
|
+
dest: "{{ source_dir }}"
|
9
|
+
copy: no
|
10
|
+
|
11
|
+
- name: Compile | libmp3lame
|
12
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
13
|
+
args:
|
14
|
+
chdir: "{{ source_dir }}/lame-3.99.5"
|
15
|
+
creates: "{{ bin_dir }}/lame-3.99.5"
|
16
|
+
with_items:
|
17
|
+
- ./configure --prefix={{ build_dir }} --bindir={{ bin_dir }} --disable-shared --enable-nasm
|
18
|
+
- make
|
19
|
+
- make install
|
20
|
+
- make distclean
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
# Ogg bitstream library. Required by libtheora and libvorbis.
|
3
|
+
- name: libogg | Unarchive
|
4
|
+
unarchive:
|
5
|
+
src: http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
|
6
|
+
dest: "{{ source_dir }}"
|
7
|
+
copy: no
|
8
|
+
|
9
|
+
- name: Compile | libogg
|
10
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
11
|
+
args:
|
12
|
+
chdir: "{{ source_dir }}/libogg-1.3.2"
|
13
|
+
creates: "{{ bin_dir }}/libogg-1.3.2"
|
14
|
+
with_items:
|
15
|
+
- ./configure --prefix={{ build_dir }} --disable-shared
|
16
|
+
- make
|
17
|
+
- make install
|
18
|
+
- make distclean
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
# Opus audio decoder and encoder
|
3
|
+
# 2016-05-21 Changed from using git:// URI to using HTTP
|
4
|
+
- name: GIT clone | libopus
|
5
|
+
git: repo=http://git.opus-codec.org/opus.git
|
6
|
+
dest={{ source_dir }}/libopus
|
7
|
+
# depth=1
|
8
|
+
# accept_hostkey=yes
|
9
|
+
|
10
|
+
- name: Compile | libopus
|
11
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
12
|
+
args:
|
13
|
+
chdir: "{{ source_dir }}/libopus"
|
14
|
+
creates: "{{ bin_dir }}/libopus"
|
15
|
+
with_items:
|
16
|
+
- autoreconf -fiv
|
17
|
+
- ./configure --prefix={{ build_dir }} --disable-shared
|
18
|
+
- make
|
19
|
+
- make install
|
20
|
+
- make distclean
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
# Vorbis audio encoder. Requires libogg.
|
3
|
+
- name: libvorbis | Unarchive
|
4
|
+
unarchive:
|
5
|
+
src: http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
|
6
|
+
dest: "{{ source_dir }}"
|
7
|
+
copy: no
|
8
|
+
|
9
|
+
- name: Compile | libvorbis
|
10
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
11
|
+
args:
|
12
|
+
chdir: "{{ source_dir }}/libvorbis-1.3.4"
|
13
|
+
creates: "{{ bin_dir }}/libvorbis-1.3.4"
|
14
|
+
with_items:
|
15
|
+
- LDFLAGS="-L{{ build_dir }}/lib" CPPFLAGS="-I{{ build_dir }}/include" ./configure --prefix="{{ build_dir }}" --with-ogg="{{ build_dir }}" --disable-shared
|
16
|
+
- make
|
17
|
+
- make install
|
18
|
+
- make distclean
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
# VP8/VP9 video encoder
|
3
|
+
- name: GIT clone | libvpx
|
4
|
+
git: repo=https://chromium.googlesource.com/webm/libvpx.git
|
5
|
+
dest={{ source_dir }}/libvpx
|
6
|
+
accept_hostkey=yes
|
7
|
+
depth=1
|
8
|
+
|
9
|
+
- name: Compile | libvpx
|
10
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
11
|
+
args:
|
12
|
+
chdir: "{{ source_dir }}/libvpx"
|
13
|
+
creates: "{{ bin_dir }}/libvpx"
|
14
|
+
with_items:
|
15
|
+
- ./configure --prefix={{ build_dir }} --disable-examples
|
16
|
+
- make
|
17
|
+
- make install
|
18
|
+
- make distclean
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
- include: ff-libraries.yml
|
3
|
+
|
4
|
+
- name: ensure source_dir and build_dir exist
|
5
|
+
file:
|
6
|
+
path: "{{ item }}"
|
7
|
+
state: directory
|
8
|
+
with_items:
|
9
|
+
- "{{ source_dir }}"
|
10
|
+
- "{{ build_dir }}"
|
11
|
+
|
12
|
+
- name: stat yasm
|
13
|
+
stat: path=/usr/local/bin/yasm
|
14
|
+
register: yasm_stat
|
15
|
+
- name: include yasm
|
16
|
+
include: yasm.yml
|
17
|
+
when: yasm_stat.stat.xusr is not defined or yasm_stat.stat.xusr == False
|
18
|
+
|
19
|
+
- name: stat x264
|
20
|
+
stat: path=/usr/local/bin/x264
|
21
|
+
register: x264_stat
|
22
|
+
- name: include x264
|
23
|
+
include: x264.yml
|
24
|
+
when: x264_stat.stat.xusr is not defined or x264_stat.stat.xusr == False
|
25
|
+
|
26
|
+
- name: stat x265
|
27
|
+
stat: path={{ build_dir }}/lib/libx265.a
|
28
|
+
register: x265_stat
|
29
|
+
- name: include x264
|
30
|
+
include: x265.yml
|
31
|
+
when: x265_stat.stat.exists == False
|
32
|
+
|
33
|
+
- name: stat libfdk-aac
|
34
|
+
stat: path={{ build_dir }}/lib/libfdk-aac.a
|
35
|
+
register: aac_stat
|
36
|
+
- name: include libfdk-aac
|
37
|
+
include: libfdk_aac.yml
|
38
|
+
when: aac_stat.stat.exists == False
|
39
|
+
|
40
|
+
- name: stat lame
|
41
|
+
stat: path=/usr/local/bin/lame
|
42
|
+
register: lame_stat
|
43
|
+
- name: include lame
|
44
|
+
include: libmp3lame.yml
|
45
|
+
when: lame_stat.stat.xusr is not defined or lame_stat.stat.xusr == False
|
46
|
+
|
47
|
+
- name: stat libopus
|
48
|
+
stat: path={{ build_dir }}/lib/libopus.a
|
49
|
+
register: opus_stat
|
50
|
+
- name: include libopus
|
51
|
+
include: libopus.yml
|
52
|
+
when: opus_stat.stat.exists == False
|
53
|
+
|
54
|
+
- name: stat libogg
|
55
|
+
stat: path={{ build_dir }}/lib/libogg.a
|
56
|
+
register: ogg_stat
|
57
|
+
- name: include libogg
|
58
|
+
include: libogg.yml
|
59
|
+
when: ogg_stat.stat.exists == False
|
60
|
+
|
61
|
+
- name: stat libvorbis
|
62
|
+
stat: path={{ build_dir }}/lib/libvorbis.a
|
63
|
+
register: vorbis_stat
|
64
|
+
- name: include libvorbis
|
65
|
+
include: libvorbis.yml
|
66
|
+
when: vorbis_stat.stat.exists == False
|
67
|
+
|
68
|
+
- name: stat libvpx
|
69
|
+
stat: path={{ build_dir }}/lib/libvpx.a
|
70
|
+
register: vpx_stat
|
71
|
+
- name: include libvpx
|
72
|
+
include: libvpx.yml
|
73
|
+
when: vpx_stat.stat.exists == False
|
74
|
+
|
75
|
+
- name: stat ffmpeg
|
76
|
+
stat: path=/usr/local/bin/ffmpeg
|
77
|
+
register: ffmpeg_stat
|
78
|
+
- name: include ffmpeg
|
79
|
+
include: ffmpeg.yml
|
80
|
+
when: ffmpeg_stat.stat.xusr is not defined or ffmpeg_stat.stat.xusr == False
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
# H.264 video encoder
|
3
|
+
- name: GIT clone | libx264
|
4
|
+
git: repo=git://git.videolan.org/x264
|
5
|
+
dest={{ source_dir }}/x264
|
6
|
+
accept_hostkey=yes
|
7
|
+
depth=1
|
8
|
+
|
9
|
+
- name: Compile | libx264
|
10
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
11
|
+
args:
|
12
|
+
chdir: "{{ source_dir }}/x264"
|
13
|
+
creates: "{{ bin_dir }}/x264"
|
14
|
+
with_items:
|
15
|
+
- PKG_CONFIG_PATH="{{build_dir}}/lib/pkgconfig" ./configure --prefix={{ build_dir }} --bindir={{ bin_dir }} --enable-static
|
16
|
+
- make
|
17
|
+
- make install
|
18
|
+
- make distclean
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
- name: Mercurial | libx265
|
3
|
+
hg: repo=https://bitbucket.org/multicoreware/x265
|
4
|
+
dest={{source_dir}}/x265
|
5
|
+
|
6
|
+
- name: Compile | libx265
|
7
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
8
|
+
args:
|
9
|
+
chdir: "{{ source_dir }}/x265/build/linux"
|
10
|
+
creates: "{{ bin_dir }}/x265"
|
11
|
+
with_items:
|
12
|
+
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="{{build_dir}}" -DENABLE_SHARED:bool=off ../../source
|
13
|
+
- make
|
14
|
+
- make install
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
# Yasm is an assembler used by x264 and FFmpeg
|
3
|
+
- name: GIT clone | yasm
|
4
|
+
git: repo=git://github.com/yasm/yasm.git
|
5
|
+
dest={{ source_dir }}/yasm
|
6
|
+
accept_hostkey=yes
|
7
|
+
depth=1
|
8
|
+
|
9
|
+
- name: Compile | yasm
|
10
|
+
shell: "export PATH=/usr/local/bin/:$PATH && {{ item }}"
|
11
|
+
args:
|
12
|
+
chdir: "{{ source_dir }}/yasm"
|
13
|
+
creates: "{{ bin_dir }}/yasm"
|
14
|
+
with_items:
|
15
|
+
- autoreconf -fiv
|
16
|
+
- ./configure --prefix={{ build_dir }} --bindir={{ bin_dir }}
|
17
|
+
- make
|
18
|
+
- make install
|
19
|
+
- make distclean
|