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
1
vote
0 answers

AVPlayer fails to play video and AVURLAsset return empty array of tracks

Before posting my question, I tried with this post. Currently I am migrating my project from MPMoviewPlayer to AVPlayer. In that moment Video file not played if I changed name with French characters. AVURLAsset will return empty tracks array.…
byJeevan
  • 3,728
  • 3
  • 37
  • 60
1
vote
0 answers

About the iOS10 API AVKeyPathFlattener crash

recent I used AVPlayer to play while downloading, everything seems fine. Bug I found some crash about AVKeyPathFlattener on the other threads. I can't reproduce and don't know how to solve it. Can you please help me ? Thanks. Here is the crash…
kences
  • 11
  • 3
1
vote
1 answer

Fail to compress .mp4 video from photo gallery

Can anyone help me out to fix this issue, gave error while compressing video like : NSLocalizedFailureReason=An unknown error occurred (-12780) let destinationPath = NSURL(string: VideoFilePath)! let sourceAsset = AVURLAsset(url:…
Bucket
  • 449
  • 3
  • 20
1
vote
0 answers

AVPlayer video from url plays only audio

I'm using AVPlayer to play remote audio and video files via urls. With my current implementation, everything is fine on iOS8.4 and higher, the only problem is on iOS8.3 where the videos appear but the audio runs in the background. I create an…
damjandd
  • 708
  • 2
  • 9
  • 24
1
vote
1 answer

tvOS shouldWaitForLoadingOfRequestedResource requesting the same resources

I'm implementing shouldWaitForLoadingOfRequestedResource handler for AVPlayer/AVURLAsset HLS videos and found a weird behavior in tvOS. As I see it could request the same resources multiple times, including "root" manifest, second-level manifests…
norlin
  • 1,205
  • 11
  • 24
1
vote
2 answers

Loading AVURLAsset asynchronously in AVQueuePlayer disturbing the order - iOS

I need to play some audios in a row, and therefore using AVQueuePlayer for that purpose. I'm loading audios in it as : for (NSInteger i = row ; i<_messagesArray.count ; i++) { _urlString =…
Hyder
  • 1,163
  • 2
  • 13
  • 37
1
vote
2 answers

How can i set thumbnail image from video url which come from server

I want to show thumbnail image on video url. I have to do this but not working. It is only work for local filepath not work on to came from server url. Video URL : http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 -(UIImage *)loadThumbNail:(NSURL…
Kamlesh Shingarakhiya
  • 2,757
  • 2
  • 16
  • 34
1
vote
0 answers

AVURLAsset duration of m3u8 video is 0

I'm trying to get duration of a remote video (streamed via http) in m3u8 format. For some videos with large local duration it is unable to get duration of an asset. I'm currently using KVO to catch .Ready status of AVPlayerItem and then invoke…
Andrey Gershengoren
  • 896
  • 1
  • 5
  • 18
1
vote
2 answers

AVURLAsset load webvtt file

I am trying to use AVURLAsset to load a webvtt file. Below is my code. NSString *urlAddress = @"http://somewhere/some.vtt"; NSURL *urlStream = [[NSURL alloc] initWithString:urlAddress]; AVAsset *avAsset = [AVURLAsset…
Leon Shiu
  • 13
  • 4
1
vote
2 answers

what is avurlasset work and simplyfie this mehtod?

AVURLAsset* audioAsset = [[AVURLAsset alloc]initWithURL:assetURL options:@{AVURLAssetPreferPreciseDurationAndTimingKey:@YES}]; // audio asset url create object and specifies its method.... this audio asset can get value in only second? I want…
1
vote
1 answer

AVURLAsset tracksWithMediaType:AVMediaTypeVideo Return crash

I am woking with audio and video merge . I am getting crash in [[AVURLAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] because of empty array AVURLAsset tracksWithMediaType. I set .mp4 to .mov still its not working. Following is the…
pallavi_dev
  • 85
  • 1
  • 9
1
vote
2 answers

AVQueuePlayer unable to play local MP3 files

I'm currently writing an iOS app that allows users to stream music from soundcloud. Currently I am able to stream just fine from Soundcloud, in booth forefront and background app states. I have an issue when I download an MP3 files and attempt to…
1
vote
2 answers

How to add audio to a video file after a certain time in iOS sdk?

I am working on a video editing app in which I have to add audio file to a video and that is working fine if I add the audio at the start of video. AVURLAsset* audioAsset = [[AVURLAsset alloc]initWithURL:audioURL options:nil]; AVURLAsset*…
Imran
  • 1,715
  • 2
  • 20
  • 42
1
vote
1 answer

AVAsset from app sandbox

I'm working with AVAsset in my app and met next problem. When I'm writing something like this: AVAsset *audioAsset = [AVAsset assetWithURL:[NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/Hello.mp3", [[NSBundle mainBundle]…
Vladislav Kovalyov
  • 763
  • 10
  • 24
1
vote
1 answer

Generating thumbnail from video without an AVAsset on Mac OS

I have a document based app here where I need to generate thumbnails from videos I have available in NSFileWrappers. Problem is that I can't get the file URL from the filewrapper, and I can't seem to create a AVURLAsset without a URL. Anybody have…
Christian A. Strømmen
  • 3,181
  • 2
  • 25
  • 46