demotape 0.0.0 → 0.0.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: 147d51a7d46ab355a5d0e12bb5e0a40e23e6d7d7c3867d4ef93e1131484e6380
4
- data.tar.gz: aa995babfea3d396b868361e9aeda97df8c90892f67b4cf4da7123dfa7abbb6c
3
+ metadata.gz: 35c6276b58c8ec0e7ff8a2f64887d934cbd52df1756005f6d81bc093e689feb0
4
+ data.tar.gz: 972f5982e74e7380bb9d914c95e6ab1351e53777c2c6f25612c07f9250c48f00
5
5
  SHA512:
6
- metadata.gz: 8284384e1d08f3ca3401424cc44c06f08f1607fdae1335f65dc6a54d03c763876298d22e8699cb8f33f480fd308baa4c68d9c512bd0df217aadb83f975da81f7
7
- data.tar.gz: d9051421159a3ddec57826ac06b15d6f9b74df9832ee1d77dc1f01821f6dd4f8b06aaa651da69083fff39b7cf434ae1e6e6266fcaa0ffcaa524721bbffb597c9
6
+ metadata.gz: 4acf3cd57433785fd2acd0abdd3278a3e12b6074c1bb6f4c51f2a6c88b768862a94257bb3cc47d729fff0ed49413337b88b4b7f330d47553f1566387752e83c0
7
+ data.tar.gz: c2970f2848b2680d71db65313b87420170166a64bd2660b4f4078423dbb816c30afa04474d563e8e36c6fbd0150e2f6c4e720d1bfbda70cdceee866f90df7ff7
data/CHANGELOG.md CHANGED
@@ -11,6 +11,13 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
+ ## v0.0.1
15
+
16
+ - [Added] Command `demotape ascii` to print ASCII logo.
17
+ - [Added] Support for exporting `.avi` (lossless)
18
+ - [Changed] Export lossless videos now by default
19
+ - [Fixed] Export screenshots only once per path
20
+
14
21
  ## v0.0.0
15
22
 
16
23
  - Initial release.
data/README.md CHANGED
@@ -55,6 +55,12 @@ $ echo "Type 'echo \"it works with stdin too\"'\nEnter\nSleep 5" | \
55
55
  info Finished in 11.92s
56
56
  ```
57
57
 
58
+ ### Output formats
59
+
60
+ - When exporting videos, you can choose between `.mp4`, `.webm` or `.avi`.
61
+ Choose `.avi`/`.mp4` if you need a lossless intermediate video to be processed
62
+ in a pipeline.
63
+
58
64
  ### Examples
59
65
 
60
66
  The [`examples/`](https://github.com/fnando/demotape/tree/main/examples) folder
Binary file
data/examples/output.gif CHANGED
Binary file
Binary file
data/examples/output.mp4 CHANGED
Binary file
data/examples/output.png CHANGED
Binary file
data/examples/output.tape CHANGED
@@ -2,6 +2,7 @@ Output "examples/output.gif"
2
2
  Output "examples/output.mp4"
3
3
  Output "examples/output.webm"
4
4
  Output "examples/output.mov"
5
+ Output "examples/output.avi"
5
6
 
6
7
  Sleep 1
7
8
  Type@10ms "Output multiple formats"
data/examples/output.webm CHANGED
Binary file
data/lib/demo_tape/cli.rb CHANGED
@@ -151,6 +151,11 @@ module DemoTape
151
151
  end
152
152
  end
153
153
 
154
+ desc "ascii", "Displays an ASCII art demo tape logo"
155
+ def ascii
156
+ puts File.read(File.join(__dir__, "../../demotape.ascii"))
157
+ end
158
+
154
159
  no_commands do
155
160
  # Add helper methods here
156
161
  end
@@ -47,16 +47,20 @@ module DemoTape
47
47
  inputs << "-loop 1 -i #{Shellwords.escape(mask_path)}"
48
48
  end
49
49
 
50
+ encoder = if File.extname(path).downcase == ".avi"
51
+ "-c:v ffv1"
52
+ else
53
+ "-c:v libx264 -crf 0 -pix_fmt yuv444p"
54
+ end
55
+
50
56
  cmd = <<~CMD
51
57
  ffmpeg -y \
52
58
  -loglevel error \
53
59
  #{inputs.join(" \\\n ")} \
54
60
  -filter_complex "#{filter}" \
55
61
  -frames:v #{frame_count} \
56
- -c:v libx264 \
57
- -pix_fmt yuv420p \
58
62
  -r #{options.fps} \
59
- -movflags +faststart \
63
+ #{encoder} \
60
64
  #{Shellwords.escape(path)}
61
65
  CMD
62
66
 
@@ -699,7 +699,7 @@ module DemoTape
699
699
  self.screenshot_count += 1
700
700
  end
701
701
 
702
- screenshot_paths.each do |screenshot_path|
702
+ screenshot_paths.uniq { it.expand_path.to_s }.each do |screenshot_path|
703
703
  exporter.png(screenshot_path)
704
704
  path = thor.set_color(Shellwords.escape(screenshot_path.to_s), :magenta)
705
705
  thor.say_status :screenshot, "Saved to #{path}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DemoTape
4
- VERSION = "0.0.0"
4
+ VERSION = "0.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: demotape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
@@ -343,7 +343,9 @@ files:
343
343
  - examples/nerdfonts.mp4
344
344
  - examples/nerdfonts.png
345
345
  - examples/nerdfonts.tape
346
+ - examples/output.avi
346
347
  - examples/output.gif
348
+ - examples/output.mov
347
349
  - examples/output.mp4
348
350
  - examples/output.png
349
351
  - examples/output.tape
@@ -1171,10 +1173,10 @@ metadata:
1171
1173
  rubygems_mfa_required: 'true'
1172
1174
  homepage_uri: https://github.com/fnando/demotape
1173
1175
  bug_tracker_uri: https://github.com/fnando/demotape/issues
1174
- source_code_uri: https://github.com/fnando/demotape/tree/v0.0.0
1175
- changelog_uri: https://github.com/fnando/demotape/tree/v0.0.0/CHANGELOG.md
1176
- documentation_uri: https://github.com/fnando/demotape/tree/v0.0.0/README.md
1177
- license_uri: https://github.com/fnando/demotape/tree/v0.0.0/LICENSE.md
1176
+ source_code_uri: https://github.com/fnando/demotape/tree/v0.0.1
1177
+ changelog_uri: https://github.com/fnando/demotape/tree/v0.0.1/CHANGELOG.md
1178
+ documentation_uri: https://github.com/fnando/demotape/tree/v0.0.1/README.md
1179
+ license_uri: https://github.com/fnando/demotape/tree/v0.0.1/LICENSE.md
1178
1180
  rdoc_options: []
1179
1181
  require_paths:
1180
1182
  - lib