Creating a AVAsset with a HTTP NSURL

avfoundation, ios, iphone, objective-c

Solution

I saved the online url to a temporary directory and used the temporary url to merge the video and it worked.

    NSData *urlData = [NSData dataWithContentsOfURL:initalURL];
    [urlData writeToFile:path options:NSAtomicWrite error:nil]

Problem

I'm trying to merge two `NSURLs` that contain video references. One of the urls point to a video on AWS and the other points to a video that is stored locally. My exporting code works because I've tried it with two local videos, but whenever I try merge the HTTP url and the local url I get this error: `Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo=0x155d2f20 {NSUnderlyingError=0x155b4f60 "The operation couldn’t be completed. No such file or directory", NSLocalizedDescription=The requested URL was not found on this server.}` This is the code to create the AVAssets: ``` AVAsset *firstAsset = [AVAsset assetWithURL:awsURL]; ``` Does `AVAssetExportSession` require local urls to be used?

Original source