Converting array of uiimages to video file (.mp4)

I am developing an application to convert array of uiimages to video format(ex:.mp4) in iPhone 3G. For that I’m using FFMpeg library and I’ve taken help of output-example.c file of libavformat directory. Now my problem is how to add my image data to video frame so that I can get a video file. I’m able to get .mp4 file but not the uiimages frame in it. And as i came to know that UIImage are in RGB Format and we have to convert it in YUV image to add in the video frame.
Can somebody help me in solving the problem :frowning: .
Thanks in Advance.