FFMpeg-iOS使用问题

时间:2017-06-09 10:08:30

标签: ios audio ffmpeg

我使用FFmpeg-iOS的说明编译了iOS的ffmpeg。我试图在FFmpegWrapper的帮助下将它用于wav到mp3的转换。它给了我以下错误:Invalid audio stream. Exactly one MP3 audio stream is required.是否有人有同样的问题?

编辑:

我尝试用于转换的代码

NSString *inPath = [[NSBundle mainBundle] pathForResource:@"record" ofType:@"wav"];
NSString *outPath = @"/Users/someuser/Desktop/out.mp3";

FFmpegWrapper *wrapper = [[FFmpegWrapper alloc] init];
[wrapper convertInputPath:inPath outputPath:outPath options:@{kFFmpegInputFormatKey: @"wav", kFFmpegOutputFormatKey: @"mp3"} progressBlock:^(NSUInteger bytesRead, uint64_t totalBytesRead, uint64_t totalBytesExpectedToRead) {
    NSLog(@":)");
} completionBlock:^(BOOL success, NSError *error) {
    NSLog(@"Complete");
}];

0 个答案:

没有答案