【问题标题】:Output audio settings when append one AAC file to another将一个 AAC 文件附加到另一个文件时输出音频设置
【发布时间】:2013-04-14 09:15:54
【问题描述】:

我的应用使用带有音频参数的 AVAudioRecorder 一个一个地录制两个音频文件:

        NSDictionary *outputSettings = [NSDictionary dictionaryWithObjectsAndKeys:
                                    [NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,
                                    [NSNumber numberWithFloat:44100.0], AVSampleRateKey,
                                    [NSNumber numberWithInt:1], AVNumberOfChannelsKey,
                                    [NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey,
                                    [NSNumber numberWithInt:16],AVEncoderBitDepthHintKey,
                                    [NSNumber numberWithInt:128000], AVEncoderBitRateKey,
                                    nil];

我需要在 file1 的末尾附加 file2。我正在使用there 之类的解决方案(在添加两个文件并使用 AVAssetExportSession 的exportAsynchronouslyWithCompletionHandler: 方法导出合成之后,通过创建 AVMutableCompositionTrack 来附加两个音频文件)。
它可以工作,但我有两个输入文件 128kbs 44.1kHz 16bit 单声道,输出文件格式是:219.4kbs 44.1kHz 16bit 立体声。

有什么方法可以为 AVAssetExportSession 配置输出音频文件参数吗?

【问题讨论】:

    标签: iphone objective-c audio aac avassetexportsession


    【解决方案1】:

    我找到了解决方案:SDAVAssetExportSession

    【讨论】:

    • 我正在使用同一个库异步导出音频,但是对于大型音频,此导出操作需要大量时间。有没有办法减少那个时间。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-06
    • 2019-08-15
    • 2014-02-26
    • 1970-01-01
    • 2017-09-20
    • 2020-03-19
    • 1970-01-01
    相关资源
    最近更新 更多