我试图录制视频,但我收到了类似的错误
无法记录到 URL <#file url>,因为它不是文件 URL。
我将目标网址定义如下:
NSString *Path = [[NSString alloc] init];
Path = @"/Users/me/Documents/My fols/recording_try/newMovie.mov";
NSURL *dest = [[NSURL alloc] initWithString:[Path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
然后在创建会话后,输入和输出对象。我试过这样录音。
mMovieFileOutput = [[AVCaptureMovieFileOutput alloc] init] ;
[mSession addOutput:mMovieFileOutput];
[mMovieFileOutput startRecordingToOutputFileURL:dest recordingDelegate:self];
我已经开始运行会话,尝试使用 begin 和comitconfiguration 等。但每次运行时都会收到如下错误:
[AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:] - Cannot record to URL /Users/me/Documents/My%20fols/recording_try/newMovie.mov because it is not a file URL.
我不知道我要去哪里错了......有人可以帮忙吗?
提前致谢...