Files
libopenshot/examples/Example.rb
FeRD (Frank Dana) b0e406be49 Fix Ruby example script bug
Ruby: Relax SWIG version for compatibility check

- Turns out the Ruby-2.7.0-compatibility commit made it into SWIG 4.0.2

Ruby bindings: Fix all kinds of brokenness

- Turns out int64_t function args require stdint.i for auto-conversion.
- The imported module name is (still) 'Openshot' — lowercase 's'.
- #TIL that accidentally dropping the OUTPUT_NAME config leads to
  a non-loadable shared library, due to the filename being wrong.
2020-10-18 07:49:24 -04:00

14 lines
232 B
Ruby

# Find and load the ruby libopenshot wrapper library
require "openshot"
# Create a new FFmpegReader and Open it
r = Openshot::FFmpegReader.new("test.mp4")
r.Open()
# Get frame 1
f = r.GetFrame(1)
# Display the frame
f.Display()