Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
#!/usr/bin/env ruby
# Import required modules
require 'pry'
require 'mlt'
# Create the mlt system
Mlt::Factory::init
# Establish the mlt profile
profile_hd = Mlt::Profile.new("atsc_1080i_50")
profile_sd = Mlt::Profile.new("dv_pal_wide")
# Create the producer
producer = Mlt::Factory::producer( profile_hd, "decklink:3" )
raise "Unable to open decklink:3 producer" if !producer.is_valid
# Create the consumer
consumer = Mlt::Consumer.new( profile_sd, "decklink:0" )
raise "Unable to open decklink:0 consumer" if !consumer.is_valid
consumer.set( "realtime", 4 )
# Start the consumer
consumer.start
# Connect the producer to the consumer
consumer.connect( producer )
binding.pry
# Clean up consumer
consumer.stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.