FORUMS: list search recent posts

Store the extracted frame name in array when executed from within a C program

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Narain Kumar
Store the extracted frame name in array when executed from within a C program
on Feb 19, 2013 at 10:53:33 am

I'm using the following C code to execute ffmpeg from within a C program

#include <stdio.h>
#include <stdlib.h>

int main()
{

char *app = "D:\\ffmpeg\\bin\\ffmpeg.exe -i";
char *input = " D:\\video.mpg";
char *output = " D:\\frames\\image%d.jpg";
char *param = " -r 10";
char str[300];
snprintf(str, sizeof str, "%s%s%s%s", app, input, param, output);
// str contains "D:\ffmpeg\bin\ffmpeg.exe -i D:\video.mpg -r 10 D:\frames"\image%d.jpg
system(str); // <-- working fine, frames are being extracted
/*
do something here to store each extracted frame in an array
so that the array contains image1.jpg, image2.jpg, image3.jpg...and so on
*/
getch();
return 0;
}


Is there a way to store the filenames in an array as and when they are extracted?


Return to posts index

Reuben Martin
Re: Store the extracted frame name in array when executed from within a C program
on Feb 19, 2013 at 9:04:14 pm

You will have a lot more control integrating the libraries from the project rather than trying to call ffmpeg directly.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]