346 questions
0
votes
0
answers
38
views
DockKit tracking becomes erratic with increased zoom factor in iOS app
I'm developing an iOS app using DockKit to control a motorized stand. I've noticed that as the zoom factor of the AVCaptureDevice increases, the stand's movement becomes increasingly erratic up and ...
1
vote
0
answers
97
views
How to correctly use RotationCoordiantor and its videoRotationAngleForHorizonLevelPreview to set camera preview orientation
So I'm trying to set camera orientation for AVCaptureVideoPreviewLayer in SwiftUI without deprecated methods (AVCaptureConnection.videoOrientation is deprecated now) but it doesn't work correct:
...
0
votes
0
answers
17
views
How to select high frame rate to capture Live Photos?
I'm borrowing some code to get higher framerate than the default 30, but not all of these formats support Live Photo and I can't find a way to check for it - any ideas?
var bestFormat: AVCaptureDevice....
0
votes
0
answers
49
views
Wanted to add lipstick like effect on lips using Vision and AVFoundation for camera
I wanted to add lipstick like effect on lips using CGMutable path. Detecting face landmarks using vision kit. Landmark.outer lips fill the whole lips, even opened mouth. i wanted to apply on the lips ...
0
votes
1
answer
78
views
Why is `isDepthDataDeliverySupported` returning false on an iPad Pro using `builtInDualWideCamera`?
I am trying to use the AVCamFilter Apple sample project discussed in this WWDC session to get depth data using the dual camera. The project has built-in features to get depth data from the dual camera....
0
votes
0
answers
173
views
Can iPhones create a AVCaptureDevice.DiscoverySession with .external devices
With iOS 17, we saw the introduction of using external cameras on iPads. We can get these external cameras as AVCaptureDevices via AVCaptureDevice.DiscoverySession(deviceTypes: [AVCaptureDevice....
2
votes
1
answer
136
views
What is the AVCaptureSession.Preset.photo preset for iPhone 14/15 Pro/Max 48MP main camera?
My iOS app for iPhone configures a capture session with the .builtInWideAngleCamera and AVCaptureSession.Preset.photo. Most modern iPhones have a 12MP main camera, however, the iPhone 14 Pro and 15 ...
1
vote
0
answers
39
views
Collect output devices on c#
Previously i used this code to collect all output devices, but recently i update my code and know this code is not working at the moment because i receive this message error Installing "...
1
vote
0
answers
103
views
How to relate intrinsics and distortion from AVDepthData to the current video stream?
I am writing a small test app in the context of Computer Vision. The final application will require using the camera calibration, so for now my test app creates a capture session, enables the delivery ...
2
votes
1
answer
119
views
Shadow moving across camera after setting activeFormat of AVCaptureDevice
So I have a function that essentially walks through the formats of a device, finds the one I want with high resolution and frame rate, then sets that after the camera device inputs have been ...
0
votes
1
answer
106
views
How to scan a barcode with all available back cameras of an iphone at the same time?
What I want:
I want to scan for barcodes with all available back cameras of an iPhone at the same time. So the user don't have to care about the distance of the barcode so much.
What I tried:
I ...
1
vote
0
answers
150
views
Can we control optical zoom value manually for iOS camera?
I want to add an optical zoom level to the custom value for the ios camera, Can we achieve this for all iPhone devices depending on their camera type?
I have tried this but I am not sure about this is ...
1
vote
0
answers
96
views
iPhone camera angle difference between iOS15 and iOS16
Hi i'm working on develop iOS custom camera app.
Recently I discovered that my camera app works differently on iOS 15 and iOS 16.
On iOS 15, the video was recorded without any cropped images, and on ...
6
votes
0
answers
147
views
Audio Recording Mac app with Visualizations unable to select input device with AudioKit
Hey I wonder if someone can point me in the right direction.
I am building a Mac Audio App that I need to perform the following actions
Select audio input device
Show a live audio graph of device ...
1
vote
0
answers
113
views
How can set Zoom In AVCaptureDevice in Mac OS
I want to add Zoom factor in AVcaptureDevice. But for mac OS i didn't get any solution. in iOS we can use videoZoomFactor this property. but for macOS nothing any property for set zoom. can you please ...
0
votes
1
answer
140
views
How to get WhiteBalance (Kelvin) from captureOutput
Apple has various ways to change and view the Kelvin of using AVCaptureDevice
https://developer.apple.com/documentation/avfoundation/avcapturedevice/white_balance
Example:
guard let videoDevice = ...
0
votes
1
answer
144
views
AVCaptureDevice isTorchActive does not work for React Native
I've tried to write my own module to detect is torch turned on/off.
According to documentation I've tried to run KVC as below
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object ...
0
votes
0
answers
122
views
The issue with Pylance expecting an expression or "." or "(" not being closed is likely due to syntax errors in my code, but where?
Someone suggested this but it DOESN'T work either.
In the line AVCaptureDevice.requestAccess (for: .video), the parenthesis around for: .video should be removed as it is not a valid syntax in Python. ...
2
votes
1
answer
955
views
Detect when builtInTripleCamera changes lenses?
Background:
I'm working on an app that uses videoZoomFactor to zoom in on the camera view by a specific, user-specified amount. I'd like to incorporate using the telephoto and ultra wide lenses.
I ...
2
votes
0
answers
170
views
iPad Pro M2 model ProRes video recording
I have the following code to determine ProRes and HDR support on iOS devices:
extension AVCaptureDevice.Format {
var supports10bitHDR:Bool {
let mediaType = CMFormatDescriptionGetMediaType(...
1
vote
1
answer
102
views
Requesting access with AVCaptureDevice causes a switch in selected tab in tab view
I am trying to add a QR scanner to my app that has a Tab View at the root. It sort of works except for one thing; When the dialog appears to ask the user for permission to use the camera, it also ...
0
votes
1
answer
843
views
Camera zoom level
Is it possible to get the camera zoom level on various device models in iPhone like in built in camera programmatically example 0.5x, 1x, 2x etc?
I am unable to find the solution. Anyone can you ...
1
vote
0
answers
59
views
AVFoundation crash when setting isEnabled on AVCaptureAudioChannel
For some AVCaptureDevices, trying to set isEnabled on an AVCaptureAudioChannel results in a crash:
Assertion failed: (pSrcASBD->mChannelsPerFrame == [_internal->audioChannels count]), function -[...
0
votes
1
answer
419
views
Why is AVCaptureDevice.maxAvailableVideoZoomFactor so large?
On my iPad with a digital zoom of 5x, the reported captureDevice.maxAvailableVideoZoomFactor for the camera device is 153.
Shouldn't it be 5? Am I using the right property to get the max zoom factor?
1
vote
0
answers
78
views
AVCapturePhotoOutput with 60 fps and flash on causes image to be over brightened
When using AVCapturePhotoOutput with flashMode On and AVCaptureDevice with minimum frame rate set to 60 fps results in an image that is very over brightened. Using the same configuration with 30 fps ...
1
vote
0
answers
42
views
How to detect iPhone device flattened usig camera
I am trying to detect the device flattened to the surface to take pictures like the native camera. Like below Screenshot
I tried using CMMotionManager,
let motioManager = CMMotionManager()
...
0
votes
1
answer
2k
views
How to modify FPS, Bit rate and resolution for the video programmatically in iOS?
I am implementing the functionality for to record the video in my iOS application,
Also, i am using ReplayKit to record a full screen instead of the camera's default capturing
In that there is a ...
0
votes
1
answer
407
views
Optimal handling of AVCaptureSession through app's lifecycle
After reading a lot of Camera App related Apple examples/internet tutorials/random articles I am left with one uncertainty: What is the optimal way of handling your Session setup, while taking into ...
2
votes
0
answers
165
views
AVFoundation crash in fetching averagePowerLevel from audio connection
I have the following code to update power level meters from AVAudioConnection periodically.
func updateMeters() {
var channelCount = 0
var decibels:[Float] = []
let audioConnection =...
1
vote
1
answer
560
views
Having trouble with flipping camera in swiftui / avfoundation / AVCaptureDeviceInput
I am coding a camera with swiftui using avfoundation and was able to get the setup to work as intended. However, as I'm implementing a flip camera functionality I'm running into an error where after ...
1
vote
0
answers
639
views
is the zoom factor for builtInTripleCamera's .5 zoom 1.0?
I'm working on a camera app and I currently don't have a device with a triple camera (so I cannot test). When an app initially configures a camera, I want the camera setting with no zoom in and out ...
3
votes
1
answer
3k
views
Difference between builtInDualCamera and builtInDualWideCamera
I know only a little about iPhone's camera, and I'm bit confused with the differences between builtInDualCamera and builtInDualWideCamera. (so as builtInWideAngleCamera and builtInUltraWideCamera)
...
2
votes
0
answers
374
views
How to handle a video overexposure in Swift
I'm working on a camera app, and I think the behavior of my app and the iPhone default camera app against overexposure is very different.
Like the image below, the default camera app adjusts the ...
0
votes
1
answer
99
views
Duplicate names detected for capture devices
I am using some capture devices for my application, which keep getting detected with the same name by my code which I have written following the link : https://learn.microsoft.com/en-us/windows/win32/...
0
votes
1
answer
223
views
AVCaptureDeviceSubjectAreaDidChange when this notification is post in swift
I'm working on a camera app and I'm trying to center the focus of the camera to the center using this notification, AVCaptureDeviceSubjectAreaDidChange.
NotificationCenter.default.addObserver(self, ...
8
votes
1
answer
3k
views
iPhone 13 Pro / swift / AVFoundation builtInTripleCamera : how to enable automatic switching between cameras?
I am currently making a custom camera app for iOS with swiftUI AVFoundation.
I also just bought iPhone 13 Pro.
On the native Camera App, cameras automatically switch depending on FOCUS (ultrawide for ...
1
vote
1
answer
1k
views
Set resolution for camera in IOS for AI
I am working on a project where I start the camera and then capture images live to image processing. This project has guided me TensorFlow - Image Classification. One thing I can't figure out despite ...
1
vote
1
answer
508
views
AVCaptureDevice's exposurePointOfInterest does not work
I'm trying to change the exposure in my camera app according to certain point of the image.
I'm using the following code that is triggered when the user taps on screen. For now I simply try to expose ...
0
votes
0
answers
606
views
How to fix AVCapturevideopreviewlayer being smaller than actual camera view
I'm working on an app that periodically takes pictures as part of a research job but I'm new to OOP and swift and am a little confused on what can cause this issue. I think it's because the UIView's ...
6
votes
2
answers
1k
views
macOS: Accessing a virtual Cameras (OBS) as AVFoundation CaptureDevice
On macOS, is it possible to see a virtual Camera, such as OBS, as a CaptureDevice?
I see that, for example, Google Chrome or Zoom can use this camera, but using AVCaptureDevice.DiscoverySession I am ...
0
votes
1
answer
710
views
iOS capturePhoto() not taking highest resolution photos only on iPad 11" 3rd gen front camera
The goal is to take the highest resolution photo the camera is capable of.
The camera selected is the iPad 11" 3rd gen (w/M1) front camera: the new 12MP TrueDepth camera.
Although this code does ...
2
votes
1
answer
1k
views
Set AVCaptureDevice format range
I am able to query and find formats for slo-mo at 240FPS. There are two, with 420v and 420f each, at Full HD (correct me if I'm wrong that they only differ in the pixel value range). I was wondering ...
1
vote
0
answers
278
views
Why scan 1D Barcode only get result in middle of view by Swift?
I have a question about scan 1D barcode. Why I set the yellow border about scanning region view, only I put it in the middle of the region and get the result successfully?
It works fine when I put my ...
0
votes
0
answers
95
views
How do I keep my flash light code running while the app is put into background?
Button(action: {
DispatchQueue.global(qos: .userInteractive).async {
self.lightOn.toggle()
let cam = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position:...
0
votes
1
answer
72
views
IOS catalyst avcapturedevice can't realize the function of scanning QR code. It happened in Catalina
IOS catalyst avcapturedevice can't realize the function of scanning QR code. It happened in Catalina. How to realize the function of uiimagepickercontroller scanning QR code
This is Catalina's error ...
1
vote
0
answers
414
views
Swift. macOS. Record sound from speakers
I want to make the macOS-app for recording the audio from system and other apps (music, video, etc).
Not microphone.
How can I make that? I see only options the recording from microphone.
Thanks in ...
0
votes
1
answer
534
views
iOS barcode scanner App crashes with no crash log
I am trying to make a barcode scanner app. As soon as the camera session begins, the app crashes within a few seconds.
I am unable to find the reason behind this. and, how to fix this one.
I have ...
2
votes
1
answer
1k
views
iOS camera output rotated 90 degrees left
I am following this tutorial to build a simple deep learning app for traffic sign recognition. link
I made an own model, and I also tried it with the model in this repository: link
When I run the app ...
0
votes
3
answers
1k
views
iOS 14 AVCaptureSession capturing stereo audio with video recording
I was wondering is there's a way to capture stereo audio using an AVCaptureSession. iOS 14 adds support for stereo audio for AVAudioRecorder, but so far I have been unsuccessful is capturing stereo ...
3
votes
1
answer
1k
views
Understanding AVCaptureDevice exposureDuration, exposureTargetOffset, exposureTargetBias
Come from Android os, I'm trying to understand the AVCaptureDevice API and find a match between the different parameters of the IOS and Android.
I'm working with auto-continuous exposure mode.
I'm ...