jani-strip_maker 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +11 -0
- data/Gemfile +10 -0
- data/Guardfile +17 -0
- data/LICENSE.txt +22 -0
- data/README.md +51 -0
- data/Rakefile +7 -0
- data/bin/strip_maker +8 -0
- data/jani-strip_maker.gemspec +28 -0
- data/lib/jani/strip_maker/cli.rb +20 -0
- data/lib/jani/strip_maker/frame_list.rb +39 -0
- data/lib/jani/strip_maker/movie.rb +46 -0
- data/lib/jani/strip_maker/strip.rb +59 -0
- data/lib/jani/strip_maker/transcode_options.rb +21 -0
- data/lib/jani/strip_maker/version.rb +5 -0
- data/lib/jani/strip_maker.rb +7 -0
- data/spec/fixtures/images/100x100.jpg +0 -0
- data/spec/fixtures/movies/kuro.mov +0 -0
- data/spec/jani/strip_maker/frame_list_spec.rb +71 -0
- data/spec/jani/strip_maker/movie_spec.rb +32 -0
- data/spec/jani/strip_maker/strip_spec.rb +38 -0
- data/spec/jani/strip_maker_spec.rb +7 -0
- data/spec/spec_helper.rb +8 -0
- metadata +161 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 03ee0c4fbbd4347afa94cf4dc071b507ad2d4e49
|
4
|
+
data.tar.gz: e205e30e1df539998f1da5ee444ab2f35af57fce
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 92c50a0e7c3270bf160a574ab890ce457299996c4e72751869127c331cd209f1a473123ad9ed2f839fabc0e5ef745293490d33399b1491f5aad5358020e99ece
|
7
|
+
data.tar.gz: e4ae15f349eb76fe5d64334df5bdcdfccb778f57210a64394c684cdb0d1dadf2e1fb1a4808e733df2bfc5cdb0a838d7aab3ea510b4f77fafb5960d40b5921178
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.3
|
data/.travis.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
before_install:
|
2
|
+
- sudo apt-get -y update
|
3
|
+
- sudo apt-get -y install libavformat-dev
|
4
|
+
- sudo apt-get -y install ffmpeg
|
5
|
+
language: ruby
|
6
|
+
rvm:
|
7
|
+
- 2.1.3
|
8
|
+
|
9
|
+
addons:
|
10
|
+
code_climate:
|
11
|
+
repo_token: eb25f6f747b9bf0542c5c320abc3acfc76ff0b7437b287251ab7a0d93257d1db
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
5
|
+
# rspec may be run, below are examples of the most common uses.
|
6
|
+
# * bundler: 'bundle exec rspec'
|
7
|
+
# * bundler binstubs: 'bin/rspec'
|
8
|
+
# * spring: 'bin/rsspec' (This will use spring if running and you have
|
9
|
+
# installed the spring binstubs per the docs)
|
10
|
+
# * zeus: 'zeus rspec' (requires the server to be started separetly)
|
11
|
+
# * 'just' rspec: 'rspec'
|
12
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
13
|
+
watch(%r{^spec/.+_spec\.rb$})
|
14
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
15
|
+
watch('spec/spec_helper.rb') { "spec" }
|
16
|
+
end
|
17
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Shin'ichi Ohno
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Jani::StripMaker
|
2
|
+
|
3
|
+
[](https://travis-ci.org/shin1ohno/jani-strip_maker)
|
4
|
+
[](https://codeclimate.com/github/shin1ohno/jani-strip_maker)
|
5
|
+
[](https://codeclimate.com/github/shin1ohno/jani-strip_maker)
|
6
|
+
[](https://gemnasium.com/shin1ohno/jani-strip_maker)
|
7
|
+
|
8
|
+
You can use cli
|
9
|
+
|
10
|
+
```bash
|
11
|
+
./strip_maker from_movie_to_strips --input_file path_to_file --fps N --height N --width N
|
12
|
+
```
|
13
|
+
|
14
|
+
or you can use from ruby code
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
# build encode option
|
18
|
+
transcode_options = Jani::StripMaker::TranscodeOptions.new
|
19
|
+
transcode_options.fps = 15
|
20
|
+
transcode_options.width = 320
|
21
|
+
transcode_options.fps = 180
|
22
|
+
|
23
|
+
# Get strip files in current directory from movie file
|
24
|
+
Jani::StripMaker::Movie.new(
|
25
|
+
"path/to/movieFile.mov", transcode_options
|
26
|
+
).to_strips.each(&:write)
|
27
|
+
```
|
28
|
+
|
29
|
+
## Installation
|
30
|
+
|
31
|
+
Add this line to your application's Gemfile:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
gem 'jani-strip_maker'
|
35
|
+
```
|
36
|
+
|
37
|
+
And then execute:
|
38
|
+
|
39
|
+
$ bundle
|
40
|
+
|
41
|
+
Or install it yourself as:
|
42
|
+
|
43
|
+
$ gem install jani-strip_maker
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
1. Fork it ( https://github.com/[my-github-username]/jani-strip_maker/fork )
|
48
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
49
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
50
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
51
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/strip_maker
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'jani/strip_maker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "jani-strip_maker"
|
8
|
+
spec.version = Jani::StripMaker::VERSION
|
9
|
+
spec.authors = ["Shin'ichi Ohno"]
|
10
|
+
spec.email = ["shin1ohno@me.com"]
|
11
|
+
spec.summary = "Make jani strip from movie file"
|
12
|
+
spec.description = "Make jani(https://github.com/shin1ohno/jani) strip from movie file."
|
13
|
+
spec.homepage = "https://github.com/shin1ohno/jani-strip_maker"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = "strip_maker"
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "rmagick", "2.13.2"
|
22
|
+
spec.add_dependency "streamio-ffmpeg", "1.0.0"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "rspec-collection_matchers"
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "jani/strip_maker/movie"
|
3
|
+
require "jani/strip_maker/transcode_options"
|
4
|
+
|
5
|
+
class Jani::StripMaker::CLI < Thor
|
6
|
+
desc "from_movie_to_strips INPUT_FILE", "convert movie file into jani formatted strip images"
|
7
|
+
option :fps, type: :numeric, required: true
|
8
|
+
option :width, type: :numeric, required: true
|
9
|
+
option :height, type: :numeric, required: true
|
10
|
+
option :input_file, type: :string, default: true
|
11
|
+
|
12
|
+
def from_movie_to_strips
|
13
|
+
transcode_options = Jani::StripMaker::TranscodeOptions.new
|
14
|
+
transcode_options.fps = options[:fps]
|
15
|
+
transcode_options.width = options[:width]
|
16
|
+
transcode_options.height = options[:height]
|
17
|
+
movie = Jani::StripMaker::Movie.new(movie_filepath: options[:input_file], transcode_options: transcode_options)
|
18
|
+
movie.to_strips.map(&:write)
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "jani/strip_maker"
|
2
|
+
require "jani/strip_maker/strip"
|
3
|
+
require "RMagick"
|
4
|
+
|
5
|
+
class Jani::StripMaker::FrameList
|
6
|
+
include Magick
|
7
|
+
extend Forwardable
|
8
|
+
|
9
|
+
attr_reader :images
|
10
|
+
|
11
|
+
def initialize(images: [])
|
12
|
+
@images = images.dup
|
13
|
+
end
|
14
|
+
|
15
|
+
def append_image(image)
|
16
|
+
@images << image
|
17
|
+
end
|
18
|
+
|
19
|
+
def append_image_with_filename(filename)
|
20
|
+
append_image(Image.read(filename)[0])
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_strips
|
24
|
+
[].tap do |strips|
|
25
|
+
index = 1
|
26
|
+
while !@images.empty?
|
27
|
+
strip = Jani::StripMaker::Strip.new(index: index)
|
28
|
+
until @images.empty? || strip.big_enough?
|
29
|
+
strip.append_frame(@images.shift)
|
30
|
+
end
|
31
|
+
strips << strip
|
32
|
+
index = index + 1
|
33
|
+
next
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def_delegators :@images, :+, :-, :<<, :[], :at, :[]=, :empty?, :each, :each_with_index, :include?, :all?, :any?, :sort, :uniq, :select, :collect, :find
|
39
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require "tmpdir"
|
2
|
+
require "jani/strip_maker/frame_list"
|
3
|
+
|
4
|
+
class Jani::StripMaker::Movie
|
5
|
+
FILE_NAME_PATTERN = "frame%4d"
|
6
|
+
FILE_NAME_EXTENTION = "jpg"
|
7
|
+
|
8
|
+
include Magick
|
9
|
+
|
10
|
+
def initialize(movie_filepath: movie_filepath, transcode_options: transcode_options)
|
11
|
+
@movie_filepath = (movie_filepath)
|
12
|
+
@transcode_options = transcode_options
|
13
|
+
@_frame_list = []
|
14
|
+
end
|
15
|
+
|
16
|
+
def to_frame_list
|
17
|
+
return @_frame_list unless @_frame_list.empty?
|
18
|
+
movie_full_path = movie_full_path()
|
19
|
+
Dir.mktmpdir do |dir|
|
20
|
+
Dir.chdir(dir) do |dir|
|
21
|
+
execute_ffmpeg_command(movie_full_path)
|
22
|
+
images = ImageList.new(*Dir.glob("*\.#{FILE_NAME_EXTENTION}"))
|
23
|
+
# TODO: raise error if images is empty
|
24
|
+
@_frame_list = Jani::StripMaker::FrameList.new(images: images)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_strips
|
30
|
+
to_frame_list().to_strips()
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def execute_ffmpeg_command(movie_full_path)
|
36
|
+
if system("ffmpeg -i #{movie_full_path} #{@transcode_options.to_ffmpeg_options} #{FILE_NAME_PATTERN}.#{FILE_NAME_EXTENTION}")
|
37
|
+
# OK. Do nothing
|
38
|
+
else
|
39
|
+
# TODO: raise error
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def movie_full_path
|
44
|
+
File.expand_path(@movie_filepath)
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require "RMagick"
|
2
|
+
|
3
|
+
class Jani::StripMaker::Strip
|
4
|
+
include Magick
|
5
|
+
|
6
|
+
FILE_NAME_DIGITS = 4
|
7
|
+
FILE_EXTENTION = "jpg"
|
8
|
+
|
9
|
+
def initialize(images:[] , index: 1)
|
10
|
+
@frame_images = images.dup
|
11
|
+
@index = index
|
12
|
+
end
|
13
|
+
|
14
|
+
def big_enough?
|
15
|
+
return false if frames_count.zero?
|
16
|
+
pixels / frames_count * (frames_count + 1) > Jani::StripMaker::MAX_PIXELS_FOR_MOBILE_SAFARI
|
17
|
+
end
|
18
|
+
|
19
|
+
def write(filename = nil)
|
20
|
+
name = filename || filename()
|
21
|
+
to_rmagic_image_list.append(true).write(name)
|
22
|
+
end
|
23
|
+
|
24
|
+
def append_frame(frame_image)
|
25
|
+
@frame_images << frame_image
|
26
|
+
end
|
27
|
+
|
28
|
+
def to_metadata
|
29
|
+
{
|
30
|
+
index: @index,
|
31
|
+
frames_count: frames_count
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def pixels
|
38
|
+
image = @frame_images[0]
|
39
|
+
return 0 unless image
|
40
|
+
image.columns * image.rows * frames_count
|
41
|
+
# To be precise, this should be like below,
|
42
|
+
# but we can assume all frame has same dimension
|
43
|
+
# @frame_images.inject(0) do |pixels, image|
|
44
|
+
# pixels + image.columns * image.rows
|
45
|
+
# end
|
46
|
+
end
|
47
|
+
|
48
|
+
def frames_count
|
49
|
+
@frame_images.count
|
50
|
+
end
|
51
|
+
|
52
|
+
def to_rmagic_image_list
|
53
|
+
ImageList.new.concat(@frame_images).tap { |list| list.scene = 0 }
|
54
|
+
end
|
55
|
+
|
56
|
+
def filename
|
57
|
+
"#{@index.to_s.rjust(FILE_NAME_DIGITS, "0")}.#{FILE_EXTENTION}"
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Jani::StripMaker::TranscodeOptions
|
2
|
+
attr_accessor :fps, :width, :height
|
3
|
+
|
4
|
+
def to_ffmpeg_options
|
5
|
+
[to_bitrate_option(), to_scale_option(), to_fps_option()].join(" ")
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def to_bitrate_option
|
11
|
+
"-b:v 50000k"
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_scale_option
|
15
|
+
"-vf scale=#{@height}:#{@width}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_fps_option
|
19
|
+
"-r #{@fps}"
|
20
|
+
end
|
21
|
+
end
|
Binary file
|
Binary file
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'jani/strip_maker/frame_list'
|
3
|
+
include Magick
|
4
|
+
|
5
|
+
describe Jani::StripMaker::FrameList do
|
6
|
+
let(:images) { [] }
|
7
|
+
let(:frame_list) { Jani::StripMaker::FrameList.new(images: images) }
|
8
|
+
|
9
|
+
context "by default" do
|
10
|
+
let(:frame_list) { Jani::StripMaker::FrameList.new() }
|
11
|
+
|
12
|
+
it "has no images" do
|
13
|
+
expect(frame_list.images).to be_empty
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
context "when initialize with images" do
|
18
|
+
let(:images) do
|
19
|
+
[].tap do |images|
|
20
|
+
rand(10).times { images << Image.new(1,1) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it "has images" do
|
25
|
+
expect(frame_list.images).to eq(images)
|
26
|
+
expect(frame_list.images).to have(images.count).items
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "#append_image" do
|
31
|
+
subject { frame_list.images }
|
32
|
+
let(:image) { Image.new(1,1) }
|
33
|
+
|
34
|
+
it "appends image to list" do
|
35
|
+
frame_list.append_image(image)
|
36
|
+
expect(subject).to eq([image])
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#append_image_with_filename" do
|
41
|
+
subject { frame_list.images[0] }
|
42
|
+
let(:image_file_name) { "spec/fixtures/images/100x100.jpg" }
|
43
|
+
|
44
|
+
it "appends image to list" do
|
45
|
+
frame_list.append_image_with_filename(image_file_name)
|
46
|
+
expect(subject).to be_a_kind_of(Image)
|
47
|
+
expect(subject.columns).to eq(100)
|
48
|
+
expect(subject.rows).to eq(100)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "#to_strips" do
|
53
|
+
subject { frame_list.to_strips }
|
54
|
+
let(:images) do
|
55
|
+
[].tap do |images|
|
56
|
+
1000.times { images << Image.new(100,100) }
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
it "splits into 4 strips" do
|
61
|
+
expect(subject.map(&:to_metadata)).to eq(
|
62
|
+
[
|
63
|
+
{:index=>1, :frames_count=>314},
|
64
|
+
{:index=>2, :frames_count=>314},
|
65
|
+
{:index=>3, :frames_count=>314},
|
66
|
+
{:index=>4, :frames_count=>58}
|
67
|
+
]
|
68
|
+
)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "jani/strip_maker/movie"
|
3
|
+
require "jani/strip_maker/transcode_options"
|
4
|
+
|
5
|
+
describe Jani::StripMaker::Movie do
|
6
|
+
let(:transcode_options) do
|
7
|
+
Jani::StripMaker::TranscodeOptions.new.tap do |options|
|
8
|
+
options.fps = 15
|
9
|
+
options.width = 320
|
10
|
+
options.height = 180
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:movie) { Jani::StripMaker::Movie.new(movie_filepath: "spec/fixtures/movies/kuro.mov", transcode_options: transcode_options) }
|
15
|
+
|
16
|
+
describe "#to_frame_list" do
|
17
|
+
it "retunrs FrameList" do
|
18
|
+
transcoded = movie.to_frame_list
|
19
|
+
expect(transcoded).to be_a_kind_of(Jani::StripMaker::FrameList)
|
20
|
+
expect(transcoded).not_to be_empty
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "#to_strips" do
|
25
|
+
it "retunrs strips" do
|
26
|
+
strips = movie.to_strips
|
27
|
+
expect(strips).not_to be_empty
|
28
|
+
expect(strips[0]).to be_a_kind_of(Jani::StripMaker::Strip)
|
29
|
+
expect(strips).to have(3).items
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'jani/strip_maker/strip'
|
3
|
+
include Magick
|
4
|
+
|
5
|
+
describe Jani::StripMaker::Strip do
|
6
|
+
let(:images_count) { rand(10) + 10 }
|
7
|
+
let(:strip) { Jani::StripMaker::Strip.new(images: images) }
|
8
|
+
|
9
|
+
let(:images) do
|
10
|
+
[].tap do |images|
|
11
|
+
images_count.times { images << Image.new(1,1) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#pixels (private)" do
|
16
|
+
subject { strip.send(:pixels) }
|
17
|
+
|
18
|
+
it "sums all images pixels up" do
|
19
|
+
expect(subject).to eq(images_count * 1 * 1)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "#big_enough?" do
|
24
|
+
context "when pixels is below limit" do
|
25
|
+
it { expect(strip).not_to be_big_enough }
|
26
|
+
end
|
27
|
+
|
28
|
+
context "when pixels equals limit" do
|
29
|
+
before { stub_const("Jani::StripMaker::MAX_PIXELS_FOR_MOBILE_SAFARI", images_count + 1) }
|
30
|
+
it { expect(strip).not_to be_big_enough }
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when pixels is below limit" do
|
34
|
+
before { stub_const("Jani::StripMaker::MAX_PIXELS_FOR_MOBILE_SAFARI", images_count) }
|
35
|
+
it { expect(strip).to be_big_enough }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jani-strip_maker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shin'ichi Ohno
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rmagick
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.13.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.13.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: streamio-ffmpeg
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-collection_matchers
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Make jani(https://github.com/shin1ohno/jani) strip from movie file.
|
98
|
+
email:
|
99
|
+
- shin1ohno@me.com
|
100
|
+
executables:
|
101
|
+
- strip_maker
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- ".gitignore"
|
106
|
+
- ".rspec"
|
107
|
+
- ".ruby-version"
|
108
|
+
- ".travis.yml"
|
109
|
+
- Gemfile
|
110
|
+
- Guardfile
|
111
|
+
- LICENSE.txt
|
112
|
+
- README.md
|
113
|
+
- Rakefile
|
114
|
+
- bin/strip_maker
|
115
|
+
- jani-strip_maker.gemspec
|
116
|
+
- lib/jani/strip_maker.rb
|
117
|
+
- lib/jani/strip_maker/cli.rb
|
118
|
+
- lib/jani/strip_maker/frame_list.rb
|
119
|
+
- lib/jani/strip_maker/movie.rb
|
120
|
+
- lib/jani/strip_maker/strip.rb
|
121
|
+
- lib/jani/strip_maker/transcode_options.rb
|
122
|
+
- lib/jani/strip_maker/version.rb
|
123
|
+
- spec/fixtures/images/100x100.jpg
|
124
|
+
- spec/fixtures/movies/kuro.mov
|
125
|
+
- spec/jani/strip_maker/frame_list_spec.rb
|
126
|
+
- spec/jani/strip_maker/movie_spec.rb
|
127
|
+
- spec/jani/strip_maker/strip_spec.rb
|
128
|
+
- spec/jani/strip_maker_spec.rb
|
129
|
+
- spec/spec_helper.rb
|
130
|
+
homepage: https://github.com/shin1ohno/jani-strip_maker
|
131
|
+
licenses:
|
132
|
+
- MIT
|
133
|
+
metadata: {}
|
134
|
+
post_install_message:
|
135
|
+
rdoc_options: []
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
requirements: []
|
149
|
+
rubyforge_project:
|
150
|
+
rubygems_version: 2.2.2
|
151
|
+
signing_key:
|
152
|
+
specification_version: 4
|
153
|
+
summary: Make jani strip from movie file
|
154
|
+
test_files:
|
155
|
+
- spec/fixtures/images/100x100.jpg
|
156
|
+
- spec/fixtures/movies/kuro.mov
|
157
|
+
- spec/jani/strip_maker/frame_list_spec.rb
|
158
|
+
- spec/jani/strip_maker/movie_spec.rb
|
159
|
+
- spec/jani/strip_maker/strip_spec.rb
|
160
|
+
- spec/jani/strip_maker_spec.rb
|
161
|
+
- spec/spec_helper.rb
|