ffmpeg_core 0.4.0 → 0.4.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 +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/ffmpeg_core/configuration.rb +46 -15
- data/lib/ffmpeg_core/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3a1322c33ef390363223c0f3a307f269e84ed3484d2491e2d7340111d33d7a6
|
|
4
|
+
data.tar.gz: d98fcf0cf9881e837783cda58d1d43784c87310db8e22468e5b0623c9a8d6716
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e50f4fb86e61b7d7e858ed90a047f37fa92d7ec9c9216cf8238b7aaf7f48b7c78aa237c36a8c154e864976e8b65c0ac78a93697c1047342df113037fed6f035
|
|
7
|
+
data.tar.gz: 621b5d98bd486b260a4c208c091f18113484d29df66cb005f8e005204dedd324fc5d737e22d662bbf2dbda788f8cdba002a5a313ba18abcc28d926c948c2cf11
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.1] - 2026-04-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Binary detection on Windows: `where` fallback now correctly resolves ffmpeg/ffprobe when not on PATH
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Simplified binary detection: removed redundant Ruby PATH scan, extracted lookup steps into focused private methods
|
|
17
|
+
- Expanded `Configuration` spec: ENV override, `BinaryNotFoundError`, known-path fallback, `reset_configuration!`
|
|
18
|
+
|
|
8
19
|
## [0.4.0] - 2026-01-26
|
|
9
20
|
|
|
10
21
|
### Added
|
|
@@ -40,23 +40,54 @@ module FFmpegCore
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def detect_binary(name)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
binary_from_env(name) ||
|
|
44
|
+
binary_from_system_lookup(name) ||
|
|
45
|
+
binary_from_known_paths(name) ||
|
|
46
|
+
raise(BinaryNotFoundError, <<~MSG)
|
|
47
|
+
#{name} not found.
|
|
48
|
+
Install FFmpeg and ensure it's in PATH.
|
|
49
|
+
macOS: brew install ffmpeg
|
|
50
|
+
Linux: apt install ffmpeg / yum install ffmpeg
|
|
51
|
+
Windows: choco install ffmpeg or scoop install ffmpeg
|
|
52
|
+
MSG
|
|
53
|
+
end
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
# Checks FFMPEGCORE_<NAME> env variable for an explicit binary override.
|
|
56
|
+
def binary_from_env(name)
|
|
57
|
+
path = ENV["FFMPEGCORE_#{name.upcase}"]
|
|
58
|
+
path if path && File.executable?(path)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Uses the OS-native `which` (Unix) or `where` (Windows) command.
|
|
62
|
+
def binary_from_system_lookup(name)
|
|
63
|
+
cmd = Gem.win_platform? ? "where #{name}" : "which #{name}"
|
|
64
|
+
stdout, status = Open3.capture2(cmd)
|
|
65
|
+
return unless status.success?
|
|
58
66
|
|
|
59
|
-
|
|
67
|
+
path = stdout.lines.first&.strip
|
|
68
|
+
path if path && File.executable?(path)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Falls back to a list of well-known installation paths.
|
|
72
|
+
def binary_from_known_paths(name)
|
|
73
|
+
known_paths(name).find { |p| File.executable?(p) }
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def known_paths(name)
|
|
77
|
+
if Gem.win_platform?
|
|
78
|
+
[
|
|
79
|
+
"C:/ffmpeg/bin/#{name}.exe",
|
|
80
|
+
"C:/ProgramData/chocolatey/bin/#{name}.exe",
|
|
81
|
+
"#{ENV["USERPROFILE"]}/scoop/apps/ffmpeg/current/bin/#{name}.exe"
|
|
82
|
+
]
|
|
83
|
+
else
|
|
84
|
+
[
|
|
85
|
+
"/opt/homebrew/bin/#{name}", # macOS ARM
|
|
86
|
+
"/usr/local/bin/#{name}", # macOS Intel / Linux
|
|
87
|
+
"/usr/bin/#{name}",
|
|
88
|
+
"/snap/bin/#{name}"
|
|
89
|
+
]
|
|
90
|
+
end
|
|
60
91
|
end
|
|
61
92
|
end
|
|
62
93
|
|
data/lib/ffmpeg_core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ffmpeg_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexey Poimtsev
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: simplecov
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :development
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
12
26
|
description: A clean, well-tested FFmpeg wrapper with modern Ruby conventions, proper
|
|
13
27
|
error handling, and zero dependencies.
|
|
14
28
|
email:
|
|
@@ -53,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
53
67
|
- !ruby/object:Gem::Version
|
|
54
68
|
version: '0'
|
|
55
69
|
requirements: []
|
|
56
|
-
rubygems_version: 4.0.
|
|
70
|
+
rubygems_version: 4.0.6
|
|
57
71
|
specification_version: 4
|
|
58
72
|
summary: Modern Ruby wrapper for FFmpeg
|
|
59
73
|
test_files: []
|