screen-recorder 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +7 -5
- data/.gitignore +99 -107
- data/.rspec +3 -3
- data/.rubocop.yml +45 -37
- data/.travis.yml +35 -32
- data/CHANGES.md +78 -70
- data/LICENSE.txt +21 -21
- data/README.md +218 -210
- data/Rakefile +6 -1
- data/bin/console +0 -0
- data/bin/setup +8 -8
- data/lib/screen-recorder.rb +53 -45
- data/lib/screen-recorder/common.rb +146 -127
- data/lib/screen-recorder/desktop.rb +40 -30
- data/lib/screen-recorder/errors.rb +9 -9
- data/lib/screen-recorder/options.rb +151 -148
- data/lib/screen-recorder/titles.rb +49 -81
- data/lib/screen-recorder/type_checker.rb +11 -11
- data/lib/screen-recorder/version.rb +2 -2
- data/lib/screen-recorder/window.rb +22 -22
- data/screen-recorder.gemspec +40 -31
- metadata +54 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f46c2cd0518ebc956772cc5586b95974e0f51cede0d456ff0934bb2aaa9cef92
|
4
|
+
data.tar.gz: a8f5113b23a9a3521a282e9385f7c8502e01991594ee065eb6cf5a55fd6403f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '059777ec5a7b09f8c1bf97727c57f07cf4172918a445aa1015544b92cb4bf8454ea6d5c79daaf8aab0667aad132ec6fcb466ce52cc365f05cb9f598fd8266445'
|
7
|
+
data.tar.gz: 0ecbe285d1a4d6f9fd6f579c9233614d6e8e1f0130ab31d9f40ba2f348e2dac8ba3d1cc82f9fc0f0340f2f1215fec9e89f89996688dce76ab26bc7c7efc42034
|
data/.github/ISSUE_TEMPLATE.md
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
### Summary
|
2
|
-
|
2
|
+
Short summary of the bug or feature request.
|
3
3
|
|
4
4
|
### Debug Info
|
5
|
-
Please provide the following information:
|
5
|
+
Please provide the following information for bug reports:
|
6
6
|
|
7
7
|
* Operating system - Microsoft Windows, Linux, or macOS.
|
8
|
-
*
|
8
|
+
* Recorder parameters - input, output, etc.
|
9
9
|
* Recorder log (`ffmpeg.log`) file as a gist or on pastebin.com.
|
10
|
-
* Set `
|
10
|
+
* Set `ScreenRecorder.logger.level = Logger::DEBUG`, run the recorder, and share the
|
11
11
|
console output as a gist or on pastebin.com.
|
12
12
|
|
13
13
|
### Expected Behavior
|
14
|
+
What you expect to happen.
|
14
15
|
|
15
|
-
### Actual Behavior
|
16
|
+
### Actual Behavior
|
17
|
+
What is actually happening.
|
data/.gitignore
CHANGED
@@ -1,108 +1,100 @@
|
|
1
|
-
Gemfile.lock # Part of best practice
|
2
|
-
|
3
|
-
# Created by https://www.gitignore.io/api/rubymine+all
|
4
|
-
|
5
|
-
### RubyMine+all ###
|
6
|
-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
7
|
-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
8
|
-
|
9
|
-
/.bundle/
|
10
|
-
/.yardoc
|
11
|
-
/_yardoc/
|
12
|
-
/coverage/
|
13
|
-
/doc/
|
14
|
-
/pkg/
|
15
|
-
/spec/reports/
|
16
|
-
/tmp/
|
17
|
-
/webdrivers_bin
|
18
|
-
*.log
|
19
|
-
*.mkv
|
20
|
-
*.mp4
|
21
|
-
*.avi
|
22
|
-
*.gif
|
23
|
-
|
24
|
-
Gemfile.lock
|
25
|
-
|
26
|
-
# rspec failure tracking
|
27
|
-
.rspec_status
|
28
|
-
|
29
|
-
#
|
30
|
-
.idea
|
31
|
-
|
32
|
-
|
33
|
-
.idea/**/
|
34
|
-
.idea/**/
|
35
|
-
.idea/**/
|
36
|
-
|
37
|
-
|
38
|
-
.idea/**/
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
.idea/**/
|
43
|
-
.idea/**/
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
.
|
48
|
-
|
49
|
-
#
|
50
|
-
.idea
|
51
|
-
.idea
|
52
|
-
|
53
|
-
#
|
54
|
-
|
55
|
-
|
56
|
-
#
|
57
|
-
|
58
|
-
|
59
|
-
#
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
#
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
.
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
.
|
99
|
-
|
100
|
-
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
101
|
-
|
102
|
-
*.iml
|
103
|
-
modules.xml
|
104
|
-
.idea/misc.xml
|
105
|
-
*.ipr
|
106
|
-
|
107
|
-
|
1
|
+
Gemfile.lock # Part of best practice
|
2
|
+
|
3
|
+
# Created by https://www.gitignore.io/api/rubymine+all
|
4
|
+
|
5
|
+
### RubyMine+all ###
|
6
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
7
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
8
|
+
|
9
|
+
/.bundle/
|
10
|
+
/.yardoc
|
11
|
+
/_yardoc/
|
12
|
+
/coverage/
|
13
|
+
/doc/
|
14
|
+
/pkg/
|
15
|
+
/spec/reports/
|
16
|
+
/tmp/
|
17
|
+
/webdrivers_bin
|
18
|
+
*.log
|
19
|
+
*.mkv
|
20
|
+
*.mp4
|
21
|
+
*.avi
|
22
|
+
*.gif
|
23
|
+
|
24
|
+
Gemfile.lock
|
25
|
+
|
26
|
+
# rspec failure tracking
|
27
|
+
.rspec_status
|
28
|
+
|
29
|
+
# Generated files
|
30
|
+
.idea/**/contentModel.xml
|
31
|
+
|
32
|
+
# Sensitive or high-churn files
|
33
|
+
.idea/**/dataSources/
|
34
|
+
.idea/**/dataSources.ids
|
35
|
+
.idea/**/dataSources.local.xml
|
36
|
+
.idea/**/sqlDataSources.xml
|
37
|
+
.idea/**/dynamic.xml
|
38
|
+
.idea/**/uiDesigner.xml
|
39
|
+
.idea/**/dbnavigator.xml
|
40
|
+
|
41
|
+
# Gradle
|
42
|
+
.idea/**/gradle.xml
|
43
|
+
.idea/**/libraries
|
44
|
+
|
45
|
+
# Gradle and Maven with auto-import
|
46
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
47
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
48
|
+
# auto-import.
|
49
|
+
# .idea/modules.xml
|
50
|
+
# .idea/*.iml
|
51
|
+
# .idea/modules
|
52
|
+
|
53
|
+
# CMake
|
54
|
+
cmake-build-*/
|
55
|
+
|
56
|
+
# Mongo Explorer plugin
|
57
|
+
.idea/**/mongoSettings.xml
|
58
|
+
|
59
|
+
# File-based project format
|
60
|
+
*.iws
|
61
|
+
|
62
|
+
# IntelliJ
|
63
|
+
out/
|
64
|
+
|
65
|
+
# mpeltonen/sbt-idea plugin
|
66
|
+
.idea_modules/
|
67
|
+
|
68
|
+
# JIRA plugin
|
69
|
+
atlassian-ide-plugin.xml
|
70
|
+
|
71
|
+
# Cursive Clojure plugin
|
72
|
+
.idea/replstate.xml
|
73
|
+
|
74
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
75
|
+
com_crashlytics_export_strings.xml
|
76
|
+
crashlytics.properties
|
77
|
+
crashlytics-build.properties
|
78
|
+
fabric.properties
|
79
|
+
|
80
|
+
# Editor-based Rest Client
|
81
|
+
.idea/httpRequests
|
82
|
+
|
83
|
+
# Android studio 3.1+ serialized cache file
|
84
|
+
.idea/caches/build_file_checksums.ser
|
85
|
+
|
86
|
+
### RubyMine+all Patch ###
|
87
|
+
# Ignores the whole .idea folder and all .iml files
|
88
|
+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
89
|
+
|
90
|
+
.idea/
|
91
|
+
|
92
|
+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
93
|
+
|
94
|
+
*.iml
|
95
|
+
modules.xml
|
96
|
+
*.ipr
|
97
|
+
|
98
|
+
.DS_Store # On mac
|
99
|
+
|
108
100
|
# End of https://www.gitignore.io/api/rubymine+all
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--format documentation
|
2
|
-
--color
|
3
|
-
--require spec_helper
|
1
|
+
--format documentation
|
2
|
+
--color
|
3
|
+
--require spec_helper
|
data/.rubocop.yml
CHANGED
@@ -1,50 +1,58 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require: rubocop-rspec
|
2
|
+
AllCops:
|
3
|
+
DisplayCopNames: true
|
4
|
+
DisplayStyleGuide: true
|
5
|
+
ExtraDetails: false
|
6
|
+
TargetRubyVersion: 2.2
|
7
|
+
Gemspec/RequiredRubyVersion:
|
8
|
+
Enabled: false
|
4
9
|
Metrics/LineLength:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
Enabled: false
|
11
|
+
Metrics/MethodLength:
|
12
|
+
Enabled: false
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Enabled: false
|
15
|
+
Metrics/ClassLength:
|
16
|
+
Enabled: false
|
17
|
+
Metrics/AbcSize:
|
18
|
+
Enabled: false
|
19
|
+
Metrics/CyclomaticComplexity:
|
20
|
+
Enabled: false
|
21
|
+
Style/Documentation:
|
22
|
+
Enabled: false
|
23
|
+
RSpec/ExampleLength:
|
24
|
+
Enabled: false
|
25
|
+
RSpec/MultipleExpectations:
|
26
|
+
Enabled: false
|
27
|
+
Layout/MultilineMethodCallIndentation:
|
28
|
+
Enabled: false
|
29
|
+
EnforcedStyle: indented_relative_to_receiver
|
30
|
+
Layout/AlignArray:
|
31
|
+
Enabled: true
|
32
|
+
Layout/AlignHash:
|
33
|
+
Enabled: true
|
34
|
+
EnforcedHashRocketStyle: key
|
35
|
+
EnforcedColonStyle: table
|
36
|
+
Layout/AlignParameters:
|
37
|
+
Enabled: true
|
38
|
+
EnforcedStyle: with_first_parameter
|
39
|
+
Layout/EndOfLine:
|
40
|
+
Enabled: false
|
41
|
+
Layout/IndentHash:
|
42
|
+
Enabled: true
|
43
|
+
Naming/FileName:
|
44
|
+
Enabled: false
|
45
|
+
RSpec/FilePath:
|
46
|
+
Enabled: false
|
13
47
|
Style/BlockDelimiters:
|
14
48
|
EnforcedStyle: braces_for_chaining
|
15
|
-
|
16
49
|
Style/CommentedKeyword:
|
17
50
|
Enabled: false
|
18
|
-
|
19
51
|
Style/DoubleNegation:
|
20
52
|
Enabled: false
|
21
|
-
|
22
|
-
Metrics/MethodLength:
|
23
|
-
Max: 18
|
24
|
-
|
25
|
-
Metrics/PerceivedComplexity:
|
26
|
-
Max: 10
|
27
|
-
|
28
|
-
Metrics/CyclomaticComplexity:
|
29
|
-
Max: 8
|
30
|
-
|
31
|
-
Metrics/AbcSize:
|
32
|
-
Max: 20
|
33
|
-
|
34
53
|
Style/MethodCallWithoutArgsParentheses:
|
35
54
|
Enabled: false
|
36
|
-
|
37
|
-
Style/Documentation:
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
# Cop supports --auto-correct.
|
41
|
-
# Configuration parameters: EnforcedStyle.
|
42
|
-
# SupportedStyles: when_needed, always, never
|
43
55
|
Style/FrozenStringLiteralComment:
|
44
56
|
Enabled: false
|
45
|
-
|
46
57
|
TrailingBlankLines:
|
47
|
-
Enabled: false
|
48
|
-
|
49
|
-
Layout/MultilineMethodCallIndentation:
|
50
58
|
Enabled: false
|
data/.travis.yml
CHANGED
@@ -1,32 +1,35 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- 2.
|
15
|
-
- 2.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
1
|
+
---
|
2
|
+
os:
|
3
|
+
- linux
|
4
|
+
- osx
|
5
|
+
dist: xenial
|
6
|
+
language: ruby
|
7
|
+
cache: bundler
|
8
|
+
|
9
|
+
branches:
|
10
|
+
only:
|
11
|
+
- /.*/
|
12
|
+
|
13
|
+
rvm:
|
14
|
+
- 2.3.8
|
15
|
+
- 2.4.5
|
16
|
+
- 2.5.5
|
17
|
+
- 2.6.2
|
18
|
+
|
19
|
+
env:
|
20
|
+
- DISPLAY=":0"
|
21
|
+
|
22
|
+
addons:
|
23
|
+
firefox: latest
|
24
|
+
apt:
|
25
|
+
packages:
|
26
|
+
- ffmpeg
|
27
|
+
homebrew:
|
28
|
+
packages:
|
29
|
+
- ffmpeg
|
30
|
+
|
31
|
+
before_install:
|
32
|
+
- gem update --system --no-document
|
33
|
+
|
34
|
+
before_script:
|
35
|
+
- nohup Xvfb :0 -screen 0 1024x768x24 &
|
data/CHANGES.md
CHANGED
@@ -1,71 +1,79 @@
|
|
1
|
-
### 1.
|
2
|
-
*
|
3
|
-
*
|
4
|
-
|
5
|
-
*
|
6
|
-
|
7
|
-
*
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
*
|
18
|
-
|
19
|
-
### 1.0.0.
|
20
|
-
*
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
*
|
45
|
-
|
46
|
-
*
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
* `
|
52
|
-
*
|
53
|
-
*
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
*
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
*
|
70
|
-
*
|
1
|
+
### 1.1.0 (2019-04-14)
|
2
|
+
* <b>Add support for macOS</b> ([#55](https://github.com/kapoorlakshya/screen-recorder/issues/55)). Please [raise an Issue](https://github.com/kapoorlakshya/screen-recorder/issues/new) if you run into problems.
|
3
|
+
* Force kill `ffmpeg` if it takes more than 10s to quit ([#60](https://github.com/kapoorlakshya/screen-recorder/issues/60)).
|
4
|
+
* Fix a bug where `ScreenRecorder.ffmpeg_binary=()` was not properly defined.
|
5
|
+
* `ScreenRecorder::Titles#fetch` will now raise `NotImplementedError` when used in a
|
6
|
+
Linux or a macOS environment. Only works on Windows.
|
7
|
+
* Default `input` value on Linux is now `:0`.
|
8
|
+
|
9
|
+
### 1.0.0 (2019-03-15)
|
10
|
+
* Released first major version.
|
11
|
+
* Now uses `ScreenRecorder` as top level module. `FFMPEG` is not directly
|
12
|
+
exposed anymore.
|
13
|
+
* The recording modes are now available through `ScreenRecorder::Desktop`
|
14
|
+
and `ScreenRecorder::Window` classes to make the usage (parameters) simpler.
|
15
|
+
* Method parameters are now keywords instead of an `opts` Hash. This means
|
16
|
+
at least Ruby 2.0.0 is required.
|
17
|
+
* `framerate:` is now to be passed through the `advanced` Hash.
|
18
|
+
|
19
|
+
### 1.0.0.beta13 (2019-03-15)
|
20
|
+
* Gem will now be renamed to `screen-recorder`. Please refer to Issue
|
21
|
+
[#45](https://github.com/kapoorlakshya/screen-recorder/issues/45)
|
22
|
+
for more information.
|
23
|
+
|
24
|
+
### 1.0.0.beta12 (2019-03-12)
|
25
|
+
* Reverted post install message as `screen_recorder` is already taken.
|
26
|
+
|
27
|
+
### 1.0.0.beta11 (2019-03-12)
|
28
|
+
* Recording FPS (`framerate`) is defaulted to 15.0.
|
29
|
+
* Gem will soon be renamed to `screen_recorder`. Please refer to Issue
|
30
|
+
[#45](https://github.com/kapoorlakshya/screen-recorder/issues/45)
|
31
|
+
for more information.
|
32
|
+
|
33
|
+
### 1.0.0.beta10 (2019-02-05)
|
34
|
+
* Fixed an edge case in Microsoft Windows specific implementation of
|
35
|
+
`WindowTitles#fetch` where processes with mismatching names and window
|
36
|
+
titles, such as process `"Calculator.exe"` with window title `"CicMarshalWnd"`,
|
37
|
+
were omitted ([#35](https://github.com/kapoorlakshya/screen-recorder/issues/35)).
|
38
|
+
This fix also prints a warning when this mismatch occurs.
|
39
|
+
* Fixed bug in Linux specific `WindowTitles#fetch` implementation where
|
40
|
+
the filter by application name logic was removed. This filter is required
|
41
|
+
on Linux here because `wmctrl` returns all open window titles unlike
|
42
|
+
Microsoft Windows where `taskmgr` allows us get window titles by process
|
43
|
+
name.
|
44
|
+
* On Linux, you are now required to provide the `input` as `"desktop"`
|
45
|
+
or a display number, such as `":0.0"`. Run `echo $DISPLAY` to check your display number.
|
46
|
+
* QOL improvements - Type checking of inputs, spec cleanup, added more
|
47
|
+
tests, and fixed rubocop warnings.
|
48
|
+
|
49
|
+
### 1.0.0.beta9 (2019-01-22)
|
50
|
+
|
51
|
+
* :warning: `FFMPEG::RecordingRegions` is now `FFMPEG::WindowTitles`, so the module name is true to the function it provides.
|
52
|
+
* Added support for for a user given path via `FFMPEG#ffmpeg_binary=()`.
|
53
|
+
* Removed Bundler version requirement from gemspec to support all versions.
|
54
|
+
* Implement `#discard` (alias `#delete`) to discard the video file. Useful when your test passes and you want to get rid of the video file.
|
55
|
+
|
56
|
+
### 1.0.0.beta8 (2019-01-03)
|
57
|
+
|
58
|
+
* Fix a bug where the gem was incorrectly configured to be required as `ffmpeg/screenrecorder` instead of `screen-recorder`.
|
59
|
+
* `ScreenRecorder#start` now returns the IO process object in case the user has a use case for it.
|
60
|
+
* `RecordingRegion#fetch` now logs a warning that `x11grab` for Linux does not supporting window recording.
|
61
|
+
* :warning: Parameter `infile` is now `input` to make it more intuitive.
|
62
|
+
|
63
|
+
### 1.0.0.beta7 (2018-12-23)
|
64
|
+
|
65
|
+
* Fix bug in RecorderOptions where an incorrect object was referenced to read the user provided options.
|
66
|
+
|
67
|
+
### 1.0.0.beta6 (2018-12-3)
|
68
|
+
|
69
|
+
* Stopping the screenrecorder now prints the failure reason given by the ffmpeg binary when `#stop` fails (Issue #7).
|
70
|
+
* Log file is now defaulted to `ffmpeg.log` instead of redirecting to nul.
|
71
|
+
* `log_level` now defaults to `Logger::ERROR` instead of `Logger::INFO`.
|
72
|
+
|
73
|
+
### 1.0.0.beta5 (2018-11-26)
|
74
|
+
|
75
|
+
* `Screenrecorder` class is now `ScreenRecorder`.
|
76
|
+
* Add support for Linux.
|
77
|
+
* Now an exception raised if the gem fails to find `ffmpeg`.
|
78
|
+
* Fix a bug where a file named `nul` was created instead of directing the output to `NUL`.
|
71
79
|
* Fix a bug where `RecordingRegions#window_titles` was not returning anything because of missing return keyword.
|