Questions tagged [avurlasset]

This tag should be used for questions about the AVURLAsset class of the AVFoundation framework used in iOS, macOS, and tvOS.

AVURLAsset is a concrete subclass of AVAsset that you use to initialize an asset from an URL.

Complete Class Reference in apple.

112 questions
3
votes
0 answers

Add watermark to a video in Swift

There are a couple of solutions for this suggested here in SO, I have tried all of them, and none seems to be working for Swift. I have captured a .mov using AVCaptureFileOutput, written it to file and would like to add a watermark using a CALayer…
schnabler
  • 687
  • 7
  • 23
3
votes
0 answers

AVURLAsset error get http code

I have to handle HTTP status when error occurred during asset loading: [asset loadValuesAsynchronouslyForKeys:requestedKeys completionHandler: ^{ dispatch_async( dispatch_get_main_queue(), ^{ for (NSString *thisKey in…
kapo
  • 61
  • 5
3
votes
1 answer

CALayer - How do I create an image with a solid background and transparent text?

I'm trying to create movie generation application by using AVComposition and have a trouble in making title frame. Each frame is actually a calayer and title layer is on top of other frames. Title(Text) needs to be transparent with black background…
Alex
  • 159
  • 14
2
votes
1 answer

Memory Issue while reading video frames iPhone

I'm having memory issues while reading video frames from an existing video chosen from the iPhone library. First I added the UIImage-frames themselves into an Array, but I thought that the array was too big for the memory after a while, so instead I…
Bob de Graaf
  • 2,630
  • 1
  • 25
  • 43
2
votes
0 answers

iOS 14.2 - AVAURLAsset fails for remote urls

We've been using the same AVAsset loader methods for five years. Recently, with the release of iOS 14.2, the loader methods fail now. Specifically, when trying to read meta-data within an h.264 encoded mp4 it consistently returns "this media may be…
Akorda
  • 51
  • 4
2
votes
1 answer

How to set correct cookies Value against AVURLAssetHTTPCookiesKey while initialising AVURLAsset

I have to play HLS stream and it is secured/protected. In order to download manifest file and further ts file it is expected that request have valid Cookies information sent. I do receive Cookies information from server but it is not part of…
2
votes
1 answer

is it possible to "Pause" and "Resume" AVAssetDownloadTask?

so far i found only two options for downloading video either "Resume" or "cancel"/"Suspend". is there any possible way to pause downloading video in middle and resume the download from where it stopped. I am using below code to download and store…
Code cracker
  • 3,105
  • 6
  • 37
  • 67
2
votes
1 answer

iPhone SdK: AVPlayer will not play a composition after adding a audio track

After adding an audio track (recorded with AVAudioRecorder) to a composition AVPlayer will not play it. AVPlayer.status = 1 and AVPlayer.error = null. I have looked at the WWDC10 AVEdit demo code and it's pretty much similar. Could it be an audio…
2
votes
0 answers

Error handling in AVAssetResourceLoaderDelegate

What is the recommended way for handling error in AVAssetResourceLoaderDelegate? specifically network requests in shouldWaitForLoadingOfRequestedResource / shouldWaitForRenewalOfRequestedResource? However, there is no way for my app to know…
noc
  • 86
  • 5
2
votes
1 answer

What is wrong with this AVFoundation KVO pattern for a video player [ref: AVPlayerLayer, AVPlayerItem, AVURLAsset]?

I wrote a UIView subclass "VideoPlayerView" to encapsulate AVFoundation video playback. I believed that I had a bulletproof KVO pattern set up to handle observation of the AVPlayer, AVPlayerItems and AVURLAssets for the purpose of loading, playback…
2
votes
0 answers

Make AVURLAsset playable offline with AVAssetCache

AVURLAsset has property assetCache of type AVAssetCache, which has property playableOffline, that indicates if AVAsset is available to be played without a network connection. Property playableOffline is readonly, so the question how is it possible…
2
votes
2 answers

How I can access video/Image from AVURLAsset URL in swift 3.3x?

I have AVUrlAsset something like this "file:///var/mobile/Media/DCIM/101APPLE/IMG_1006.MOV". How I can access video from this url in Swift ?
Ganesh
  • 89
  • 3
  • 14
2
votes
1 answer

Unable to generate thumbnail from video url

I am using the this code for generating thumbnail from a video url AVURLAsset *asset=[[AVURLAsset alloc] initWithURL:videoUrl options:nil]; AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset]; …
iYousafzai
  • 1,021
  • 1
  • 10
  • 29
2
votes
1 answer

AVAssetResourceLoaderDelegate and HLS does not work?

For me it's not working with "m3u8" url both on Simulator and real device (iPhone 5S). In the same time, Apple demo working good, but I don't see any difference. And with other url extensions it's ok (e.g., "m3u9" on the end of the url) import…
norlin
  • 1,205
  • 11
  • 24
2
votes
0 answers

How to implement AVAssetResourceLoaderDelegate method

I'm trying to use a custom scheme to fetch data from a server. I manage to get the raw data, but there seems to be something wrong with my delegate implementation, because the call //data is never nil [loadingRequest.dataRequest…