Hi,

I'm trying to use the colour generator with the csharp binding.

when I had a transition between a black colour playlist and a video
playlist, luma type, the mix don't work !

here is my code :

private void MultitrackMixPlayWithColour(string file1, string file2)
{
        Factory.init();                                         
        Profile profile = new Profile("atsc_720p_30");
        
        Producer p0 = new Producer(profile,"colour","black");
        p0.set("length",101);
        p0.set_in_and_out(0,100);
        
        Producer p2 = new Producer( profile,file2,null);
        
        Playlist playlist1 = new Playlist();
        playlist1.append(p0);
        Playlist playlist2 = new Playlist();
        playlist2.blank(playlist1.get_length()-1 -50);
        playlist2.append(p2);
        Tractor tr = new Tractor();
        Field field = tr.field();

        Multitrack multi = tr.multitrack();;
                
        multi.connect(playlist1,0);
        multi.connect(playlist2,1);
        
        Transition t = new Transition(profile,"luma");
        t.set("in",playlist1.get_length()-1 -50);
        t.set("out",playlist1.get_length()-1);
        field.plant_transition(t,0,1);
        
        if (tr.is_valid())
        {
                
                System.Console.WriteLine(string.Format("length : {0}",
tr.get_length()));
                Consumer c = new Consumer(profile, "sdl", null);
                c.set("rescale", "none");
                c.connect(tr);
                c.start();                              
                
                while (!c.is_stopped())
                {
                        Thread.Sleep(300);
                        System.Console.WriteLine(string.Format("position : {0}",
tr.position()));
                        if (tr.position() >= tr.get_length()-1)
                                break;
                }
                c.stop();
        }
}

=> frame from 0 to 50, I had well the black colour
=> Frame 51 to 100, I can hear the sound of my video (playlist2), but
the screen stay black, no mix from black to the video, like I would.
=> Frame 101 to the end, I have the video.

I don't understand why the transition don't run well.

Thanks

Steeve





------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mlt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to