active_encode 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 73c2f88b1463afbef6c72554de60aa4034b49846
4
- data.tar.gz: ff333d8550dfa1fb0c06ab36df9fdc2b7d7fe2e9
2
+ SHA256:
3
+ metadata.gz: a4a97d45ac966ff1988311fd6787fde4bc9b40850fb83ddd78aaa79ef495a885
4
+ data.tar.gz: f66be6fc89de6e14cb192cc55f6d467a211598804511f8aca981e3d441dd9493
5
5
  SHA512:
6
- metadata.gz: 7c969914f4e8f0b2605ab500e7d2ec6d99d26910a64eaf701bc90162cf79b286be86bad3ca6822d5c897095d78e921226d089134d262939711f32b16173d488e
7
- data.tar.gz: d9a366e0ebdbff776d4570d221d04bcb56d65e9bb263fc46a88e14aa7f479882d49fa63602ba8011002dc39e2232139f0da07cf0e2d658f8a3e670e1bb7a3d5a
6
+ metadata.gz: 360d90909956f64d5e499e1260128a85ac498891cdc4eb448e9ce53f5e4cc02372bec4df79143129202963fab95d8e4fc6c79f83335346d82b2fa2a20bf4d4df
7
+ data.tar.gz: 76bf91cce817790e2b9775e83df44208812f024e353524cccbfc470525b083c2b172c6576af8f8711896b227e5fab438feb97c3da4b9849c1b378451ebfb62a8
@@ -0,0 +1,36 @@
1
+ The Samvera community is dedicated to providing a welcoming and
2
+ positive experience for all its members, whether they are at a formal
3
+ gathering, in a social setting, or taking part in activities online.
4
+ The Samvera community welcomes participation from people all over the
5
+ world and these members bring with them a wide variety of
6
+ professional, personal and social backgrounds; whatever these may be,
7
+ we treat colleagues with dignity and respect.
8
+
9
+ Community members communicate primarily in English, though for many of
10
+ them this is not their native language. We therefore strive to express
11
+ ourselves simply and clearly remembering that unnecessary use of
12
+ jargon and slang will be a barrier to understanding for many of our
13
+ colleagues. We are sensitive to the fact that the international
14
+ nature of the community means that we span many different social norms
15
+ around language and behaviour and we strive to conduct ourselves,
16
+ online and in person, in ways that are unlikely to cause offence.
17
+
18
+ Samvera conversations are often information-rich and intended to
19
+ generate discussion and debate. We discuss ideas from a standpoint of
20
+ mutual respect and reasoned argument.
21
+
22
+ Community members work together to promote a respectful and safe
23
+ community. In the event that someone’s conduct is causing offence or
24
+ distress, Samvera has a detailed
25
+ [Anti-Harassment Policy and Protocol](https://wiki.duraspace.org/display/samvera/Anti-Harassment+Policy)
26
+ which can be applied to address the problem. The first step in dealing
27
+ with any serious misconduct is to contact a local meeting organizer,
28
+ the
29
+ [Samvera community helpers](https://wiki.duraspace.org/display/samvera/Samvera+Community+Helpers)
30
+ ([email](mailto:helpers@samvera.org)), a community member you
31
+ trust, or the
32
+ [Samvera Steering Group](https://wiki.duraspace.org/display/samvera/Samvera+Steering+Group+membership)
33
+ immediately; at Samvera events, these people can be identified by
34
+ distinctive name badges. The
35
+ [Policy and Protocol](https://wiki.duraspace.org/display/samvera/Anti-Harassment+Policy)
36
+ should be consulted for fuller details.
@@ -1,21 +1,24 @@
1
1
  # How to Contribute
2
2
 
3
- We want your help to make Project Hydra great.
4
- There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
3
+ We want your help to make the Samvera community great. There are a few guidelines
4
+ that we need contributors to follow so that we can have a chance of
5
+ keeping on top of things.
5
6
 
6
7
  ## Code of Conduct
7
8
 
8
- The Hydra community is dedicated to providing a welcoming and positive experience for all its
9
- members, whether they are at a formal gathering, in a social setting, or taking part in activities
10
- online. Please see our [Code of Conduct](https://wiki.duraspace.org/display/hydra/Code+of+Conduct)
11
- for more information.
9
+ The Samvera Community is dedicated to providing a welcoming and positive
10
+ experience for all its members, whether they are at a formal gathering, in
11
+ a social setting, or taking part in activities online. Please see our
12
+ [Code of Conduct](CODE_OF_CONDUCT.md) for more information.
12
13
 
13
- ## Hydra Project Intellectual Property Licensing and Ownership
14
+ ## Samvera Community Intellectual Property Licensing and Ownership
14
15
 
15
- All code contributors must have an Individual Contributor License Agreement (iCLA) on file with the Hydra Project Steering Group.
16
- If the contributor works for an institution, the institution must have a Corporate Contributor License Agreement (cCLA) on file.
16
+ All code contributors must have an Individual Contributor License Agreement
17
+ (iCLA) on file with the Samvera Steering Group. If the contributor works for
18
+ an institution, the institution must have a Corporate Contributor License
19
+ Agreement (cCLA) on file.
17
20
 
18
- https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership
21
+ https://wiki.duraspace.org/display/samvera/Samvera+Community+Intellectual+Property+Licensing+and+Ownership
19
22
 
20
23
  You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.
21
24
 
@@ -31,7 +34,7 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
31
34
  ### Reporting Issues
32
35
 
33
36
  * Make sure you have a [GitHub account](https://github.com/signup/free)
34
- * Submit a [Github issue](./issues) by:
37
+ * Submit a [Github issue](https://github.com/samvera-labs/active_encode/issues/) by:
35
38
  * Clearly describing the issue
36
39
  * Provide a descriptive summary
37
40
  * Explain the expected behavior
@@ -48,7 +51,7 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
48
51
  * Please avoid working directly on the `master` branch.
49
52
  * You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful
50
53
  * Make sure you have added sufficient tests and documentation for your changes.
51
- * Test functionality with RSpec; est features / UI with Capybara.
54
+ * Test functionality with RSpec; Test features / UI with Capybara.
52
55
  * Run _all_ the tests to assure nothing else was accidentally broken.
53
56
 
54
57
  ### Documenting Code
@@ -60,15 +63,11 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
60
63
  * If you don't know exactly what a bit of code does, it is extra likely that it needs to be documented. Take a stab at it and ask for feedback in your pull request. You can use the 'blame' button on GitHub to identify the original developer of the code and @mention them in your comment.
61
64
  * This work greatly increases the usability of the code base and supports the on-ramping of new committers.
62
65
  * We will all be understanding of one another's time constraints in this area.
63
- * YARD examples:
64
- * [Hydra::Works::RemoveGenericFile](https://github.com/projecthydra-labs/hydra-works/blob/master/lib/hydra/works/services/generic_work/remove_generic_file.rb)
65
- * [ActiveTriples::LocalName::Minter](https://github.com/ActiveTriples/active_triples-local_name/blob/master/lib/active_triples/local_name/minter.rb)
66
66
  * [Getting started with YARD](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md)
67
67
 
68
68
  ### Committing changes
69
69
 
70
70
  * Make commits of logical units.
71
- * Your commit should include a high level description of your work in HISTORY.textile
72
71
  * Check for unnecessary whitespace with `git diff --check` before committing.
73
72
  * Make sure your commit messages are [well formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
74
73
  * If you created an issue, you can close it by including "Closes #issue" in your commit message. See [Github's blog post for more details](https://github.com/blog/1386-closing-issues-via-commit-messages)
@@ -103,6 +102,10 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
103
102
  long to fit in 72 characters
104
103
  ```
105
104
 
105
+ * Make sure you have added the necessary tests for your changes.
106
+ * Run _all_ the tests to assure nothing else was accidentally broken.
107
+ * When you are ready to submit a pull request
108
+
106
109
  ### Submitting Changes
107
110
 
108
111
  * Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
@@ -125,9 +128,7 @@ We adopted [Github's Pull Request Review](https://help.github.com/articles/about
125
128
  Common checks that may occur in our repositories:
126
129
 
127
130
  1. Travis CI - where our automated tests are running
128
- 2. Hound CI - where we check for style violations
129
- 3. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
130
- 4. CodeClimate - is our code remaining healthy (at least according to static code analysis)
131
+ 2. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
131
132
 
132
133
  If one or more of the required checks failed (or are incomplete), the code should not be merged (and the UI will not allow it). If all of the checks have passed, then anyone on the project (including the pull request submitter) may merge the code.
133
134
 
@@ -144,16 +145,17 @@ First, the person contributing the code is putting themselves out there. Be mind
144
145
  This is your chance for a mentoring moment of another developer. Take time to give an honest and thorough review of what has changed. Things to consider:
145
146
 
146
147
  * Does the commit message explain what is going on?
147
- * Does the code changes have tests? _Not all changes need new tests, some changes are refactors_
148
+ * Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
148
149
  * Do new or changed methods, modules, and classes have documentation?
149
150
  * Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
150
151
  * Does the description of the new/changed specs match your understanding of what the spec is doing?
152
+ * Did the Travis tests complete successfully?
151
153
 
152
154
  If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer.
153
155
 
154
156
  # Additional Resources
155
157
 
156
158
  * [General GitHub documentation](http://help.github.com/)
157
- * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
159
+ * [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
158
160
  * [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git.
159
161
  * [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
data/LICENSE CHANGED
@@ -1,202 +1,14 @@
1
+ Copyright 2015-2019 The Trustees of Indiana University and Northwestern University
2
+ Additional copyright may be held by others, as reflected in the commit history.
1
3
 
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
5
7
 
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+ http://www.apache.org/licenses/LICENSE-2.0
7
9
 
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
data/README.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # ActiveEncode
2
2
 
3
- This gem serves as the basis for the interface between a Ruby (Rails) application and a provider of transcoding services such as [Opencast Matterhorn](http://opencast.org), [Zencoder](http://zencoder.com), and [Amazon Elastic Transcoder](http://aws.amazon.com/elastictranscoder/).
3
+ Code: [![Version](https://badge.fury.io/rb/active_encode.png)](http://badge.fury.io/rb/active_encode)
4
+ [![Build Status](https://travis-ci.org/samvera-labs/active_encode.png?branch=master)](https://travis-ci.org/samvera-labs/active_encode)
5
+ [![Coverage Status](https://coveralls.io/repos/github/samvera-labs/active_encode/badge.svg?branch=master)](https://coveralls.io/github/samvera-labs/active_encode?branch=master)
6
+
7
+ Docs: [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
8
+ [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)
9
+
10
+ Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
11
+
12
+ # What is ActiveEncode?
13
+
14
+ ActiveEncode serves as the basis for the interface between a Ruby (Rails) application and a provider of encoding services such as [FFmpeg](https://www.ffmpeg.org/), [Amazon Elastic Transcoder](http://aws.amazon.com/elastictranscoder/), and [Zencoder](http://zencoder.com).
15
+
16
+ # Help
17
+
18
+ The Samvera community is here to help. Please see our [support guide](./SUPPORT.md).
4
19
 
5
20
  ## Installation
6
21
 
@@ -18,41 +33,76 @@ Or install it yourself as:
18
33
 
19
34
  $ gem install active_encode
20
35
 
36
+ ## Prerequisites
37
+
38
+ FFmpeg (tested with version 4+) and mediainfo (version 17.10+) need to be installed to use the FFmpeg engine adapter.
39
+
21
40
  ## Usage
22
41
 
23
42
  Set the engine adapter (default: test), configure it (if neccessary), then submit encoding jobs!
24
43
 
25
44
  ```ruby
26
- ActiveEncode::Base.engine_adapter = :matterhorn
27
- ActiveEncode::Base.create(File.open('spec/fixtures/Bars_512kb.mp4'))
45
+ ActiveEncode::Base.engine_adapter = :ffmpeg
46
+ file = "file://#{File.absolute_path "spec/fixtures/fireworks.mp4"}"
47
+ ActiveEncode::Base.create(file, { outputs: [{ label: "low", ffmpeg_opt: "-s 640x480", extension: "mp4"}, { label: "high", ffmpeg_opt: "-s 1280x720", extension: "mp4"}] })
28
48
  ```
29
- Create returns an encoding job that has been submitted to the encoding engine for processing. At this point it will have an id, a state, the input, and any additional information the encoding engine returns.
49
+ Create returns an encoding job that has been submitted to the adapter for processing. At this point it will have an id, a state, the input, and any additional information the adapter returns.
30
50
 
31
51
  ```ruby
32
- #<ActiveEncode::Base:0x00000003f3cd90 @input="http://localhost:8080/files/mediapackage/edcac316-1f98-44b1-88ca-0ce6f80aebc0/ff43c56f-7b8f-4d9c-a846-6e51de2e8cb4/Bars_512kb.mp4", @options={:preset=>"avalon", :stream_base=>"file:///home/cjcolvar/Code/avalon/avalon/red5/webapps/avalon/streams"}, @id="12154", @state=:running, @current_operations=[], @percent_complete=0.0, @output=[], @errors=[], @tech_metadata={}>
52
+ #<ActiveEncode::Base:0x007f8ef3b2ae88 @input=#<ActiveEncode::Input:0x007f8ef3b23188 @url="file:///Users/cjcolvar/Documents/Code/samvera-labs/active_encode/spec/fixtures/fireworks.mp4", @width=960.0, @height=540.0, @frame_rate=29.671, @duration=6024, @file_size=1629578, @audio_codec="mp4a-40-2", @video_codec="avc1", @audio_bitrate=69737, @video_bitrate=2092780, @created_at=2018-12-03 14:22:05 -0500, @updated_at=2018-12-03 14:22:05 -0500, @id=7653>, @options={:outputs=>[{:label=>"low", :ffmpeg_opt=>"-s 640x480", :extension=>"mp4"}, {:label=>"high", :ffmpeg_opt=>"-s 1280x720", :extension=>"mp4"}]}, @id="1e4a907a-ccff-494f-ad70-b1c5072c2465", @created_at=2018-12-03 14:22:05 -0500, @updated_at=2018-12-03 14:22:05 -0500, @current_operations=[], @output=[], @state=:running, @percent_complete=1, @errors=[]>
33
53
  ```
34
54
  ```ruby
35
- encode.id # "12103"
55
+ encode.id # "1e4a907a-ccff-494f-ad70-b1c5072c2465"
36
56
  encode.state # :running
37
57
  ```
38
58
 
39
- This encode can be looked back up later using #find. Alternatively, use #reload to refresh an instance with the latest information from the
59
+ This encode can be looked back up later using #find. Alternatively, use #reload to refresh an instance with the latest information from the adapter:
40
60
 
41
61
  ```ruby
42
- encode = ActiveEncode::Base.find("12103")
62
+ encode = ActiveEncode::Base.find("1e4a907a-ccff-494f-ad70-b1c5072c2465")
43
63
  encode.reload
44
64
  ```
45
65
 
46
- Progress of a running encode is shown with a current operation (multiple possible if outputs are generated in parallel) and percent complete. Technical metadata about the input file is added by the encoding engine. This should include a mime type, checksum, duration, and basic technical details of the audio and video content of the file (codec, audio channels, bitrate, framerate, and dimensions). Outputs are added once they are created and should include the same technical metadata along with an id, label, and url.
66
+ Progress of a running encode is shown with current operations (multiple are possible when outputs are generated in parallel) and percent complete. Technical metadata about the input file may be added by the adapter. This should include a mime type, checksum, duration, and basic technical details of the audio and video content of the file (codec, audio channels, bitrate, frame rate, and dimensions). Outputs are added once they are created and should include the same technical metadata along with an id, label, and url.
47
67
 
48
- If the encoding job should be stopped, call cancel:
68
+ If you want to stop the encoding job call cancel:
49
69
 
50
70
  ```ruby
51
71
  encode.cancel!
52
72
  encode.cancelled? # true
53
73
  ```
54
74
 
55
- An encoding job is meant to be the record of the work of the encoding engine and not the current state of the outputs. Therefore removed outputs will not be reflected in the encoding job.
75
+ An encoding job is meant to be the record of the work of the encoding engine and not the current state of the outputs. Therefore moved or deleted outputs will not be reflected in the encoding job.
76
+
77
+ ### AWS ElasticTranscoder
78
+
79
+ To use active_encode with the AWS ElasticTransoder, the following are required:
80
+ - An S3 bucket to store master files
81
+ - An S3 bucket to store derivatives (recommended to be separate)
82
+ - An ElasticTranscoder pipeline
83
+ - Some transcoding presets for the pipeline
84
+
85
+ Set the adapter:
86
+
87
+ ```ruby
88
+ ActiveEncode::Base.engine_adapter = :elastic_transcoder
89
+ ```
90
+
91
+ Construct the options hash:
92
+
93
+ ```ruby
94
+ outputs = [{ key: "quality-low/hls/fireworks", preset_id: '1494429796844-aza6zh', segment_duration: '2' },
95
+ { key: "quality-medium/hls/fireworks", preset_id: '1494429797061-kvg9ki', segment_duration: '2' },
96
+ { key: "quality-high/hls/fireworks", preset_id: '1494429797265-9xi831', segment_duration: '2' }]
97
+ options = {pipeline_id: 'my-pipeline-id', masterfile_bucket: 'my-master-files', outputs: outputs}
98
+ ```
99
+
100
+ Create the job:
101
+
102
+ ```ruby
103
+ file = 'file:///path/to/file/fireworks.mp4' # or 's3://my-bucket/fireworks.mp4'
104
+ encode = ActiveEncode::Base.create(file, options)
105
+ ```
56
106
 
57
107
  ### Custom jobs
58
108
 
@@ -72,19 +122,11 @@ end
72
122
 
73
123
  ### Engine Adapters
74
124
 
75
- Engine adapters are shims between ActiveEncode and the back end encoding service. Each service has its own API and idiosyncracies so consult the table below to see what features are supported by each adapter. Add an additional engines by creating an engine adapter class that implements :create, :find, and :cancel.
125
+ Engine adapters are shims between ActiveEncode and the back end encoding service. You can add an additional engine by creating an engine adapter class that implements `:create`, `:find`, and `:cancel` and passes the shared specs.
76
126
 
77
- | Adapter/Feature | Create | Find | Cancel | Preset | Multiple Outputs |
78
- |--------------------------|--------|------|--------|--------|------------------|
79
- | Test | X | X | X | | |
80
- | AWS Elastic Transcoder | X | X | X | | |
81
- | Zencoder | X | X | X | | |
82
- | Matterhorn | X | X | X | X | X |
127
+ # Acknowledgments
83
128
 
84
- ## Contributing
129
+ This software has been developed by and is brought to you by the Samvera community. Learn more at the
130
+ [Samvera website](http://samvera.org/).
85
131
 
86
- 1. Fork it ( https://github.com/projecthydra-labs/active_encode/fork )
87
- 2. Create your feature branch (`git checkout -b my-new-feature`)
88
- 3. Commit your changes (`git commit -am 'Add some feature'`)
89
- 4. Push to the branch (`git push origin my-new-feature`)
90
- 5. Create a new Pull Request
132
+ ![Samvera Logo](https://wiki.duraspace.org/download/thumbnails/87459292/samvera-fall-font2-200w.png?version=1&modificationDate=1498550535816&api=v2)