Questions tagged [avkit]

AVKit is an API developed by Apple Inc.

That comes with OS X Mavericks 10.9+ and can be used with Xcode 5.0+ for developing audio and movie software for Mac .

The AVKit software framework is going to eventually replace QuickTime which is now deprecated.

344 questions
0
votes
0 answers

Prevent picture in picture controls from appearing on current item change

I'm working on a custom video player to play a number of short videos, a few seconds each. I use a subclass of AVQueuePlayer for that, and a subclass of AVPlayerViewController with a manually instantiated AVPictureInPictureController. It works…
Bardt
  • 695
  • 1
  • 8
  • 17
0
votes
1 answer

Using AVFoundation to persist hls playlist , downloads two different video tracks, makes download size to go higher than expected

I'm trying to download hls playlist video track by parsing specific bitrate / resolution. Downloads work perfectly fine. But we need to download specific video track variant from the manifest. So I parse bitrate & resolution via…
Udaya Sri
  • 2,372
  • 2
  • 25
  • 35
0
votes
0 answers

AVAssetDownloadURLSession never inited

We have strange problem with background AVAssetDownloadURLSession. If you cancel downloading task and then fast close application and restart it the AVAssetDownloadURLSession will be never inited. Only restart of device will help. This problem is…
0
votes
0 answers

AR View freezes for couple seconds while video in AVPlayer loads

I am creating a plane with VideoMaterial when AR Reference Image is detected. I play the video inside an AVPlayer and I want to load the video from URL, instead of local resources. It all works well, however when the image is detected and the place…
user1207524
  • 251
  • 2
  • 12
  • 27
0
votes
0 answers

How to make AVPlayerItem Codable?

Having difficulty trying to use an @Published property in my Mac app within a class that needs to be Codable. This class is initialised using an AVMutableComposition. I followed this tutorial here and came up with the following, but not sure what to…
user1542125
  • 593
  • 6
  • 16
0
votes
0 answers

How do you subclass AVCaptureOutput?

I am trying to create a subclass of AVCaptureOutput that should behave like the AVCaptureMovieFileOutput with special features. However whether I provide an init function or not, I end up with an 'init()' is unavailable error (in the example below,…
Fred Klein
  • 448
  • 6
  • 13
0
votes
1 answer

Meaning of AVFoundation error codes -11800/-16364

It's very hard to know from AVFoundation error codes what is the exact error. For instance, I see the following message and don't know what error code means?
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
0
votes
1 answer

Fit video inside of a view

I'm trying to fit a video inside the view I've created on storyboard. Here is how I added the view to my storyboard. Here is how it shown in simulator. I want to fit the video inside of the view I've created. func createVideoView() { if let…
themmfa
  • 499
  • 4
  • 15
0
votes
1 answer

Setting a cover with MPMediaItemArtwork not working iOS 16

I am building an app with AVKit and MediaPlayer and want to show a cover in the control center. Using this code didn't worked for me: if let image = UIImage(named: "myCover") { …
user18908963
0
votes
1 answer

Convert YUV data to CVPixelBufferRef and play in AVSampleBufferDisplayLayer

I'm having a stream of video in IYUV (4:2:0) format and trying to convert it into CVPixelBufferRef and then into CMSampleBufferRef and play it in AVSampleBufferDisplayLayer (AVPictureInPictureController required). I've tried several version of…
Tj3n
  • 9,837
  • 2
  • 24
  • 35
0
votes
1 answer

Upload large video to server swift using Alamofire

I have created an application for recording video and upload it to the server, but I meet problem related with huge file size, after some time I get error: Task <>.<6> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The…
Sanzhar
  • 50
  • 6
0
votes
1 answer

Creating AVCaptureVideoPreviewLayer object - Publishing changes from within view updates is not allowed, this will cause undefined behavior

I'm trying to open the camera with AVKit and while creating CameraView and AVCaptureVideoPreviewLayer object I have the following error: Publishing changes from within view updates is not allowed, this will cause undefined behavior. I know that it…
Vader20FF
  • 271
  • 2
  • 9
0
votes
0 answers

PryntTrimmerView in SwiftUI

I am working on a video editor app where I need a trimmer for the video. So I found this package. Now When I'm trying to show the TrimView,but it's not showing up on my SwiftUI view. This is my View Controller Representable final class TrimView:…
S.Sazza
  • 1
  • 1
0
votes
1 answer

Split PHAsset to frames swift

I need to split video(PHAsset) to frames. Please could anyone write an extension for PHAsset for example to call function like this: extension PHAsset { func getFrame(timecode: Float) -> UIImage? { *something* return frame } } You…
Sanzhar
  • 50
  • 6
0
votes
1 answer

How can I hide the default close button of AVPictureInPictureController?

Implemented pip function using AVPictureInPictureController. I hid the player and time search, but failed to hide the last close button and return button. The buttons I want to hide are these buttons. enter image description here The one I…
Mary Kim
  • 25
  • 5