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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cfb8ec45f4c34388844f4c8d67b364f69f143af97c19ee2f3aab3ee83b96a89
4
- data.tar.gz: 53ebae5e818683a2bfdd600015331ed0aefd27cea99e48aaa675dabc9b5d6f26
3
+ metadata.gz: 1f716119d3f6395b58b11b527de76f0ebd8d12ee5043b81e52a5cc65e01dcf48
4
+ data.tar.gz: dc04db29e024f0002f794e019ac7ea30c00af5adc7b0c434b6e474fcc19c4556
5
5
  SHA512:
6
- metadata.gz: 158d6800577c650de64b07fdd9ae8b32949173073cedf01f790099da5e5d56eb23384649b47cf5269f4e5b81544f719a7806dcb8e25281f6fb3b484c980d32b6
7
- data.tar.gz: c285f7928a43fc17f94c0dcadb72a966f02544f9053c1b5b3e89a51726ce175135dcdb405c2279a50d60f688078194f5d750033540025b7be6e87f9d164e0954
6
+ metadata.gz: 8bad1f722e1dc80c47e741ecac899638875ae239d72d6e28f178fb2f4abc19f0974890d1f9603c9f55cb67cc337b47562885d5456c21df9e99879834e3482f5e
7
+ data.tar.gz: a18e5fed955059d95a8e59be0d6250e662a594948786bd1ede49a1ccd19dbfaf6cd85690189cf3d6bb10360a2d0666572b299715b413e3dc9873899c24443f74
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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.0
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-05 00:00:00.000000000 Z
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