PDA

View Full Version : make a movie...



trupti
11th January 2011, 11:21
Hello,
I am new with qt..
I have used a qlistwidget in my ui.
In qlistwidget item i have list of images.
i want to make a movie of selected images and play.
just like Video DJ...

Please help me...


Thanks in advance....

tbscope
11th January 2011, 12:13
Do you have a specific question?
You only stated your goal.

A video is a series of images spread out over a timeline where each single image is shown once during a specific time interval.

What you need to figure out is how to construct a time line.
Then you need to figure out how to divide this timeline in discrete intervals and link each interval to a specific image in your list.

Something in the lines of:
I want to display 24 images per second. This means I need to create 24 time intervals per second of my timeline. By adjusting this number I have one way to control the speed.
Then, when I run through the time line, everytime a new interval starts, I show the next picture in the list.

trupti
12th January 2011, 05:09
hello,

Thanks for your reply..

Can you give me demo or sample code...




Thanks ..

tbscope
12th January 2011, 05:30
http://doc.qt.nokia.com/4.7/qtimeline.html

Setup a timeline with the values you want (how many frames, duration, ...)
Then connect a slot to the frameChanged signal.
In that slot, display the next image in the list (you can use the frame number to make it easy).

You can also add a button linked to the start/stop slots.

trupti
12th January 2011, 06:49
thanks for quick reply...

I tried with qtimeline..
But getting error in implementation ....
please help me..




thanks...

tbscope
12th January 2011, 06:51
I can only help if you post the code you tried and the errors you get.

trupti
12th January 2011, 06:53
hello,
i solved that problem...
But now i want to know how can i get images to display...

tbscope
12th January 2011, 06:56
You can use a QLabel. This should be very basic using this: http://doc.qt.nokia.com/4.7/qlabel.html#setPicture
In the slot connected to the frameChanged signal, use the label setPicture function to display a certain picture.

Or, if you want more control and effects, you might want to take a look at QGraphicsView.

trupti
12th January 2011, 07:03
hello,
Can i use my images from list. I have list of images in qlistwidget item.

tbscope
12th January 2011, 07:07
I don't know how your list displays these images.
If it's just a list with url's, then you need to load each image.
If they are thumbnails, you probably want to load a bigger version.
If they are the actual size it would be stupid not to use them as they are already loaded.

Loading an image just before it is going to be displayed is also not a good idea. You want to build a buffer.

trupti
12th January 2011, 07:17
hello,
thanks for reply...
in list i have set images as icon.. and want to make movie of it...
But can you give me better idea to do this thing...



thanks..

trupti
20th January 2011, 07:12
Can any one help me for my above question...



Thanks...