x264enc caps.

Hi all:

I´m trying to create a pipeline which goal is to read some images from a file, and create a video with all of them together.

I have a problem between two cases: if I do not set any caps to the x264enc, it works but create a video where to see the images is impossible, all of them are green.

gst-launch-1.0 multifilesrc location="/images/Image_%d.png" ! queue !  pngdec ! videoconvert ! 'video/x-raw, format=(string)I420, width=(int)640, height=(int)512, pixel-aspect-ratio=1/1, interlace-mode=(string)progressive' ! videoparse format=2 !  x264enc ! mp4mux ! filesink location=out.mp4

On the other hand, if I set this caps, I get a video of 0 bytes.

gst-launch-1.0 multifilesrc location="/images/Image_%d.png" ! queue !  pngdec ! videoconvert ! 'video/x-raw, format=(string)I420, width=(int)640, height=(int)512, pixel-aspect-ratio=1/1, interlace-mode=(string)progressive' ! videoparse format=2 !  x264enc ! '<b>video/x-h264, width=(int)640, height=(int)512</b>' ! mp4mux ! filesink location=out.mp4

So, the question is how can I set the necessary caps to “say” to the encoder that the real size of the images is: 640x512?

Thanks in advance.

You may try to add videorate after videoconvert. Check this post.