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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9440c4355488a734176f7c2f1efed255cb4ccb48b5a92ef3ca266597af1ee95
4
- data.tar.gz: ce51483334355bc4768c655b6bbc644eca9ea9ccc9bea6402a3855bd4032923f
3
+ metadata.gz: 857bc0e6533ccdb8dcc9c0c82cae13028e205173f14997177f2638f5a93ae65e
4
+ data.tar.gz: 774c93d3e295012d242b1df752460880d93b01a41abc86812e37fa389788293a
5
5
  SHA512:
6
- metadata.gz: 1884a94f4f2725cbdc2e61d323c0b2fab850e5e5d44552f96f9066a0dc4b51076d13f1f4a3de442189187ddb3f5cd9d6ea44466fcff62b20a84e20a4aa66787c
7
- data.tar.gz: 859acd8e9f125033e7971c9d021cde9960b04123ce9b63c4f40ecc6af45a33b3cb34d7711e4d9ddd1a27e4aa5a0bfc88d6776946bb5dcafb6d9082531f9173c0
6
+ metadata.gz: 780bf876cff8c52ef37db709ba971ca4b80a2eab4422cbc6e8ee211bd363e103563217b7d8ab246f614c7d445d62895756ee078dab465bc2fbf644503f460d54
7
+ data.tar.gz: 185f4b69f1932a88d1332f72db132e4ad8d46ff7457ae5a034119ebfe750efd13e8723d4395e691f86e5ea557928fdb1891d5c016939cb8c297c838d6f346730
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # FFMPEG::Screenrecorder
2
2
 
3
- Ruby gem to record your computer screen - desktop or specific application/window - using [FFMPEG](https://www.ffmpeg.org/).
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 = { output: 'ffmpeg-screenrecorder-output.mp4',
54
- input: 'desktop',
55
- framerate: 30.0,
56
- device: 'gdigrab',
57
- log: 'ffmpeg-screenrecorder-log.txt' }
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-output.mp4
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
- # ... Run tests or whatever you want to record
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 not exit gracefully and may produce an invalid video file.
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`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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 on GitHub at https://github.com/kapoorlakshya/ffmpeg-screenrecorder.
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
- Gem::Specification.new do |spec|
5
- spec.name = 'ffmpeg-screenrecorder'
6
- spec.version = '1.0.0.beta3'
7
- spec.authors = ['Lakshya Kapoor']
8
- spec.email = ['kapoorlakshya@gmail.com']
9
-
10
- spec.summary = 'Record your computer screen using ffmpeg via Ruby.'
11
- spec.description = 'Ruby gem to record your computer screen - desktop or specific application/window' \
12
- ' - using FFMPEG (https://www.ffmpeg.org).'
13
- spec.homepage = 'http://github.com/kapoorlakshya/ffmpeg-screenrecorder'
14
- spec.license = 'MIT'
15
-
16
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
17
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- end
19
-
20
- spec.require_paths = ['lib']
21
-
22
- spec.add_development_dependency 'bundler', '~> 1.16'
23
- spec.add_development_dependency 'pry-byebug', '~> 3.6'
24
- spec.add_development_dependency 'rake', '~> 10.0'
25
- spec.add_development_dependency 'rspec', '~> 3.0'
26
- spec.add_development_dependency 'watir', '~> 6.0'
27
- spec.add_development_dependency 'webdrivers', '~> 3.0'
28
-
29
- spec.add_runtime_dependency 'os', '~> 0.9.0'
30
- spec.add_runtime_dependency 'streamio-ffmpeg', '~> 1.0'
31
- end
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-beta2
3
- module Windows
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-beta2
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 'windows'
4
+ require_relative 'recording_regions'
5
5
 
6
6
  module FFMPEG
7
7
  # @since 1.0.0-beta1
8
8
  class Screenrecorder
9
- extend Windows
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 = 'FFMPEG'
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"
@@ -0,0 +1,5 @@
1
+ module FFMPEG
2
+ class Screenrecorder
3
+ VERSION = '1.0.0.beta4'.freeze
4
+ end
5
+ end
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.beta3
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 FFMPEG (https://www.ffmpeg.org).
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/windows.rb
148
+ - lib/ffmpeg/version.rb
148
149
  homepage: http://github.com/kapoorlakshya/ffmpeg-screenrecorder
149
150
  licenses:
150
151
  - MIT