Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env ruby
# Import required modules
require 'pry'
require 'mlt'
# Create the mlt system
# Establish the mlt profile
profile_hd ="atsc_1080i_50")
profile_sd ="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 = profile_sd, "decklink:0" )
raise "Unable to open decklink:0 consumer" if !consumer.is_valid
consumer.set( "realtime", 4 )
# Start the consumer
# Connect the producer to the consumer
consumer.connect( producer )
# Clean up consumer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment