easyvideo_utils 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/easyvideo_utils.rb +24 -1
- metadata +6 -6
- 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: e19d1563478361d3113bb48dbea9b6cdbaffbf902304c78a83019ff064988401
|
4
|
+
data.tar.gz: f8a7ec1b9c9795a160e1b1a92ea75a9084e4ecf1c0724a70b0b3c6786f7e8b0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08ae49f875143e7fe3de8fc222fdca8cfffc9b7b3c060982f1e997935769ff364be040eaca5ef5d3a463091a8cc098af9e8690fee4a337d3891633819aa79b71'
|
7
|
+
data.tar.gz: 7d9de2554ecfe8cf8ca045d397055e9e6c04c3170fd107680c691bdc6079ac95265c23ca1f62f8339088a299c7353e9dcf40d26f3df4661f6180282d39e70af4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/easyvideo_utils.rb
CHANGED
@@ -7,7 +7,7 @@ require 'subunit'
|
|
7
7
|
require 'easyimg_utils'
|
8
8
|
|
9
9
|
# requirements:
|
10
|
-
# `apt-get install mplayer ffmpeg vorbis-tools
|
10
|
+
# `apt-get install mplayer ffmpeg vorbis-tools exiftool libav-tools`
|
11
11
|
|
12
12
|
# note: Although this gem tries to be full-proof it's dependent upon the
|
13
13
|
# command-line tools to do the heavy lifting, as a result is prone
|
@@ -16,6 +16,11 @@ require 'easyimg_utils'
|
|
16
16
|
# the extension type when using multiple
|
17
17
|
# operations e.g. EasyVideoUtils.new('vid2.avi', 'vid3.mp4').resize
|
18
18
|
|
19
|
+
# installing youtube-dl:
|
20
|
+
#
|
21
|
+
# `sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl`
|
22
|
+
#
|
23
|
+
# `sudo chmod a+rx /usr/bin/youtube-dl`
|
19
24
|
|
20
25
|
module CommandHelper
|
21
26
|
using ColouredText
|
@@ -49,6 +54,7 @@ class EasyVideoUtils
|
|
49
54
|
* create_poster # Video created from audio file + static image
|
50
55
|
* create_slideshow # Combines images to create a video. Defaults to 5 seconds per image
|
51
56
|
* extract_images # Extracts images at 1 FPS by default
|
57
|
+
* info
|
52
58
|
* grab_image # grabs a single image at 1 second in by default
|
53
59
|
* play # plays the video using mplayer
|
54
60
|
* preview # plays the video using ffplay
|
@@ -62,6 +68,7 @@ class EasyVideoUtils
|
|
62
68
|
* speedup # speed a video up. Defaults to x2 (twice as fast)
|
63
69
|
* transcode # converts 1 video format to another e.g. avi-> mp4 or gif -> mp4
|
64
70
|
* trim # trims the beginning and ending of a video in hms format e.g. 1m 3s
|
71
|
+
* youtube_dl # downloads in mp4 format
|
65
72
|
".strip.lines.map {|x| x[/(?<=\* ).*/]}.sort
|
66
73
|
|
67
74
|
|
@@ -175,6 +182,11 @@ class EasyVideoUtils
|
|
175
182
|
run command, show
|
176
183
|
end
|
177
184
|
|
185
|
+
def info(show: false)
|
186
|
+
command = "avprobe #{@file_in}"
|
187
|
+
run command, show
|
188
|
+
end
|
189
|
+
|
178
190
|
def grab_image(start_time=1, show: false)
|
179
191
|
command = "avconv -i #{@file_in} -ss #{start_time.to_s} -frames:v 1 #{@file_out} -y"
|
180
192
|
run command, show
|
@@ -281,6 +293,17 @@ class EasyVideoUtils
|
|
281
293
|
run command, show
|
282
294
|
|
283
295
|
end
|
296
|
+
|
297
|
+
# Download a video from YouTube
|
298
|
+
#
|
299
|
+
def youtube_dl(show: false)
|
300
|
+
|
301
|
+
command = "youtube-dl -f 'bestvideo[ext=mp4]+" +
|
302
|
+
"bestaudio[ext=m4a]/best[ext=mp4]/best' #{@file_in}"
|
303
|
+
command += ' -o ' + @file_out if @file_out
|
304
|
+
run command, show
|
305
|
+
|
306
|
+
end
|
284
307
|
|
285
308
|
private
|
286
309
|
|
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.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
z3BcuiLNXpgNVf4IGK7eFvn3lmuLv4R3rZvuHQeWE12PaDq/WP2kcVMaJ7/2ujxI
|
36
36
|
JAnTxrqZVNfrRpKAGKs0QV7g
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-
|
38
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
@@ -63,20 +63,20 @@ dependencies:
|
|
63
63
|
requirements:
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.
|
66
|
+
version: 0.5.0
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0.
|
69
|
+
version: '0.5'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.
|
76
|
+
version: 0.5.0
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0.
|
79
|
+
version: '0.5'
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: easyimg_utils
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|