videoinfo 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/videoinfo/cli.rb +2 -2
- data/lib/videoinfo/version.rb +1 -1
- data/lib/videoinfo/video.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1540c9b1061478e09e127acc50285960818975d2
|
4
|
+
data.tar.gz: 5e5582afcd1e71270f0ed0c1b8c3789599fa08b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 918d9b8527206079e62374e7aef1c926cba884f139d87b40a35e37abe8de11da353f26cf97413c0e6faebaf1709e2d101eb2c3f83cd205ae627564e964904a2c
|
7
|
+
data.tar.gz: 40d61469cc99306aa8548a582f4b163389c02eae4d6b074fed0232669cab681ea81dec2d9a8c7f7672eed31a7f6b8e51b33e041fde6c193590d5b66c69c4c78b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -40,7 +40,7 @@ Videoinfo.interactive = true # defaults to true when using
|
|
40
40
|
$ videoinfo -h
|
41
41
|
Usage: videoinfo [options] "MOVIENAME/SHOWNAME" file
|
42
42
|
-i, --image-host=IMAGEHOST The image host to use for uploading screenshots. Default: Imgur
|
43
|
-
-s, --screenshots=SCREENSHOTS The number of screenshots to create, max
|
43
|
+
-s, --screenshots=SCREENSHOTS The number of screenshots to create, max 6. Default: 2
|
44
44
|
-e, --episode=EPISODE The TV show episode or season number. Formats: S01E01 or S01
|
45
45
|
-n, --no-prompt Disable interactive mode
|
46
46
|
-h, --help Show this message
|
data/lib/videoinfo/cli.rb
CHANGED
@@ -16,9 +16,9 @@ module Videoinfo
|
|
16
16
|
opts.on('-i', '--image-host=IMAGEHOST', "The image host to use for uploading screenshots. Default: #{image_host}") do |host|
|
17
17
|
image_host = host
|
18
18
|
end
|
19
|
-
opts.on('-s', '--screenshots=SCREENSHOTS', "The number of screenshots to create, max
|
19
|
+
opts.on('-s', '--screenshots=SCREENSHOTS', "The number of screenshots to create, max 6. Default: #{screenshots}") do |ss|
|
20
20
|
screenshots = ss.to_i
|
21
|
-
if screenshots >
|
21
|
+
if screenshots > 6
|
22
22
|
STDERR.puts opts
|
23
23
|
exit 1
|
24
24
|
end
|
data/lib/videoinfo/version.rb
CHANGED
data/lib/videoinfo/video.rb
CHANGED
@@ -41,8 +41,8 @@ module Videoinfo
|
|
41
41
|
raise Error, 'unable to determine video duration' unless $?.success? && duration > 0
|
42
42
|
|
43
43
|
images = []
|
44
|
-
stepsize = screenshots == 1 ? 100 :
|
45
|
-
(
|
44
|
+
stepsize = screenshots == 1 ? 100 : 25 / (screenshots - 1)
|
45
|
+
(5..30).step(stepsize) do |percent|
|
46
46
|
image = Tempfile.new(["ss_#{percent}.", '.png'])
|
47
47
|
%x(#{Videoinfo.ffmpeg_binary} -y -ss #{duration * percent / 100} -i #{file.shellescape} -vframes 1 -f image2 #{image.path} -v quiet)
|
48
48
|
if $?.success?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: videoinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Johns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: imdb
|
@@ -74,7 +74,7 @@ requirements:
|
|
74
74
|
- mediainfo
|
75
75
|
- ffmpeg
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
77
|
+
rubygems_version: 2.5.1
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Simple tool for aggregating video metadata and capturing screenshots
|