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

Black Screen when stream video with avkit

Hi I want to stream remote video on my app. URL is: http://test.ext/myvideo.mkv I use AVKit with this code but screen and audio not works. I see only progress bar that go forward. let player = AVPlayer(url: url) // Create a new…
TheCesco88
  • 111
  • 4
  • 9
0
votes
1 answer

Trouble setting AVLayerVideoGravity with the AVKit for Swift

I am very new to Swift and Xcode and I was trying to use a video as a transition from one scene to another. I have most of the code for this figured out but the size of the video does not match the size of the screen, meaning when the transition…
0
votes
2 answers

Playing Vimeo video using HCVimeoVideoExtractor, can't get video URL with specific quality

I'm using this lib https://github.com/superm0/HCVimeoVideoExtractor to play vimeo url. It works fine but changing the quality doesn't return videoURL for some videos. I'm talking about this line if let videoURL = vid.videoURL[.Quality1080p] I'm…
Raymond
  • 1,108
  • 13
  • 32
0
votes
1 answer

Swift 5.1 NSInternalInconsistencyException error

I am updating old media player project (Swift 3) and have weird error: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported action method signature. Must return MPRemoteCommandHandlerStatus or take…
Hattori Hanzō
  • 2,349
  • 4
  • 19
  • 36
0
votes
1 answer

How to render a video file of fixed length from a still image (png)

I am trying to create a video of a specified length from a still image (png). My code is based on the answers given in How do I export UIImage as a movie My code creates a video of the correct length, but the image does appear until the last frame.…
Kenny
  • 1,083
  • 2
  • 8
  • 23
0
votes
0 answers

AVPlayerItem isPlaybackBufferFull always false

Trying to learn AVFoundation by debugging and understanding all properties of AVPlayerItem. I've noticed something when I run a video playing on simulator (or device), that AVPlayerItem's property isPlaybackBufferFull is always false. On the player…
manonthemoon
  • 2,611
  • 8
  • 26
  • 40
0
votes
3 answers

How to detect which video ended when using multiple AVPlayers?

I am playing two videos side by side on screen so I have two instances of AVPlayer. I am detecting end of video playback using notification which is working fine. My selector(playerDidFinishPlaying) is getting called for both videos when they…
Shahrukh Malik
  • 242
  • 2
  • 15
0
votes
0 answers

AVPlayer not always seeking correctly

I've got a player setup with a seek method that looks like this: let time = CMTime(seconds: seconds, preferredTimescale: CMTimeScale(NSEC_PER_SEC)) player.seek(to: time, toleranceBefore: .zero, toleranceAfter: .zero) Then each frame update with a…
Heestand XYZ
  • 1,993
  • 3
  • 19
  • 40
0
votes
2 answers

AVAssetResourceLoaderDelegate methods not called

I'm trying to play an online live stream (.m3u8) securely. I am creating an AVAsset and assigning its delegate to a singleton that conforms to AVAssetResourceLoader. The problem is, the delegate methods are not…
krypton36
  • 197
  • 2
  • 16
0
votes
1 answer

Playing video from a container

I am trying to play a video from a URL. I am passing the video URL but the problem I have now is that I passed the video container into a UIView because I just want it to play in the container. now the video does not play. func setup() { …
King
  • 1,885
  • 3
  • 27
  • 84
0
votes
2 answers

Reduce framerate of a video to have a GIF feeling in Swift

I have been trying to drop the framerate of a video to 10 or 15 frames per second. There are some OBJC related questions from 4/5 years ago. I could not find anything in swift.. This is what I am working on Playground: import Cocoa import…
Koray Birand
  • 1,956
  • 17
  • 22
0
votes
1 answer

AVCaptureDeviceInput Initialization Fails

I'm trying to access the front camera on my iPhone X, however when I try to create an AVCaptureDeviceInput object, initialization fails. let deviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType:…
Matt P
  • 55
  • 10
0
votes
0 answers

How to securely connect AVKit with https?

I have AVKit implemented, the url I am calling the video from is from my website to uses https. When I run the app through Xcode everything works fine, but when I archive the app for release it will not show the Video. I have NSAppTransportSecurity,…
Cartisim
  • 116
  • 10
0
votes
0 answers

AVAudioRecorder: Speed up playback speed of recording? (Not playback with speed with AVAudioPlayer)

I am trying to transcript a long recorded audio file with SFSpeechRecognizer. Unfortunately it seems to run in real time, e.g. if the audio file is 1 min long, SFSpeechRecognizer will take 1 min to transcript it. I have not found an option yet to…
0
votes
0 answers

Swift 4save recorded video to photo album

This is my first attempt at recording and saving a video with AVKit etc. and although I am able to display and record a video with the method: @IBAction func recordVideo(_ sender: Any) { // Check the camera is available if…