2021-03-16 14:23:03 +08:00
|
|
|
#include <iostream>
|
2021-03-14 21:55:02 +08:00
|
|
|
#include <cstdio>
|
|
|
|
#include <thread>
|
|
|
|
#include <cstring>
|
|
|
|
#include <cstdlib>
|
|
|
|
|
|
|
|
int main(int argc,char *argv[]){
|
|
|
|
char command[10000],filename1[1000],filename2[1000],output[1000];
|
2021-03-16 14:23:03 +08:00
|
|
|
//Get file 1 filename
|
2021-03-14 21:55:02 +08:00
|
|
|
printf("Input file1 name:");
|
|
|
|
fflush(stdin);
|
2021-03-16 14:23:03 +08:00
|
|
|
std::cin.getline(filename1,sizeof(filename1));
|
|
|
|
//Get file 2 filename
|
2021-03-14 21:55:02 +08:00
|
|
|
printf("Input file2 name:");
|
|
|
|
fflush(stdin);
|
2021-03-16 14:23:03 +08:00
|
|
|
std::cin.getline(filename2,sizeof(filename2));
|
|
|
|
//Get output file name
|
2021-03-14 21:55:02 +08:00
|
|
|
printf("Input output name:");
|
|
|
|
fflush(stdin);
|
2021-03-16 14:23:03 +08:00
|
|
|
std::cin.getline(output,sizeof(output));
|
|
|
|
//Generate command and execute the command
|
2021-03-14 21:55:02 +08:00
|
|
|
sprintf(command,"ffmpeg -i \"%s\" -i \"%s\" -codec copy \"%s\"",filename1,filename2,output);
|
|
|
|
std::thread first (system,command);
|
|
|
|
first.detach();
|
|
|
|
getchar();
|
|
|
|
return 0;
|
|
|
|
}
|