我使用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");
}];