On Tue, Oct 11, 2016 at 7:21 AM Ricardo Jimenez Hurtado <
jimenezhurtadorica...@gmail.com> wrote:
> Hello:
>
> How can I make in python for the capture from a decklink and playing in
> another with the less seconds of delay posible.
>
> I have this code
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
>
> # Import required modules
> import mlt
> import time
> import sys
>
> # Start the mlt system
> mlt.Factory().init( )
>
> # Establish a profile
> profile = mlt.Profile("atsc_1080i_50")
>
> # Create the producer
> p = mlt.Producer( profile, sys.argv[1] )
>
> if p:
> # Create the consumer
> c = mlt.Consumer( profile, "decklink:0" )
>
> # Turn off the default rescaling
> #c.set( "rescale", "none" )
>
> # Connect the producer to the consumer
> c.connect( p )
> c.set("real_time", -2)
> # Start the consumer
> c.start( )
>
> # Wait until the user stops the consumer
> #while c.is_stopped( ) == 0:
> # time.sleep( 1 )
> else:
> # Diagnostics
> print "Unable to open ", sys.argv[ 1 ]
>
>
> I have a 2 - 3 seconds of delay betwen the camera live to the decklink
> output
>
>
Reduce buffering. The producer has a configurable buffer size:
https://www.mltframework.org/plugins/ProducerDecklink/
All consumers have a configurable buffer size in the buffer property:
https://www.mltframework.org/doxygen/properties.html
Those default to 1 second each for a 25p/50i profile. However, I cannot
tell you what the lowest buffer sizes will still work smoothly. You need to
experiment. You might also need to try different values for real_time.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel