Audio 如何通过SCPlayer从视频中删除声音?
我正在尝试从视频中删除音频,我正在使用SCRecorder类。 但仍然有音频播放。所以,有没有一种方法可以使用SCRecorder类从视频中删除音频Audio 如何通过SCPlayer从视频中删除声音?,audio,Audio,我正在尝试从视频中删除音频,我正在使用SCRecorder类。 但仍然有音频播放。所以,有没有一种方法可以使用SCRecorder类从视频中删除音频 SCRecorder *recorder = [SCRecorder recorder]; // You can also use +[SCRecorder sharedRecorder] SCAudioConfiguration *audio = recorder.audioConfigurat
SCRecorder *recorder = [SCRecorder recorder]; // You can also use +[SCRecorder sharedRecorder]
SCAudioConfiguration *audio = recorder.audioConfiguration;
// Whether the audio should be enabled or not
audio.enabled = NO;
[_player play];
在SCRecoder类中,您需要停止或注释 这一串代码
// if (self.audioConfiguration.enabled) {
// if (_audioOutput == nil) {
// _audioOutput = [[AVCaptureAudioDataOutput alloc] init];
// [_audioOutput setSampleBufferDelegate:self queue:_audioQueue];
// }
//
// if ([session canAddOutput:_audioOutput]) {
// [session addOutput:_audioOutput];
// _audioOutputAdded = YES;
// } else {
// audioError = [SCRecorder createError:@"Cannot add audioOutput inside the sesssion"];
// }
// }
您可以在下面的方法中找到此代码
- (void)openSession:(void(^)(NSError *sessionError, NSError *audioError, NSError *videoError, NSError *photoError))completionHandler {