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
0
votes
1 answer

Streaming .mp3 with AVURLAsset + AVPlayerItem + AVPLayer

I have an URL. It looks like this: https://content.stage.someCompany.net/deliveries/artistNameHere/songNameHere-128.mp3?Expires=someNumberHere&Signature=someReallyReallyReallyLongStringHere&Key-Pair-Id=someIdHere Let me break it down in…
0
votes
1 answer

-[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' while using insertTimeRange in AVMutableComposition

Following is my code firstAsset = [[AVURLAsset alloc] initWithURL:[NSURL fileURLWithPath:_strThumbForegroundVideo] options:nil]; AVMutableComposition* mixComposition = [[AVMutableComposition alloc] init]; AVMutableCompositionTrack *firstTrack =…
0
votes
2 answers

Convert AVMetadataItem's GPS string into a CLLocation

An AVAsset (or AVURLAsset) contains AVMetadataItems in an array, of which one may be of the common key AVMetadataCommonKeyLocation. The value of that item is a string which appears in a format like: +39.9410-075.2040+007.371/ How do you convert…
Danny
  • 397
  • 3
  • 9
0
votes
1 answer

AVAsset with separate video and audio urls (iOS)

Is it possible to create an AVAsset object with two urls, one for the audio and the other one for the video track? I have tried it with an AVMutableComposition but it seems to load the entire content first and buffer it somewhere before the…
0
votes
1 answer

UI is getting blocked when fetching video duration from AVURLAsset in dispatch_async

I have 2 View Controllers Home and Home Details. In Home I have a table view in which I am showing thumbnail and duration of a video. When I click on a particular row it's details are shown in Home Details. On returning back I am updating that…
Swati Gupta
  • 354
  • 1
  • 9
0
votes
0 answers

audio is not playing after merging two videos into one in Objective C

I want to merge two or more videos into one. I have coded for that and using code below i am able to do so. But, my problem is that after merging two or more videos into one audio is not playing while playing merged video. So Please, help me for…
DJ1
  • 936
  • 15
  • 29
0
votes
2 answers

Setting `fileLengthLimit` of `AVAssetExportSession` causes: " Export failed: Cannot Open"

I am trying to limit the size of AVAssetExportSession to 10mb. Without setting fileLengthLimit, the "Export is completed". After setting fileLengthLimit = 10*1024*1024, the "Export failed: Cannot Open". - (void) splitVideo{ AVURLAsset…
Peter
  • 1,053
  • 13
  • 29
0
votes
1 answer

how to get mp3 file's artwork in swift(important because the objectc method doesn't work)

I found many oc method said using this code *******metadata is a AVMetadataItem class NSString *path =[ [NSBundle mainBundle] pathForResource:@"musicname" ofType:@"mp3"]; NSURL *fileURL = [NSURL fileURLWithPath:path]; AVURLAsset…
Monzy Zhang
  • 55
  • 1
  • 6
0
votes
1 answer

Separate Audio from Video

float sliderValue = 0.5; NSURL *audio_url = [[NSBundle mainBundle] pathForResource:@“video_fileName” ofType:@"mp4"]]; AVURLAsset* audio_Asset = [[AVURLAsset alloc]initWithURL:audio_url options:nil]; AVMutableAudioMixInputParameters *audioInputParams…
Gaurav
  • 168
  • 12
0
votes
2 answers

AVMutableComposition - concatenated video assets stops after first asset

I'm using the following code to concatenate multiple AVURLAssets: AVMutableComposition * movie = [AVMutableComposition composition]; CMTime offset = kCMTimeZero; for (AVURLAsset * asset in assets) { AVMutableCompositionTrack…
Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
0
votes
1 answer

Unable to call up my video files using AVFoundation

I'm having difficulty playing back video that I've recently recorded in a hybrid image/video camera akin to Snapchat (e.g. tap to take a photo, press and hold to record a video, playback on button release). I'm currently saving the video file to…
0
votes
0 answers

Everytime same video gets uploaded + Assets Library

ImgVidData =[[NSData alloc]init]; ALAssetRepresentation *representation = alAsset.defaultRepresentation; NSURL *movieURL = representation.url; NSURL *uploadURL = [NSURL fileURLWithPath:[[NSTemporaryDirectory()…
prateek sharma
  • 175
  • 1
  • 16
0
votes
1 answer

How do I get a song's artist, album, and cover art from AVURLAsset in iOS

I want to extract album name, artist name, cover art, and duration from a song using AVURLAsset in iOS 8.1. So far I have: NSURL *url = [NSURL URLWithString:[strSongPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; AVURLAsset*…
IRD
  • 1,127
  • 2
  • 8
  • 15
0
votes
2 answers

No known class method for selector 'URLAssetWithURL'

I have an iOS app which uses a lot of different audio files recorded in the app and saved. I have imported AVFoundation framework, however I still get the error: No known class method for selector 'URLAssetWithURL' Here is my code: AVAsset *asset…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
0
votes
2 answers

How to get the file name of an AVURLAsset?

I obtain the URL of an AVURLAsset like this: NSURL *url = [[asset defaultRepresentation] url]; In console, the AVURLAsset's url looks like this: assets-library://asset/asset.mov?id=A3210417-4BAC-1C78-BD93-4BDD286247D9&ext=mov I tried getting file…
openfrog
  • 40,201
  • 65
  • 225
  • 373