How can I create a video from directory which contain set of images using c language. I want to do this inside a c Class file (not in command prompt). Something similar to this.

```
void ImagetoVideo(char [] path)
{
   // create video from file
}

```

I saw some code in the stack overflow but it's all about running a command line code.
This is the code

```
ffmpeg -f image2 -start_number n -i "PATH_TO_IMAGE_FILE" video.mpg 
    -vcodec mpeg4 test.avi

```