2011-03-02 33 views
1

我試圖捕獲視頻並將其寫入以下url.I出現此錯誤。捕獲視頻和音頻並將其寫入iPhone中的服務器

代碼:

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

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

例外:

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 2011-03-02 15:55:38

回答

2

invalid parameter not satisfying: [outputURL isFileURL]'

它看起來像是例如預計在URL格式的本地文件路徑,但file://....

從文檔

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

你將不得不單獨管理上傳到Web服務器。

相關問題