tags:

views:

183

answers:

3

I've got an image generator written in C. Now I want to pass those images to x264 to encode them and write it to a file.

  • Every 100th image should be a key frame in order to save the video to disk every 100th frame.
  • The image generator calls onImageGenerated() after each image.

I'd appreciate any pointers on how to set up x264 in this way.

A: 

You can use one of the front-ends for x264. For example FFMPEG http://ffmpeg.org/ It provides you with a library which you can link in your program and call its APIs to encode decode the image

Himanshu
+1  A: 

About the keyframes: this can be passed as an option to x264.

In order to pass the images to x264, you can use a named pipe (hope you are using unix): the generated images will be written to the named pipe by your program and x264 will use the pipe as input.

Using this solution you won't need to mess with x264. If more help is needed just ask!

Serafeim