Hi,
I'm trying to disply a simple jpg image, and mix it with a video.
Here is my code :
private void MultitrackMixPlayFromImage(string file1, string file2)
{
Factory.init();
Profile profile = new Profile("atsc_720p_30");
Producer p1 = new Producer( profile,"pixbuf",file1);
p1.set("length",101);
p1.set("ttl",30);
p1.set("in",0);
p1.set("out",100);
Producer p2 = new Producer( profile,file2,null);
Playlist playlist1 = new Playlist();
playlist1.append(p1);
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();
}
}
When the consumer start, I have an exception. I think that I didn't use
pixbuf the ggod way, but I can't find the goog way in the mlt
documentation.
If anyone could help me ?
Thank
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