Created
September 30, 2012 00:29
-
-
Save trickkiste/3805493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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