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

Slice and merge videos in AVFoundation

I have a big video file and I want to make a new video from pieces of that big one. I have an array of seconds like: [20, 35, 100, 267, 490, 699] and an offset like 2 and I would love to make a mew video that contains: From second 20 to 22 to 35 to…
Joan Cardona
  • 3,463
  • 2
  • 25
  • 43
1
vote
0 answers

Crop video in landscape in Swift

I am trying to crop the video in landscape mode using AVKit. I have tried several similar questions on Stackoverflow but none is working as expected. This is what I have tried so far. self.cropOfficialRect = CGRect(x: 0, y:…
Harjot Singh
  • 535
  • 7
  • 24
1
vote
1 answer

Decoding ProresRAW format to native bayer representation

I am trying to decode Prores video file But it doesn't work. I always got Optional(Error Domain=AVFoundationErrorDomain Code=-11821 "Cannot Decode" UserInfo={NSLocalizedFailureReason=The media data could not be decoded. It may be damaged.,…
JaSHin
  • 211
  • 2
  • 16
  • 43
1
vote
0 answers

Playing and caching a remote asset with AVPlayer

I am trying to use AVPlayer to play/cache a remote asset using two tools on Github: CachingPlayerItem with Cache. I found the solution elsewhere(scroll down), which nearly gets me there, My issue now is that I have to tap twice on the remote audio…
gadha007
  • 31
  • 1
  • 5
1
vote
0 answers

Can I display an SRT video stream in SwiftUI?

I have a camera that produces an srt stream; I'd like to be able to embed that stream live in a SwiftUI app. I was hoping that this would work: import AVKit ... VideoPlayer(player: AVPlayer(url: URL(string:…
1
vote
0 answers

Swift AVFoundation instructions don't set the opacity

I have a function that merges videos. All videos merge properly and the first two videos will play perfectly but then only the audio for the third video plays. I am assuming the video is there, but it is just blocked by the second video. I am…
1
vote
0 answers

Is there is anyway to use setSampleBufferDelegate in AVCaptureMovieFileOutput in iOS Swift

I'm making a video capture app with live filters. I was able to create live camera feed and display it in an image view and add filters. Now I want to record it as a video along with filter. At present I'm using this method for recording @IBAction…
stark
  • 41
  • 3
1
vote
1 answer

How fix UIImage orientation when converted from CIIImage iOS swift

I'm making a simple video capture app. I have used UIImageView as my preview layer as I may need to use CIFilter. But the problem is when image is converted from CIImage to UIImage and displayed in image view its orientation changes. How can I fix…
stark
  • 41
  • 3
1
vote
1 answer

How to do syncronized playback using AVAudioPlayer API?

There is an example here on using AVAudioPlayer. In the description it says it's able to: Play multiple sounds at the same time with optional synchronization. I don't see how to do that in the example. Apple API that says the same thing: Play…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
1
vote
1 answer

Loop mp3 with AVAudio

I try to loop an mp3 file, where I can change its pitch while playing. I can change the pitch but I cannot loop the file. This is my code: import AVKit class ViewController: UIViewController { @IBOutlet weak var speedSlider: UISlider! …
MunichCoder
  • 143
  • 1
  • 9
1
vote
0 answers

SwiftUI - Adding playback rate control in AVPlayer

I am using an AVPlayer in my current SwiftUI project. I am trying to implement a playback speed control similar to what Apple has on its video player for the Developer App (like in the given screenshot) but found no answers so far. Any leads on the…
1
vote
0 answers

How can i stop my frames from constantly being reloaded in swift

I have a code that detects objects and transcribes them to speech. However, if various objects are detected in the same frame the voice output gets messed up and starts saying the object's name all together making no sense to the user. I'm…
tamerjar
  • 220
  • 2
  • 12
1
vote
1 answer

Playing back audio recorded with AVCaptureAudioDataOutput

I'm trying to record video and audio and sending them over the network so that they can be played back in real time on other clients. I've managed to record and play back video successfully, but audio still cannot be played back (see AVAudioPlayer…
Nickkk
  • 2,261
  • 1
  • 25
  • 34
1
vote
0 answers

AVAssetWriter Disrupts TCP Connection

I am currently working on a project in which our application receives JPEG-data from an IP Camera through TCP (using Network -NW- framework) and builds CMSampleBuffers from it. After this process, we are displaying it with…
Halil SAFAK
  • 377
  • 1
  • 6
1
vote
0 answers

AVAssetDownloadURLSession freeze when allocating and initialising

I got problem with AVAssetDownloadURLSession. My app is downloading HLS videos and concurrently playing it. Everything works fine, except that after a while app freeze. It appears that init(configuration:assetDownloadDelegate:delegateQueue:) to be…
m.smigowski
  • 51
  • 1
  • 9