Add video, image and audio editing functionality to your Ruby applications and workflows using the Shotstack Ruby video editor SDK.
Over 20,000 Businesses & Developers from 119 Countries Trust Shotstack
The Shotstack Ruby SDK brings elegant video editing capabilities to your Ruby applications and Rails projects. Built with Ruby conventions in mind, the SDK makes video processing feel natural and intuitive for Ruby developers.
This open-source Ruby gem connects directly to Shotstack's managed video editing API, removing the complexity of video processing infrastructure while providing access to professional-grade editing features.
Leverage all of Shotstack's video editing capabilities including trimming, concatenation, transitions, filters, effects, and multimedia asset merging—all with clean, idiomatic Ruby code.
Require the Shotstack SDK and necessary classes.
require 'shotstack'
Set the base URL and API key for your environment.
Shotstack.configure do |config|
config.host = 'https://api.shotstack.io/stage'
config.api_key['DeveloperKey'] = 'YOUR_API_KEY'
end
Define the video asset with source and trimming parameters.
video_asset = Shotstack::VideoAsset.new(
src: 'https://shotstack-assets.s3.amazonaws.com/footage/skater.mp4',
trim: 3
)
Create clips, tracks, timeline and output settings.
clip = Shotstack::Clip.new(
asset: video_asset,
start: 0,
length: 8
)
track = Shotstack::Track.new(clips: [clip])
timeline = Shotstack::Timeline.new(tracks: [track])
output = Shotstack::Output.new(
format: 'mp4',
resolution: 'sd'
)
edit = Shotstack::Edit.new(
timeline: timeline,
output: output
)
Send the edit to the API for rendering.
api_instance = Shotstack::EditApi.new
begin
response = api_instance.post_render(edit)
render_id = response.response.id
puts "Render ID: #{render_id}"
rescue Shotstack::ApiError => e
puts "Exception: #{e}"
end
The Ruby code above constructs a JSON edit specification, submits it to the Shotstack API, and produces the trimmed video output.
This application is the perfect example of a well executed and documented API. In less than 10 mins, set up, web hook done, and first render!
There are a couple of other options out there that attempt to provide the same or similar solution, but none of them come close in terms of quality, ease of use, and speed.
Shotstack was EXACTLY what I was looking for, and incredibly easy to get started with. You guys are killing it.
Unlimited developer sandbox
No credit card required