13.04.12 14:16, Maksym Veremeyenko написав(ла):
> Hi,
>
> i have a problem creating thumbnail from videofile.
>
> *melt* command line works fine:
>
> /usr/local/mltframework.org/mlt/bin/melt -profile dv_pal R0009178.mpg
> in=100 out=100 -consumer avformat:R0009178.png s=128x72 vcodec=png f=image2
>
> but program code sample do not work properly:
>
> #include<stdlib.h>
> #include<sys/types.h>
> #include<unistd.h>
> #include<string.h>
> #include<errno.h>
> #include<framework/mlt.h>
> int main(int argc, char** argv)
> {
>       mlt_consumer consumer;
>       mlt_producer producer;
>       mlt_profile profile;
>       mlt_properties c_props, p_props;
>
>       if(3 != argc)
>           return 1;
>       mlt_factory_init(NULL);
>       profile = mlt_profile_init("dv_pal");
>       producer = mlt_factory_producer(profile, NULL, argv[1]);
>       consumer = mlt_factory_consumer(profile, "avformat", argv[2]);
>       c_props = mlt_consumer_properties(consumer);
>       p_props = mlt_producer_properties(producer);
>       mlt_properties_set_int(p_props, "in", 100);
>       mlt_properties_set_int(p_props, "out", 100);
>       mlt_properties_set(c_props, "s", "96x72");
>       mlt_properties_set(c_props, "vcodec", "png");
>       mlt_properties_set(c_props, "f", "image2");
>       mlt_consumer_connect(consumer, mlt_producer_service(producer));
>       mlt_consumer_start(consumer);
>       while(!mlt_consumer_is_stopped(consumer)) usleep(40);
>       mlt_consumer_stop(consumer);
>       mlt_consumer_close(consumer);
>       mlt_producer_close(producer);
>       mlt_profile_close(profile);
>       return 0;
> };
>
> it output always first frame, so setting in/out does not help... any hint?
>

ping?

-- 
________________________________________
Maksym Veremeyenko

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to