ffmpeg-screenrecorder 1.0.0.beta3 → 1.0.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -11
- data/ffmpeg-screenrecorder.gemspec +32 -31
- data/lib/ffmpeg/{windows.rb → recording_regions.rb} +3 -3
- data/lib/ffmpeg/screenrecorder.rb +3 -3
- data/lib/ffmpeg/version.rb +5 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 857bc0e6533ccdb8dcc9c0c82cae13028e205173f14997177f2638f5a93ae65e
|
4
|
+
data.tar.gz: 774c93d3e295012d242b1df752460880d93b01a41abc86812e37fa389788293a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 780bf876cff8c52ef37db709ba971ca4b80a2eab4422cbc6e8ee211bd363e103563217b7d8ab246f614c7d445d62895756ee078dab465bc2fbf644503f460d54
|
7
|
+
data.tar.gz: 185f4b69f1932a88d1332f72db132e4ad8d46ff7457ae5a034119ebfe750efd13e8723d4395e691f86e5ea557928fdb1891d5c016939cb8c297c838d6f346730
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# FFMPEG::Screenrecorder
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/ffmpeg-screenrecorder.svg)](https://badge.fury.io/rb/ffmpeg-screenrecorder)
|
4
|
+
|
5
|
+
Ruby gem to record your computer screen - desktop or specific application/window - using [FFmpeg](https://www.ffmpeg.org/).
|
4
6
|
|
5
7
|
## Windows Only
|
6
8
|
|
@@ -50,11 +52,11 @@ Or install it yourself as:
|
|
50
52
|
##### Record Desktop
|
51
53
|
|
52
54
|
```
|
53
|
-
opts
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
opts = { output: 'ffmpeg-screenrecorder-desktop.mp4',
|
56
|
+
input: 'desktop',
|
57
|
+
framerate: 30.0,
|
58
|
+
device: 'gdigrab',
|
59
|
+
log: 'ffmpeg-screenrecorder-log.txt' }
|
58
60
|
@recorder = FFMPEG::Screenrecorder.new(opts)
|
59
61
|
|
60
62
|
# Start recording
|
@@ -65,7 +67,7 @@ opts = { output: 'ffmpeg-screenrecorder-output.mp4',
|
|
65
67
|
# Stop recording
|
66
68
|
@recorder.stop
|
67
69
|
|
68
|
-
# Recording file will be available: ffmpeg-screenrecorder-
|
70
|
+
# Recording file will be available: ffmpeg-screenrecorder-desktop.mp4
|
69
71
|
```
|
70
72
|
|
71
73
|
##### Record Specific Application/Window
|
@@ -87,7 +89,9 @@ opts = { output: 'ffmpeg-screenrecorder-firefox.mp4',
|
|
87
89
|
# Start recording
|
88
90
|
@recorder.start
|
89
91
|
|
90
|
-
#
|
92
|
+
# Run tests or whatever you want to record
|
93
|
+
browser.goto 'watir.com'
|
94
|
+
browser.link(text: 'News').wait_until_present.click
|
91
95
|
|
92
96
|
# Stop recording
|
93
97
|
@recorder.stop
|
@@ -96,18 +100,18 @@ browser.quit
|
|
96
100
|
```
|
97
101
|
|
98
102
|
<b>Note</b>:
|
99
|
-
1. Always stop the recording before closing the application. Otherwise, ffmpeg will
|
103
|
+
1. Always stop the recording before closing the application. Otherwise, ffmpeg will force exit as soon as the window disappears and may produce an invalid video file.
|
100
104
|
2. If you're launching multiple applications or testing an application at different window sizes, recording the `desktop` is a better option.
|
101
105
|
|
102
106
|
## Development
|
103
107
|
|
104
108
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
105
109
|
|
106
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
110
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
107
111
|
|
108
112
|
## Contributing
|
109
113
|
|
110
|
-
Bug reports and pull requests are welcome
|
114
|
+
Bug reports and pull requests are welcome. Please follow the Ruby style guide here: https://github.com/rubocop-hq/ruby-style-guide
|
111
115
|
|
112
116
|
## License
|
113
117
|
|
@@ -1,31 +1,32 @@
|
|
1
|
-
lib = File.expand_path('lib', __dir__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
spec.
|
7
|
-
spec.
|
8
|
-
spec.
|
9
|
-
|
10
|
-
|
11
|
-
spec.
|
12
|
-
|
13
|
-
|
14
|
-
spec.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency '
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency '
|
28
|
-
|
29
|
-
|
30
|
-
spec.add_runtime_dependency '
|
31
|
-
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'ffmpeg/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'ffmpeg-screenrecorder'
|
7
|
+
spec.version = FFMPEG::Screenrecorder::VERSION
|
8
|
+
spec.authors = ['Lakshya Kapoor']
|
9
|
+
spec.email = ['kapoorlakshya@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Record your computer screen using ffmpeg via Ruby.'
|
12
|
+
spec.description = 'Ruby gem to record your computer screen - desktop or specific application/window' \
|
13
|
+
' - using FFmpeg (https://www.ffmpeg.org).'
|
14
|
+
spec.homepage = 'http://github.com/kapoorlakshya/ffmpeg-screenrecorder'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
18
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
end
|
20
|
+
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
24
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.6'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
+
spec.add_development_dependency 'watir', '~> 6.0'
|
28
|
+
spec.add_development_dependency 'webdrivers', '~> 3.0'
|
29
|
+
|
30
|
+
spec.add_runtime_dependency 'os', '~> 0.9.0'
|
31
|
+
spec.add_runtime_dependency 'streamio-ffmpeg', '~> 1.0'
|
32
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module FFMPEG
|
2
|
-
# @since 1.0.0-
|
3
|
-
module
|
2
|
+
# @since 1.0.0-beta4
|
3
|
+
module RecordingRegions
|
4
4
|
|
5
5
|
#
|
6
6
|
# Returns a list of available window titles for the given application (process) name.
|
@@ -10,7 +10,7 @@ module FFMPEG
|
|
10
10
|
WindowGrabber.new.available_windows_for application
|
11
11
|
end
|
12
12
|
|
13
|
-
# @since 1.0.0-
|
13
|
+
# @since 1.0.0-beta4
|
14
14
|
class WindowGrabber
|
15
15
|
#
|
16
16
|
# Returns a cleaned up list of available window titles
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'streamio-ffmpeg'
|
2
2
|
require 'os'
|
3
3
|
require_relative 'recorder_options'
|
4
|
-
require_relative '
|
4
|
+
require_relative 'recording_regions'
|
5
5
|
|
6
6
|
module FFMPEG
|
7
7
|
# @since 1.0.0-beta1
|
8
8
|
class Screenrecorder
|
9
|
-
extend
|
9
|
+
extend RecordingRegions
|
10
10
|
|
11
11
|
attr_reader :options, :video
|
12
12
|
|
@@ -67,7 +67,7 @@ module FFMPEG
|
|
67
67
|
# Initializes the logger with the given log level.
|
68
68
|
#
|
69
69
|
def initialize_logger(level)
|
70
|
-
FFMPEG.logger.progname = '
|
70
|
+
FFMPEG.logger.progname = 'FFmpeg'
|
71
71
|
FFMPEG.logger.level = level
|
72
72
|
FFMPEG.logger.formatter = proc do |severity, time, progname, msg|
|
73
73
|
"#{time.strftime('%F %T')} #{progname} - #{severity} - #{msg}\n"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffmpeg-screenrecorder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lakshya Kapoor
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '1.0'
|
125
125
|
description: Ruby gem to record your computer screen - desktop or specific application/window
|
126
|
-
- using
|
126
|
+
- using FFmpeg (https://www.ffmpeg.org).
|
127
127
|
email:
|
128
128
|
- kapoorlakshya@gmail.com
|
129
129
|
executables: []
|
@@ -143,8 +143,9 @@ files:
|
|
143
143
|
- ffmpeg-screenrecorder.gemspec
|
144
144
|
- lib/ffmpeg.rb
|
145
145
|
- lib/ffmpeg/recorder_options.rb
|
146
|
+
- lib/ffmpeg/recording_regions.rb
|
146
147
|
- lib/ffmpeg/screenrecorder.rb
|
147
|
-
- lib/ffmpeg/
|
148
|
+
- lib/ffmpeg/version.rb
|
148
149
|
homepage: http://github.com/kapoorlakshya/ffmpeg-screenrecorder
|
149
150
|
licenses:
|
150
151
|
- MIT
|