Domanda

i've parsed a video web and got the flv files for the video, but the files are seperated, so i must join them together, i know if i use ffmpeg, it should be easy just like ffmpeg -f concat -i mylist.txt -c copy output.flv ,but as i'm writing a mac software, i must write it in objective-c.i could't found any document (or sdk) to read so it's hard for me to begin.

so ,how to join them in objective-c code? do i need to pull the ffmpeg project down to my project?if it is necessary, what is the next step?

È stato utile?

Soluzione

This is hardly a comprehensive answer, but should get you started:

NSTask *task = [[NSTask alloc] init];

[task setLaunchPath:@"<whatever your path to ffmpeg is>"];
// I'm taking your word for the arguments...
[task setArguments:@[@"-f", @"concat", @"-i", @"mylist.txt", @"-c", @"copy", @"output.flv"]];

[task launch];

You may want to go further by setting up a pipe and file handle so that you can get stdout or stderr.

And yes, you'll need to include ffmpeg in your project.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top