easyvideo_utils 0.2.0 → 0.2.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 +26 -0
- 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: 1f716119d3f6395b58b11b527de76f0ebd8d12ee5043b81e52a5cc65e01dcf48
|
4
|
+
data.tar.gz: dc04db29e024f0002f794e019ac7ea30c00af5adc7b0c434b6e474fcc19c4556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bad1f722e1dc80c47e741ecac899638875ae239d72d6e28f178fb2f4abc19f0974890d1f9603c9f55cb67cc337b47562885d5456c21df9e99879834e3482f5e
|
7
|
+
data.tar.gz: a18e5fed955059d95a8e59be0d6250e662a594948786bd1ede49a1ccd19dbfaf6cd85690189cf3d6bb10360a2d0666572b299715b413e3dc9873899c24443f74
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/easyvideo_utils.rb
CHANGED
@@ -36,9 +36,11 @@ class EasyVideoUtils
|
|
36
36
|
@commands = "
|
37
37
|
* add_audio # add an audio track
|
38
38
|
* add_subtitles # add subtitles from a .srt file
|
39
|
+
* concat # concatenate 2 or more videos
|
39
40
|
* convert # alias for transcode
|
40
41
|
* capture # capture the desktop at 1024x768
|
41
42
|
* play # plays the video using mplayer
|
43
|
+
* preview # plays the video using ffplay
|
42
44
|
* record # alias for capture
|
43
45
|
* resize # resize to 720p
|
44
46
|
* scale # alias for resize
|
@@ -82,6 +84,25 @@ class EasyVideoUtils
|
|
82
84
|
|
83
85
|
end
|
84
86
|
|
87
|
+
# Concatenate 2 or more videos
|
88
|
+
#
|
89
|
+
# Notes:
|
90
|
+
# * Video must be of same format and codec
|
91
|
+
# * Only video with no audio is currently supported
|
92
|
+
#
|
93
|
+
def concat(files=[], show: false)
|
94
|
+
|
95
|
+
inputs = files.map {|file| "-i #{file}"}.join(' ')
|
96
|
+
filter = files.map.with_index {|file,i| "[%s:v]" % i}.join(' ')
|
97
|
+
|
98
|
+
command = "ffmpeg #{inputs} \ " +
|
99
|
+
" -filter_complex \"#{filter} concat=n=#{files.length}:v=1 [v]\" \ " +
|
100
|
+
" -map \"[v]\" #{@file_out}"
|
101
|
+
|
102
|
+
run command, show
|
103
|
+
|
104
|
+
end
|
105
|
+
|
85
106
|
# Duration returned in seconds
|
86
107
|
#
|
87
108
|
def duration()
|
@@ -106,6 +127,11 @@ class EasyVideoUtils
|
|
106
127
|
command = "mplayer #{@file_out}"
|
107
128
|
run command, show
|
108
129
|
end
|
130
|
+
|
131
|
+
def preview(show: false)
|
132
|
+
command = "ffplay #{@file_out}"
|
133
|
+
run command, show
|
134
|
+
end
|
109
135
|
|
110
136
|
# Resize avi to 720p
|
111
137
|
#
|
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.2.
|
4
|
+
version: 0.2.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-06 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
metadata.gz.sig
CHANGED
Binary file
|