calling ffmpeg.exe in visual studio c++ -


i newbie c++. i'm trying use ffmpeg in c++ project in visual studio 2012, calling ffmpeg.exe file inside it.

this tried far:

//ffmpeg calling char ffmpeg2[bufsiz]; strcpy(ffmpeg2,"..\bin\ffmpeg.exe"); strcat(ffmpeg2,"-f s16le -ar 8k -ac -ss"); strcat(ffmpeg2,buffers);    //string hh:mm:ss strcat(ffmpeg2,"-t"); strcat (ffmpeg2,buffer);    //string hh:mm:ss strcat(ffmpeg2,"-i ..\\rec.pcm ..\desktop\newfolder\filename"); if(system(ffmpeg2) !=0)  {     ft =fopen("ffmpeg_err.txt","a");     fprintf( ft,"my command failed...\n" );     fclose(ft); } else {system(ffmpeg2);} 

it keep producing command fail in text file. guys have hint on how fix it.

you not adding spaces before or after calling strcat final command like
..\bin\ffmpeg.exe-f s16le -ar 8k -ac -ss<buffers>-i ..\\rec.pcm ..\desktop\newfolder\filename add space after ffmpeg.exe, after -ss, before -t , before -i final command become ..\bin\ffmpeg.exe-f s16le -ar 8k -ac -ss <buffers> -i ..\\rec.pcm ..\desktop\newfolder\filename

this should solve problem


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -