easyvideo_utils 0.3.0 → 0.3.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/easyvideo_utils.rb +23 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cf96bd7cae7c924f5bc6259a374b4f3869f5a99aa936f9bc965ade2678b3301
|
4
|
+
data.tar.gz: 2794a519340d3142e0958dd35b46d9f62776978ea1ecd3835370afab929f260d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e705fe92de0df9800359f0a39b0bec628c9b423a4e8ab0371a4d6bb65d45d01be14b0c1e719243a0d8df693e871db5209028a5009d70caf510dd668cb8a78de8
|
7
|
+
data.tar.gz: 2bea5237a862fb1de00261d4c43a91dd7a1215e558f63eab8b2045d587c2c27f6e054a6d5ed4039bf0c6cb0357b723ceb1903dd88551d6bbadac5b0c5d365188
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/easyvideo_utils.rb
CHANGED
@@ -20,8 +20,8 @@ module CommandHelper
|
|
20
20
|
" %s %s %s" % ['*'.blue, command, desc.to_s.light_black]
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
puts a.map {|x| format_command.call(x) }.join("\n")
|
24
|
+
|
25
25
|
end
|
26
26
|
|
27
27
|
def search(s)
|
@@ -39,6 +39,8 @@ class EasyVideoUtils
|
|
39
39
|
* concat # concatenate 2 or more videos
|
40
40
|
* convert # alias for transcode
|
41
41
|
* capture # capture the desktop at 1024x768
|
42
|
+
* create_poster # Video created from audio file + static image
|
43
|
+
* create_slideshow # Combines images to create a video. Defaults to 5 seconds per image
|
42
44
|
* extract_images # Extracts images at 1 FPS by default
|
43
45
|
* play # plays the video using mplayer
|
44
46
|
* preview # plays the video using ffplay
|
@@ -112,7 +114,25 @@ class EasyVideoUtils
|
|
112
114
|
|
113
115
|
run command, show
|
114
116
|
|
115
|
-
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# creates a video from an audio file along with a single image file
|
120
|
+
#
|
121
|
+
def create_poster(audiox=nil, imagex=nil, image: imagex,
|
122
|
+
audio: audiox, show: false)
|
123
|
+
command = "ffmpeg -loop 1 -i #{image} -i #{audio} -c:v libx264 -c:a " +
|
124
|
+
"aac -strict experimental -b:a 192k -shortest #{@file_out}"
|
125
|
+
run command, show
|
126
|
+
end
|
127
|
+
|
128
|
+
def create_slideshow(ext: '.jpg', image_duration: 5, show: false)
|
129
|
+
|
130
|
+
file_mask = @file_in || "image-%03d" + ext
|
131
|
+
command = "ffmpeg -r 1/#{image_duration} -i #{file_mask} -c:v " +
|
132
|
+
"libx264 -r 30 -pix_fmt yuv420p #{@file_out}"
|
133
|
+
run command, show
|
134
|
+
|
135
|
+
end
|
116
136
|
|
117
137
|
# Duration returned in seconds
|
118
138
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easyvideo_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
iOODRzCT1NjcNTH5nzIOVNDgsjVdBcyabDtEoJ+ABRBRC3QbmGexUCnpCQVsGRJh
|
36
36
|
aGOV1YBw3DOVQYevaOX+Vxuw
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-05-
|
38
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
metadata.gz.sig
CHANGED
Binary file
|