2011-03-02 4 views
1

비디오를 캡처하여 다음 URL에 쓰려고했습니다.이 오류가 발생합니다.비디오 및 오디오 캡처 및 iPhone의 서버에 쓰기

코드 :

videoURL = [[NSURL alloc] initWithString:@"http://belterra.webiguide.com/uploadimages/VideoRecord.mpeg4"]; 

_videoWriter = [[AVAssetWriter alloc] initWithURL:videoURL fileType:AVFileTypeQuickTimeMovie 
              error:&error]; 

예외 :이 예를 들어, URL 형식의 로컬 파일 경로하지만 기대처럼

Terminating app due to uncaught exception 'NSInvalidArgumentException', 
reason: '*** -[AVAssetWriter initWithURL:fileType:error:] 
invalid parameter not satisfying: [outputURL isFileURL]' 
    *** Call stack at first throw: 
    (
     0 CoreFoundation   0x314d0987 __exceptionPreprocess + 114 
     1 libobjc.A.dylib   0x319a149d objc_exception_throw + 24 
     2 AVFoundation    0x30690421 -[AVAssetWriter initWithURL:fileType:error:] + 188 
     3 iChat     0x00003155 -[AVCaptureVideo setupWriter] + 116 
     4 iChat     0x000030a3 -[AVCaptureVideo startVideoRecording] + 26 
     5 iChat     0x000039ed -[AVCaptureVideo initCapture] + 1112 

<snip> 

    ) 
+0

잘 모르겠지만 링크가 작동하지 않는 것 같습니다. http://belterra.webiguide.com/uploadimages/VideoRecord.mpeg4 – iHS

답변

2

invalid parameter not satisfying: [outputURL isFileURL]'

같습니다 워드 프로세서

Initializes an asset writer for writing to the file identified by a given URL in a format specified by a given UTI.

에서 file://....

그런 별도로 웹 서버에 업로드를 관리해야합니다.

관련 문제