dragonfly_video 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +25 -0
- data/CHANGELOG.md +4 -0
- data/lib/dragonfly_video/plugin.rb +2 -0
- data/lib/dragonfly_video/processors/optimize.rb +16 -0
- data/lib/dragonfly_video/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d46415cc5ab3f68559a92127f8ac8209b455ae37dd8942932c59469a299af223
|
4
|
+
data.tar.gz: f31e5289513f08e42962f7be5f4ea2d64e8702b5f291d12dc0397d003dbed1d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a4ac28b7cfb5a710bbb8ebddaba1bdddce771924023d87feead8d9ad1a97cbb39fada5cb473bd4e5132c3d4f64c9a3869e02e80efbca50405aa410a3ff3449'
|
7
|
+
data.tar.gz: c406c948ec06282c44117168aa2e531fec7663f76c2ca156bb2076c769d6353aac45220c73684b9ed51b3e45371b0dab540ed6f63dcbd3e828637a67ace5ed3f
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Test
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches: ["master"]
|
5
|
+
push:
|
6
|
+
branches: ["master"]
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby: ['2.1', '3.2', '3.3']
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v4
|
15
|
+
- name: Install dependencies
|
16
|
+
run: |
|
17
|
+
sudo apt-get clean
|
18
|
+
sudo apt-get update
|
19
|
+
sudo apt-get install -y ffmpeg
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true
|
24
|
+
- name: Run tests
|
25
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "dragonfly_video/analysers/video_properties"
|
2
2
|
require "dragonfly_video/processors/screenshot"
|
3
3
|
require "dragonfly_video/processors/remove_audio"
|
4
|
+
require "dragonfly_video/processors/optimize"
|
4
5
|
|
5
6
|
class DragonflyVideo::Plugin
|
6
7
|
def call(app, _opts = {})
|
@@ -16,6 +17,7 @@ class DragonflyVideo::Plugin
|
|
16
17
|
|
17
18
|
app.add_processor :screenshot, DragonflyVideo::Processors::Screenshot.new
|
18
19
|
app.add_processor :remove_audio, DragonflyVideo::Processors::RemoveAudio.new
|
20
|
+
app.add_processor :optimize, DragonflyVideo::Processors::Optimize.new
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# IMPORTANT: See https://github.com/streamio/streamio-ffmpeg
|
2
|
+
# require 'streamio-ffmpeg'
|
3
|
+
require_relative "base_processor"
|
4
|
+
|
5
|
+
module DragonflyVideo
|
6
|
+
module Processors
|
7
|
+
class Optimize < BaseProcessor
|
8
|
+
def call(content, options = {})
|
9
|
+
raise "optimize only supports mp4" unless content.ext == "mp4"
|
10
|
+
content.shell_update do |old_path, new_path|
|
11
|
+
"#{FFMPEG_COMMAND} -i #{old_path} -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -y #{new_path}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly_video
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asger Behncke Jacobsen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dragonfly
|
@@ -115,6 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".github/workflows/test.yml"
|
118
119
|
- ".gitignore"
|
119
120
|
- ".travis.yml"
|
120
121
|
- CHANGELOG.md
|
@@ -130,6 +131,7 @@ files:
|
|
130
131
|
- lib/dragonfly_video/analysers/video_properties.rb
|
131
132
|
- lib/dragonfly_video/plugin.rb
|
132
133
|
- lib/dragonfly_video/processors/base_processor.rb
|
134
|
+
- lib/dragonfly_video/processors/optimize.rb
|
133
135
|
- lib/dragonfly_video/processors/remove_audio.rb
|
134
136
|
- lib/dragonfly_video/processors/screenshot.rb
|
135
137
|
- lib/dragonfly_video/version.rb
|